Fossil

Check-in [aed6fe53]
Login

Check-in [aed6fe53]

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

Overview
Comment:Add manifest.tags to generated zips, 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: aed6fe5308202bd284da9d96bd1076cb932ae555
User & Date: jan 2016-01-04 00:28:40
Context
2016-01-04
00:36
Code normalization; tabs->spaces. ... (check-in: de30eec2 user: jan tags: jan-manifest-tags)
00:28
Add manifest.tags to generated zips, and decouple manifest and manifest.uuid. ... (check-in: aed6fe53 user: jan tags: jan-manifest-tags)
00:22
Fix: Extract filename for manifest.tags. ... (check-in: 185669ce user: jan tags: jan-manifest-tags)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/zip.c.
342
343
344
345
346
347
348

349
350
351



352
353
354


355


356
357


358

359
360
361
362

363
364












365
366
367
368
369
370
371
  if( zDir && zDir[0] ){
    blob_appendf(&filename, "%s/", zDir);
  }
  nPrefix = blob_size(&filename);

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

    char *zName;
    zip_set_timedate(pManifest->rDate);
    if( db_get_boolean("manifest", 0) ){



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


      sha1sum_blob(&mfile, &hash);


      sterilize_manifest(&mfile);
      zip_add_file(zName, &mfile, 0);


      blob_reset(&mfile);

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

      zip_add_file(zName, &hash, 0);
      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);







>


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

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







342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
  if( zDir && zDir[0] ){
    blob_appendf(&filename, "%s/", zDir);
  }
  nPrefix = blob_size(&filename);

  pManifest = manifest_get(rid, CFTYPE_MANIFEST, 0);
  if( pManifest ){
    int flg;
    char *zName;
    zip_set_timedate(pManifest->rDate);
    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);
          zip_add_folders(zName);
        }
        if( flg & MFESTFLG_UUID ){
          sha1sum_blob(&mfile, &hash);
        }
        if( flg & MFESTFLG_RAW ){
          sterilize_manifest(&mfile);
          zip_add_file(zName, &mfile, 0);
        }
      }
      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);
        zip_add_folders(zName);
        zip_add_file(zName, &hash, 0);
        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);
        zName = blob_str(&filename);
        zip_add_folders(zName);
        zip_add_file(zName, &tagslist, 0);
        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);