Fossil SCM
Regenerate the manifest.uuid file on a "commit".
Commit
741aac4d4e9da49f6741e4c26eff720b8934a2d2
Parent
b4571bb75ed721d…
1 file changed
+8
+8
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -305,10 +305,11 @@ | ||
| 305 | 305 | Stmt q2; |
| 306 | 306 | char *zUuid, *zDate; |
| 307 | 307 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 308 | 308 | char *zManifestFile; /* Name of the manifest file */ |
| 309 | 309 | Blob manifest; |
| 310 | + Blob muuid; /* Manifest uuid */ | |
| 310 | 311 | Blob mcksum; /* Self-checksum on the manifest */ |
| 311 | 312 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| 312 | 313 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 313 | 314 | |
| 314 | 315 | noSign = find_option("nosign","",0)!=0; |
| @@ -447,10 +448,17 @@ | ||
| 447 | 448 | } |
| 448 | 449 | manifest_crosslink(nvid, &manifest); |
| 449 | 450 | content_deltify(vid, nvid, 0); |
| 450 | 451 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 451 | 452 | printf("New_Version: %s\n", zUuid); |
| 453 | + zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot); | |
| 454 | + blob_zero(&muuid); | |
| 455 | + blob_appendf(&muuid, "%s\n", zUuid); | |
| 456 | + blob_write_to_file(&muuid, zManifestFile); | |
| 457 | + free(zManifestFile); | |
| 458 | + blob_reset(&muuid); | |
| 459 | + | |
| 452 | 460 | |
| 453 | 461 | /* Update the vfile and vmerge tables */ |
| 454 | 462 | db_multi_exec( |
| 455 | 463 | "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);" |
| 456 | 464 | "DELETE FROM vmerge WHERE file_is_selected(id) OR id=0;" |
| 457 | 465 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -305,10 +305,11 @@ | |
| 305 | Stmt q2; |
| 306 | char *zUuid, *zDate; |
| 307 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 308 | char *zManifestFile; /* Name of the manifest file */ |
| 309 | Blob manifest; |
| 310 | Blob mcksum; /* Self-checksum on the manifest */ |
| 311 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| 312 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 313 | |
| 314 | noSign = find_option("nosign","",0)!=0; |
| @@ -447,10 +448,17 @@ | |
| 447 | } |
| 448 | manifest_crosslink(nvid, &manifest); |
| 449 | content_deltify(vid, nvid, 0); |
| 450 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 451 | printf("New_Version: %s\n", zUuid); |
| 452 | |
| 453 | /* Update the vfile and vmerge tables */ |
| 454 | db_multi_exec( |
| 455 | "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);" |
| 456 | "DELETE FROM vmerge WHERE file_is_selected(id) OR id=0;" |
| 457 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -305,10 +305,11 @@ | |
| 305 | Stmt q2; |
| 306 | char *zUuid, *zDate; |
| 307 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 308 | char *zManifestFile; /* Name of the manifest file */ |
| 309 | Blob manifest; |
| 310 | Blob muuid; /* Manifest uuid */ |
| 311 | Blob mcksum; /* Self-checksum on the manifest */ |
| 312 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| 313 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 314 | |
| 315 | noSign = find_option("nosign","",0)!=0; |
| @@ -447,10 +448,17 @@ | |
| 448 | } |
| 449 | manifest_crosslink(nvid, &manifest); |
| 450 | content_deltify(vid, nvid, 0); |
| 451 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 452 | printf("New_Version: %s\n", zUuid); |
| 453 | zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 454 | blob_zero(&muuid); |
| 455 | blob_appendf(&muuid, "%s\n", zUuid); |
| 456 | blob_write_to_file(&muuid, zManifestFile); |
| 457 | free(zManifestFile); |
| 458 | blob_reset(&muuid); |
| 459 | |
| 460 | |
| 461 | /* Update the vfile and vmerge tables */ |
| 462 | db_multi_exec( |
| 463 | "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);" |
| 464 | "DELETE FROM vmerge WHERE file_is_selected(id) OR id=0;" |
| 465 |