Fossil SCM

Conditionally save manifests on commit.

jan 2016-01-04 02:16 jan-manifest-tags
Commit 46b9adb70fc21d4d2a36e8d55d6d48b4ae622106
1 file changed +13 -3
+13 -3
--- src/checkin.c
+++ src/checkin.c
@@ -1768,11 +1768,11 @@
17681768
sCiInfo.zUserOvrd = find_option("user-override",0,1);
17691769
db_must_be_within_tree();
17701770
noSign = db_get_boolean("omitsign", 0)|noSign;
17711771
if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
17721772
useCksum = db_get_boolean("repo-cksum", 1);
1773
- outputManifest = db_get_boolean("manifest", 0);
1773
+ outputManifest = db_get_manifest_setting();
17741774
verify_all_options();
17751775
17761776
/* Escape special characters in tags and put all tags in sorted order */
17771777
if( nTag ){
17781778
int i;
@@ -2104,11 +2104,11 @@
21042104
** and rollback the transaction.
21052105
*/
21062106
if( dryRunFlag ){
21072107
blob_write_to_file(&manifest, "");
21082108
}
2109
- if( outputManifest ){
2109
+ if( outputManifest & MFESTFLG_RAW ){
21102110
zManifestFile = mprintf("%smanifest", g.zLocalRoot);
21112111
blob_write_to_file(&manifest, zManifestFile);
21122112
blob_reset(&manifest);
21132113
blob_read_from_file(&manifest, zManifestFile);
21142114
free(zManifestFile);
@@ -2138,11 +2138,11 @@
21382138
}
21392139
}
21402140
db_finalize(&q);
21412141
21422142
fossil_print("New_Version: %s\n", zUuid);
2143
- if( outputManifest ){
2143
+ if( outputManifest & MFESTFLG_UUID ){
21442144
zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
21452145
blob_zero(&muuid);
21462146
blob_appendf(&muuid, "%s\n", zUuid);
21472147
blob_write_to_file(&muuid, zManifestFile);
21482148
free(zManifestFile);
@@ -2220,13 +2220,23 @@
22202220
if( dryRunFlag ){
22212221
db_end_transaction(1);
22222222
exit(1);
22232223
}
22242224
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
+ }
22252235
22262236
if( !g.markPrivate ){
22272237
autosync_loop(SYNC_PUSH|SYNC_PULL, db_get_int("autosync-tries", 1));
22282238
}
22292239
if( count_nonbranch_children(vid)>1 ){
22302240
fossil_print("**** warning: a fork has occurred *****\n");
22312241
}
22322242
}
22332243
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button