Fossil SCM
Conditionally save manifests on commit.
Commit
46b9adb70fc21d4d2a36e8d55d6d48b4ae622106
Parent
de30eec201b6100…
1 file changed
+13
-3
+13
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -1768,11 +1768,11 @@ | ||
| 1768 | 1768 | sCiInfo.zUserOvrd = find_option("user-override",0,1); |
| 1769 | 1769 | db_must_be_within_tree(); |
| 1770 | 1770 | noSign = db_get_boolean("omitsign", 0)|noSign; |
| 1771 | 1771 | if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; } |
| 1772 | 1772 | useCksum = db_get_boolean("repo-cksum", 1); |
| 1773 | - outputManifest = db_get_boolean("manifest", 0); | |
| 1773 | + outputManifest = db_get_manifest_setting(); | |
| 1774 | 1774 | verify_all_options(); |
| 1775 | 1775 | |
| 1776 | 1776 | /* Escape special characters in tags and put all tags in sorted order */ |
| 1777 | 1777 | if( nTag ){ |
| 1778 | 1778 | int i; |
| @@ -2104,11 +2104,11 @@ | ||
| 2104 | 2104 | ** and rollback the transaction. |
| 2105 | 2105 | */ |
| 2106 | 2106 | if( dryRunFlag ){ |
| 2107 | 2107 | blob_write_to_file(&manifest, ""); |
| 2108 | 2108 | } |
| 2109 | - if( outputManifest ){ | |
| 2109 | + if( outputManifest & MFESTFLG_RAW ){ | |
| 2110 | 2110 | zManifestFile = mprintf("%smanifest", g.zLocalRoot); |
| 2111 | 2111 | blob_write_to_file(&manifest, zManifestFile); |
| 2112 | 2112 | blob_reset(&manifest); |
| 2113 | 2113 | blob_read_from_file(&manifest, zManifestFile); |
| 2114 | 2114 | free(zManifestFile); |
| @@ -2138,11 +2138,11 @@ | ||
| 2138 | 2138 | } |
| 2139 | 2139 | } |
| 2140 | 2140 | db_finalize(&q); |
| 2141 | 2141 | |
| 2142 | 2142 | fossil_print("New_Version: %s\n", zUuid); |
| 2143 | - if( outputManifest ){ | |
| 2143 | + if( outputManifest & MFESTFLG_UUID ){ | |
| 2144 | 2144 | zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 2145 | 2145 | blob_zero(&muuid); |
| 2146 | 2146 | blob_appendf(&muuid, "%s\n", zUuid); |
| 2147 | 2147 | blob_write_to_file(&muuid, zManifestFile); |
| 2148 | 2148 | free(zManifestFile); |
| @@ -2220,13 +2220,23 @@ | ||
| 2220 | 2220 | if( dryRunFlag ){ |
| 2221 | 2221 | db_end_transaction(1); |
| 2222 | 2222 | exit(1); |
| 2223 | 2223 | } |
| 2224 | 2224 | db_end_transaction(0); |
| 2225 | + | |
| 2226 | + if( outputManifest & MFESTFLG_TAGS ){ | |
| 2227 | + Blob tagslist; | |
| 2228 | + zManifestFile = mprintf("%smanifest.tags", g.zLocalRoot); | |
| 2229 | + blob_zero(&tagslist); | |
| 2230 | + get_checkin_taglist(nvid, &tagslist); | |
| 2231 | + blob_write_to_file(&tagslist, zManifestFile); | |
| 2232 | + blob_reset(&tagslist); | |
| 2233 | + free(zManifestFile); | |
| 2234 | + } | |
| 2225 | 2235 | |
| 2226 | 2236 | if( !g.markPrivate ){ |
| 2227 | 2237 | autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1)); |
| 2228 | 2238 | } |
| 2229 | 2239 | if( count_nonbranch_children(vid)>1 ){ |
| 2230 | 2240 | fossil_print("**** warning: a fork has occurred *****\n"); |
| 2231 | 2241 | } |
| 2232 | 2242 | } |
| 2233 | 2243 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1768,11 +1768,11 @@ | |
| 1768 | sCiInfo.zUserOvrd = find_option("user-override",0,1); |
| 1769 | db_must_be_within_tree(); |
| 1770 | noSign = db_get_boolean("omitsign", 0)|noSign; |
| 1771 | if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; } |
| 1772 | useCksum = db_get_boolean("repo-cksum", 1); |
| 1773 | outputManifest = db_get_boolean("manifest", 0); |
| 1774 | verify_all_options(); |
| 1775 | |
| 1776 | /* Escape special characters in tags and put all tags in sorted order */ |
| 1777 | if( nTag ){ |
| 1778 | int i; |
| @@ -2104,11 +2104,11 @@ | |
| 2104 | ** and rollback the transaction. |
| 2105 | */ |
| 2106 | if( dryRunFlag ){ |
| 2107 | blob_write_to_file(&manifest, ""); |
| 2108 | } |
| 2109 | if( outputManifest ){ |
| 2110 | zManifestFile = mprintf("%smanifest", g.zLocalRoot); |
| 2111 | blob_write_to_file(&manifest, zManifestFile); |
| 2112 | blob_reset(&manifest); |
| 2113 | blob_read_from_file(&manifest, zManifestFile); |
| 2114 | free(zManifestFile); |
| @@ -2138,11 +2138,11 @@ | |
| 2138 | } |
| 2139 | } |
| 2140 | db_finalize(&q); |
| 2141 | |
| 2142 | fossil_print("New_Version: %s\n", zUuid); |
| 2143 | if( outputManifest ){ |
| 2144 | zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 2145 | blob_zero(&muuid); |
| 2146 | blob_appendf(&muuid, "%s\n", zUuid); |
| 2147 | blob_write_to_file(&muuid, zManifestFile); |
| 2148 | free(zManifestFile); |
| @@ -2220,13 +2220,23 @@ | |
| 2220 | if( dryRunFlag ){ |
| 2221 | db_end_transaction(1); |
| 2222 | exit(1); |
| 2223 | } |
| 2224 | db_end_transaction(0); |
| 2225 | |
| 2226 | if( !g.markPrivate ){ |
| 2227 | autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1)); |
| 2228 | } |
| 2229 | if( count_nonbranch_children(vid)>1 ){ |
| 2230 | fossil_print("**** warning: a fork has occurred *****\n"); |
| 2231 | } |
| 2232 | } |
| 2233 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1768,11 +1768,11 @@ | |
| 1768 | sCiInfo.zUserOvrd = find_option("user-override",0,1); |
| 1769 | db_must_be_within_tree(); |
| 1770 | noSign = db_get_boolean("omitsign", 0)|noSign; |
| 1771 | if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; } |
| 1772 | useCksum = db_get_boolean("repo-cksum", 1); |
| 1773 | outputManifest = db_get_manifest_setting(); |
| 1774 | verify_all_options(); |
| 1775 | |
| 1776 | /* Escape special characters in tags and put all tags in sorted order */ |
| 1777 | if( nTag ){ |
| 1778 | int i; |
| @@ -2104,11 +2104,11 @@ | |
| 2104 | ** and rollback the transaction. |
| 2105 | */ |
| 2106 | if( dryRunFlag ){ |
| 2107 | blob_write_to_file(&manifest, ""); |
| 2108 | } |
| 2109 | if( outputManifest & MFESTFLG_RAW ){ |
| 2110 | zManifestFile = mprintf("%smanifest", g.zLocalRoot); |
| 2111 | blob_write_to_file(&manifest, zManifestFile); |
| 2112 | blob_reset(&manifest); |
| 2113 | blob_read_from_file(&manifest, zManifestFile); |
| 2114 | free(zManifestFile); |
| @@ -2138,11 +2138,11 @@ | |
| 2138 | } |
| 2139 | } |
| 2140 | db_finalize(&q); |
| 2141 | |
| 2142 | fossil_print("New_Version: %s\n", zUuid); |
| 2143 | if( outputManifest & MFESTFLG_UUID ){ |
| 2144 | zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 2145 | blob_zero(&muuid); |
| 2146 | blob_appendf(&muuid, "%s\n", zUuid); |
| 2147 | blob_write_to_file(&muuid, zManifestFile); |
| 2148 | free(zManifestFile); |
| @@ -2220,13 +2220,23 @@ | |
| 2220 | if( dryRunFlag ){ |
| 2221 | db_end_transaction(1); |
| 2222 | exit(1); |
| 2223 | } |
| 2224 | db_end_transaction(0); |
| 2225 | |
| 2226 | if( outputManifest & MFESTFLG_TAGS ){ |
| 2227 | Blob tagslist; |
| 2228 | zManifestFile = mprintf("%smanifest.tags", g.zLocalRoot); |
| 2229 | blob_zero(&tagslist); |
| 2230 | get_checkin_taglist(nvid, &tagslist); |
| 2231 | blob_write_to_file(&tagslist, zManifestFile); |
| 2232 | blob_reset(&tagslist); |
| 2233 | free(zManifestFile); |
| 2234 | } |
| 2235 | |
| 2236 | if( !g.markPrivate ){ |
| 2237 | autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1)); |
| 2238 | } |
| 2239 | if( count_nonbranch_children(vid)>1 ){ |
| 2240 | fossil_print("**** warning: a fork has occurred *****\n"); |
| 2241 | } |
| 2242 | } |
| 2243 |