Differences From:
File
src/checkin.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]
To:
File
src/checkin.c
part of check-in
[741aac4d4e]
- Regenerate the manifest.uuid file on a "commit".
by
drh on
2007-08-25 19:52:42.
[view]
@@ -306,8 +306,9 @@
char *zUuid, *zDate;
int noSign = 0; /* True to omit signing the manifest using GPG */
char *zManifestFile; /* Name of the manifest file */
Blob manifest;
+ Blob muuid; /* Manifest uuid */
Blob mcksum; /* Self-checksum on the manifest */
Blob cksum1, cksum2; /* Before and after commit checksums */
Blob cksum1b; /* Checksum recorded in the manifest */
@@ -448,8 +449,15 @@
manifest_crosslink(nvid, &manifest);
content_deltify(vid, nvid, 0);
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
printf("New_Version: %s\n", zUuid);
+ zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
+ blob_zero(&muuid);
+ blob_appendf(&muuid, "%s\n", zUuid);
+ blob_write_to_file(&muuid, zManifestFile);
+ free(zManifestFile);
+ blob_reset(&muuid);
+
/* Update the vfile and vmerge tables */
db_multi_exec(
"DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);"