Diff
Not logged in

Differences From:

File src/checkout.c part of check-in [c9fdb846fb] - Add the "help" command and the "clean" command. More work is needed on the text for various help messages. by drh on 2007-08-18 02:45:47. [view]

To:

File src/checkout.c part of check-in [95e17f4e3f] - Generate the "manifest.uuid" file containing the SHA1 hash of the "manifest" file whenever the manifest is generated. Makefiles can used the "manifest.uuid" to insert the version number into the executable. by drh on 2007-08-25 19:31:31. [view]

@@ -98,15 +98,23 @@
 */
 void manifest_to_disk(int vid){
   char *zManFile;
   Blob manifest;
+  Blob hash;
 
   blob_zero(&manifest);
   zManFile = mprintf("%smanifest", g.zLocalRoot);
   content_get(vid, &manifest);
   blob_write_to_file(&manifest, zManFile);
   free(zManFile);
+  blob_zero(&hash);
+  sha1sum_blob(&manifest, &hash);
   blob_reset(&manifest);
+  zManFile = mprintf("%smanifest.uuid", g.zLocalRoot);
+  blob_append(&hash, "\n", 1);
+  blob_write_to_file(&hash, zManFile);
+  free(zManFile);
+  blob_reset(&hash);
 }
 
 /*
 ** COMMAND: checkout