Fossil SCM

Add the --nosync option to commands "commit", "merge", and "branch create". See [forum:/forumpost/592513119fdae69c|forum thread 592513119fdae69c].

drh 2024-07-19 12:53 trunk
Commit e8a21ab43c775a670957bb21c02b826368bedfc8d218fcf95955eebb4f0c5dcf
--- src/branch.c
+++ src/branch.c
@@ -83,10 +83,11 @@
8383
const char *zDateOvrd; /* Override date string */
8484
const char *zUserOvrd; /* Override user name */
8585
int isPrivate = 0; /* True if the branch should be private */
8686
8787
noSign = find_option("nosign","",0)!=0;
88
+ if( find_option("nosync",0,0) ) g.fNoSync = 1;
8889
zColor = find_option("bgcolor","c",1);
8990
isPrivate = find_option("private",0,0)!=0;
9091
zDateOvrd = find_option("date-override",0,1);
9192
zUserOvrd = find_option("user-override",0,1);
9293
verify_all_options();
@@ -660,10 +661,11 @@
660661
**
661662
** Options:
662663
** --private Branch is private (i.e., remains local)
663664
** --bgcolor COLOR Use COLOR instead of automatic background
664665
** --nosign Do not sign contents on this branch
666
+** --nosync Do not auto-sync prior to creating the branch
665667
** --date-override DATE DATE to use instead of 'now'
666668
** --user-override USER USER to use instead of the current default
667669
**
668670
** DATE may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
669671
** year-month-day form, it may be truncated, the "T" may be
670672
--- src/branch.c
+++ src/branch.c
@@ -83,10 +83,11 @@
83 const char *zDateOvrd; /* Override date string */
84 const char *zUserOvrd; /* Override user name */
85 int isPrivate = 0; /* True if the branch should be private */
86
87 noSign = find_option("nosign","",0)!=0;
 
88 zColor = find_option("bgcolor","c",1);
89 isPrivate = find_option("private",0,0)!=0;
90 zDateOvrd = find_option("date-override",0,1);
91 zUserOvrd = find_option("user-override",0,1);
92 verify_all_options();
@@ -660,10 +661,11 @@
660 **
661 ** Options:
662 ** --private Branch is private (i.e., remains local)
663 ** --bgcolor COLOR Use COLOR instead of automatic background
664 ** --nosign Do not sign contents on this branch
 
