Fossil

Check-in [80ceedbd]
Login

Check-in [80ceedbd]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add manifest.tags to tarballs when appropriate, and decouple manifest and manifest.uuid.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | jan-manifest-tags
Files: files | file ages | folders
SHA1: 80ceedbdeabc970e853427ca81184838aba89ff4
User & Date: jan 2016-01-03 23:55:15
Context
2016-01-04
00:19
Added a missing finalize. ... (check-in: 6a56db89 user: jan tags: jan-manifest-tags)
2016-01-03
23:55
Add manifest.tags to tarballs when appropriate, and decouple manifest and manifest.uuid. ... (check-in: 80ceedbd user: jan tags: jan-manifest-tags)
22:54
Add manifest.tags to the list of potentially reserved names and decouple manifest and manifest.uuid from each other. ... (check-in: 142cb7aa user: jan tags: jan-manifest-tags)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/tar.c.
484
485
486
487
488
489
490

491
492
493



494
495


496


497
498


499

500
501
502
503
504
505










506
507
508
509
510
511
512
  if( zDir && zDir[0] ){
    blob_appendf(&filename, "%s/", zDir);
  }
  nPrefix = blob_size(&filename);

  pManifest = manifest_get(rid, CFTYPE_MANIFEST, 0);
  if( pManifest ){

    mTime = (pManifest->rDate - 2440587.5)*86400.0;
    tar_begin(mTime);
    if( db_get_boolean("manifest", 0) ){



      blob_append(&filename, "manifest", -1);
      zName = blob_str(&filename);


      sha1sum_blob(&mfile, &hash);


      sterilize_manifest(&mfile);
      tar_add_file(zName, &mfile, 0, mTime);


      blob_reset(&mfile);

      blob_append(&hash, "\n", 1);
      blob_resize(&filename, nPrefix);
      blob_append(&filename, "manifest.uuid", -1);
      zName = blob_str(&filename);
      tar_add_file(zName, &hash, 0, mTime);
      blob_reset(&hash);










    }
    manifest_file_rewind(pManifest);
    while( (pFile = manifest_file_next(pManifest,0))!=0 ){
      int fid = uuid_to_rid(pFile->zUuid, 0);
      if( fid ){
        content_get(fid, &file);
        blob_resize(&filename, nPrefix);







>


|
>
>
>
|
|
>
>
|
>
>
|
|
>
>

>
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>







484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
  if( zDir && zDir[0] ){
    blob_appendf(&filename, "%s/", zDir);
  }
  nPrefix = blob_size(&filename);

  pManifest = manifest_get(rid, CFTYPE_MANIFEST, 0);
  if( pManifest ){
    int flg;
    mTime = (pManifest->rDate - 2440587.5)*86400.0;
    tar_begin(mTime);
    flg = db_get_manifest_setting();
    if( flg ){
      if( flg & (MFESTFLG_RAW|MFESTFLG_UUID) ){
        if( flg & MFESTFLG_RAW ){
          blob_append(&filename, "manifest", -1);
          zName = blob_str(&filename);
        }
        if( flg & MFESTFLG_UUID ){
          sha1sum_blob(&mfile, &hash);
        }
        if( flg & MFESTFLG_RAW ) {
          sterilize_manifest(&mfile);
          tar_add_file(zName, &mfile, 0, mTime);
        }
      }
      blob_reset(&mfile);
      if( flg & MFESTFLG_UUID ){
        blob_append(&hash, "\n", 1);
        blob_resize(&filename, nPrefix);
        blob_append(&filename, "manifest.uuid", -1);
        zName = blob_str(&filename);
        tar_add_file(zName, &hash, 0, mTime);
        blob_reset(&hash);
      }
      if( flg & MFESTFLG_TAGS ){
        Blob tagslist;
        blob_zero(&tagslist);
        get_checkin_taglist(rid, &tagslist);
        blob_resize(&filename, nPrefix);
        blob_append(&filename, "manifest.tags", -1);
        tar_add_file(zName, &tagslist, 0, mTime);
        blob_reset(&tagslist);
      }
    }
    manifest_file_rewind(pManifest);
    while( (pFile = manifest_file_next(pManifest,0))!=0 ){
      int fid = uuid_to_rid(pFile->zUuid, 0);
      if( fid ){
        content_get(fid, &file);
        blob_resize(&filename, nPrefix);