Diff
Not logged in

Differences From:

File src/vfile.c part of check-in [5c3e87171a] - Fix a problem in the commit logic that caused it to ignore merge changes. Add another test to the commit to detect future problems of a similar nature. by drh on 2007-08-01 12:17:14. [view]

To:

File src/vfile.c part of check-in [394505791628e] - Add primitive start-time and duration controols to the timeline. Additional checksums on check-in and check-out. by drh on 2007-08-01 21:03:03. [view]

@@ -331,9 +331,9 @@
 ** file in manifest vid.  The file names are part of the checksum.
 **
 ** Return the resulting checksum in blob pOut.
 */
-void vfile_aggregate_checksum_manifest(int vid, Blob *pOut){
+void vfile_aggregate_checksum_manifest(int vid, Blob *pOut, Blob *pManOut){
   int i, fid;
   Blob file, mfile;
   Manifest m;
   char zBuf[100];
@@ -352,8 +352,12 @@
     md5sum_step_text(zBuf, -1);
     md5sum_step_blob(&file);
     blob_reset(&file);
   }
+  if( pManOut ){
+    blob_zero(pManOut);
+    blob_append(pManOut, m.zRepoCksum, -1);
+  }
   manifest_clear(&m);
   md5sum_finish(pOut);
 }
 
@@ -361,9 +365,9 @@
 ** COMMAND: test-agg-cksum
 */
 void test_agg_cksum_cmd(void){
   int vid;
-  Blob hash;
+  Blob hash, hash2;
   db_must_be_within_tree();
   vid = db_lget_int("checkout", 0);
   vfile_aggregate_checksum_disk(vid, &hash);
   printf("disk:     %s\n", blob_str(&hash));
@@ -370,7 +374,8 @@
   blob_reset(&hash);
   vfile_aggregate_checksum_repository(vid, &hash);
   printf("archive:  %s\n", blob_str(&hash));
   blob_reset(&hash);
-  vfile_aggregate_checksum_manifest(vid, &hash);
+  vfile_aggregate_checksum_manifest(vid, &hash, &hash2);
   printf("manifest: %s\n", blob_str(&hash));
+  printf("recorded: %s\n", blob_str(&hash2));
 }