665 ** --date-override DATE DATE to use instead of 'now'
666 ** --user-override USER USER to use instead of the current default
667 **
668 ** DATE may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
669 ** year-month-day form, it may be truncated, the "T" may be
670
--- src/branch.c
+++ src/branch.c
@@ -83,10 +83,11 @@
83 const char *zDateOvrd; /* Override date string */
84 const char *zUserOvrd; /* Override user name */
85 int isPrivate = 0; /* True if the branch should be private */
86
87 noSign = find_option("nosign","",0)!=0;
88 if( find_option("nosync",0,0) ) g.fNoSync = 1;
89 zColor = find_option("bgcolor","c",1);
90 isPrivate = find_option("private",0,0)!=0;
91 zDateOvrd = find_option("date-override",0,1);
92 zUserOvrd = find_option("user-override",0,1);
93 verify_all_options();
@@ -660,10 +661,11 @@
661 **
662 ** Options:
663 ** --private Branch is private (i.e., remains local)
664 ** --bgcolor COLOR Use COLOR instead of automatic background
665 ** --nosign Do not sign contents on this branch
666 ** --nosync Do not auto-sync prior to creating the branch
667 ** --date-override DATE DATE to use instead of 'now'
668 ** --user-override USER USER to use instead of the current default
669 **
670 ** DATE may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
671 ** year-month-day form, it may be truncated, the "T" may be
672
--- src/checkin.c
+++ src/checkin.c
@@ -2332,10 +2332,11 @@
23322332
** input and assumes an answer of 'No' for every
23332333
** question.
23342334
** --no-warnings Omit all warnings about file contents
23352335
** --no-verify Do not run before-commit hooks
23362336
** --nosign Do not attempt to sign this commit with gpg
2337
+** --nosync Do not auto-sync prior to committing
23372338
** --override-lock Allow a check-in even though parent is locked
23382339
** --private Do not sync changes and their descendants
23392340
** --tag TAG-NAME Assign given tag TAG-NAME to the check-in
23402341
** --trace Debug tracing
23412342
** --user-override USER USER to use instead of the current default
@@ -2400,10 +2401,11 @@
24002401
memset(&sCiInfo, 0, sizeof(sCiInfo));
24012402
url_proxy_options();
24022403
/* --sha1sum is an undocumented alias for --hash for backwards compatiblity */
24032404
useHash = find_option("hash",0,0)!=0 || find_option("sha1sum",0,0)!=0;
24042405
noSign = find_option("nosign",0,0)!=0;
2406
+ if( find_option("nosync",0,0) ) g.fNoSync = 1;
24052407
privateFlag = find_option("private",0,0)!=0;
24062408
forceDelta = find_option("delta",0,0)!=0;
24072409
forceBaseline = find_option("baseline",0,0)!=0;
24082410
db_must_be_within_tree();
24092411
if( db_get_boolean("dont-commit",0) ){
24102412
--- src/checkin.c
+++ src/checkin.c
@@ -2332,10 +2332,11 @@
2332 ** input and assumes an answer of 'No' for every
2333 ** question.
2334 ** --no-warnings Omit all warnings about file contents
2335 ** --no-verify Do not run before-commit hooks
2336 ** --nosign Do not attempt to sign this commit with gpg
 
2337 ** --override-lock Allow a check-in even though parent is locked
2338 ** --private Do not sync changes and their descendants
2339 ** --tag TAG-NAME Assign given tag TAG-NAME to the check-in
2340 ** --trace Debug tracing
2341 ** --user-override USER USER to use instead of the current default
@@ -2400,10 +2401,11 @@
2400 memset(&sCiInfo, 0, sizeof(sCiInfo));
2401 url_proxy_options();
2402 /* --sha1sum is an undocumented alias for --hash for backwards compatiblity */
2403 useHash = find_option("hash",0,0)!=0 || find_option("sha1sum",0,0)!=0;
2404 noSign = find_option("nosign",0,0)!=0;
 
2405 privateFlag = find_option("private",0,0)!=0;
2406 forceDelta = find_option("delta",0,0)!=0;
2407 forceBaseline = find_option("baseline",0,0)!=0;
2408 db_must_be_within_tree();
2409 if( db_get_boolean("dont-commit",0) ){
2410
--- src/checkin.c
+++ src/checkin.c
@@ -2332,10 +2332,11 @@
2332 ** input and assumes an answer of 'No' for every
2333 ** question.
2334 ** --no-warnings Omit all warnings about file contents
2335 ** --no-verify Do not run before-commit hooks
2336 ** --nosign Do not attempt to sign this commit with gpg
2337 ** --nosync Do not auto-sync prior to committing
2338 ** --override-lock Allow a check-in even though parent is locked
2339 ** --private Do not sync changes and their descendants
2340 ** --tag TAG-NAME Assign given tag TAG-NAME to the check-in
2341 ** --trace Debug tracing
2342 ** --user-override USER USER to use instead of the current default
@@ -2400,10 +2401,11 @@
2401 memset(&sCiInfo, 0, sizeof(sCiInfo));
2402 url_proxy_options();
2403 /* --sha1sum is an undocumented alias for --hash for backwards compatiblity */
2404 useHash = find_option("hash",0,0)!=0 || find_option("sha1sum",0,0)!=0;
2405 noSign = find_option("nosign",0,0)!=0;
2406 if( find_option("nosync",0,0) ) g.fNoSync = 1;
2407 privateFlag = find_option("private",0,0)!=0;
2408 forceDelta = find_option("delta",0,0)!=0;
2409 forceBaseline = find_option("baseline",0,0)!=0;
2410 db_must_be_within_tree();
2411 if( db_get_boolean("dont-commit",0) ){
2412
--- src/merge.c
+++ src/merge.c
@@ -321,10 +321,11 @@
321321
** --integrate Merged branch will be closed when committing
322322
** -K|--keep-merge-files On merge conflict, retain the temporary files
323323
** used for merging, named *-baseline, *-original,
324324
** and *-merge.
325325
** -n|--dry-run If given, display instead of run actions
326
+** --nosync Do not auto-sync prior to merging
326327
** -v|--verbose Show additional details of the merge
327328
*/
328329
void merge_cmd(void){
329330
int vid; /* Current version "V" */
330331
int mid; /* Version we are merging from "M" */
@@ -374,10 +375,11 @@
374375
zBinGlob = find_option("binary",0,1);
375376
dryRunFlag = find_option("dry-run","n",0)!=0;
376377
if( !dryRunFlag ){
377378
dryRunFlag = find_option("nochange",0,0)!=0; /* deprecated */
378379
}
380
+ if( find_option("nosync",0,0) ) g.fNoSync = 1;
379381
forceFlag = find_option("force","f",0)!=0;
380382
zPivot = find_option("baseline",0,1);
381383
keepMergeFlag = find_option("keep-merge-files", "K",0)!=0;
382384
383385
/* Undocumented --debug and --show-vfile options:
384386
--- src/merge.c
+++ src/merge.c
@@ -321,10 +321,11 @@
321 ** --integrate Merged branch will be closed when committing
322 ** -K|--keep-merge-files On merge conflict, retain the temporary files
323 ** used for merging, named *-baseline, *-original,
324 ** and *-merge.
325 ** -n|--dry-run If given, display instead of run actions
 
326 ** -v|--verbose Show additional details of the merge
327 */
328 void merge_cmd(void){
329 int vid; /* Current version "V" */
330 int mid; /* Version we are merging from "M" */
@@ -374,10 +375,11 @@
374 zBinGlob = find_option("binary",0,1);
375 dryRunFlag = find_option("dry-run","n",0)!=0;
376 if( !dryRunFlag ){
377 dryRunFlag = find_option("nochange",0,0)!=0; /* deprecated */
378 }
 
379 forceFlag = find_option("force","f",0)!=0;
380 zPivot = find_option("baseline",0,1);
381 keepMergeFlag = find_option("keep-merge-files", "K",0)!=0;
382
383 /* Undocumented --debug and --show-vfile options:
384
--- src/merge.c
+++ src/merge.c
@@ -321,10 +321,11 @@
321 ** --integrate Merged branch will be closed when committing
322 ** -K|--keep-merge-files On merge conflict, retain the temporary files
323 ** used for merging, named *-baseline, *-original,
324 ** and *-merge.
325 ** -n|--dry-run If given, display instead of run actions
326 ** --nosync Do not auto-sync prior to merging
327 ** -v|--verbose Show additional details of the merge
328 */
329 void merge_cmd(void){
330 int vid; /* Current version "V" */
331 int mid; /* Version we are merging from "M" */
@@ -374,10 +375,11 @@
375 zBinGlob = find_option("binary",0,1);
376 dryRunFlag = find_option("dry-run","n",0)!=0;
377 if( !dryRunFlag ){
378 dryRunFlag = find_option("nochange",0,0)!=0; /* deprecated */
379 }
380 if( find_option("nosync",0,0) ) g.fNoSync = 1;
381 forceFlag = find_option("force","f",0)!=0;
382 zPivot = find_option("baseline",0,1);
383 keepMergeFlag = find_option("keep-merge-files", "K",0)!=0;
384
385 /* Undocumented --debug and --show-vfile options:
386

Keyboard Shortcuts

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