Fossil SCM

Use auto-coloring for private branches, instead of applying the orangeish default `#fec084', so colors play better with skins and the `fossil publish' command.

florian 2024-06-18 05:19 trunk merge
Commit ee827465178878d0ffe947d0b89b705a40fd0644d9f200199e21b15c0229fc8a
--- src/branch.c
+++ src/branch.c
@@ -81,18 +81,13 @@
8181
Manifest *pParent; /* Parsed parent manifest */
8282
Blob mcksum; /* Self-checksum on the manifest */
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 */
86
- int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
8786
8887
noSign = find_option("nosign","",0)!=0;
8988
zColor = find_option("bgcolor","c",1);
90
- if( fossil_strncmp(zColor, "auto", 4)==0 ) {
91
- bAutoColor = 1;
92
- zColor = 0;
93
- }
9489
isPrivate = find_option("private",0,0)!=0;
9590
zDateOvrd = find_option("date-override",0,1);
9691
zUserOvrd = find_option("user-override",0,1);
9792
verify_all_options();
9893
if( g.argc<5 ){
@@ -152,11 +147,10 @@
152147
manifest_destroy(pParent);
153148
154149
/* Add the symbolic branch name and the "branch" tag to identify
155150
** this as a new branch */
156151
if( content_is_private(rootid) ) isPrivate = 1;
157
- if( isPrivate && zColor==0 && !bAutoColor) zColor = "#fec084";
158152
if( zColor!=0 ){
159153
blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
160154
}
161155
blob_appendf(&branch, "T *branch * %F\n", zBranch);
162156
blob_appendf(&branch, "T *sym-%F *\n", zBranch);
@@ -665,12 +659,10 @@
665659
** Create a new branch BRANCH-NAME off of check-in BASIS.
666660
**
667661
** Options:
668662
** --private Branch is private (i.e., remains local)
669663
** --bgcolor COLOR Use COLOR instead of automatic background
670
-** ("auto" lets Fossil choose it automatically,
671
-** even for private branches)
672664
** --nosign Do not sign contents on this branch
673665
** --date-override DATE DATE to use instead of 'now'
674666
** --user-override USER USER to use instead of the current default
675667
**
676668
** DATE may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
677669
--- src/branch.c
+++ src/branch.c
@@ -81,18 +81,13 @@
81 Manifest *pParent; /* Parsed parent manifest */
82 Blob mcksum; /* Self-checksum on the manifest */
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 int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
87
88 noSign = find_option("nosign","",0)!=0;
89 zColor = find_option("bgcolor","c",1);
90 if( fossil_strncmp(zColor, "auto", 4)==0 ) {
91 bAutoColor = 1;
92 zColor = 0;
93 }
94 isPrivate = find_option("private",0,0)!=0;
95 zDateOvrd = find_option("date-override",0,1);
96 zUserOvrd = find_option("user-override",0,1);
97 verify_all_options();
98 if( g.argc<5 ){
@@ -152,11 +147,10 @@
152 manifest_destroy(pParent);
153
154 /* Add the symbolic branch name and the "branch" tag to identify
155 ** this as a new branch */
156 if( content_is_private(rootid) ) isPrivate = 1;
157 if( isPrivate && zColor==0 && !bAutoColor) zColor = "#fec084";
158 if( zColor!=0 ){
159 blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
160 }
161 blob_appendf(&branch, "T *branch * %F\n", zBranch);
162 blob_appendf(&branch, "T *sym-%F *\n", zBranch);
@@ -665,12 +659,10 @@
665 ** Create a new branch BRANCH-NAME off of check-in BASIS.
666 **
667 ** Options:
668 ** --private Branch is private (i.e., remains local)
669 ** --bgcolor COLOR Use COLOR instead of automatic background
670 ** ("auto" lets Fossil choose it automatically,
671 ** even for private branches)
672 ** --nosign Do not sign contents on this branch
673 ** --date-override DATE DATE to use instead of 'now'
674 ** --user-override USER USER to use instead of the current default
675 **
676 ** DATE may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
677
--- src/branch.c
+++ src/branch.c
@@ -81,18 +81,13 @@
81 Manifest *pParent; /* Parsed parent manifest */
82 Blob mcksum; /* Self-checksum on the manifest */
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();
93 if( g.argc<5 ){
@@ -152,11 +147,10 @@
147 manifest_destroy(pParent);
148
149 /* Add the symbolic branch name and the "branch" tag to identify
150 ** this as a new branch */
151 if( content_is_private(rootid) ) isPrivate = 1;
 
152 if( zColor!=0 ){
153 blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
154 }
155 blob_appendf(&branch, "T *branch * %F\n", zBranch);
156 blob_appendf(&branch, "T *sym-%F *\n", zBranch);
@@ -665,12 +659,10 @@
659 ** Create a new branch BRANCH-NAME off of check-in BASIS.
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
--- src/branch.c
+++ src/branch.c
@@ -81,18 +81,13 @@
8181
Manifest *pParent; /* Parsed parent manifest */
8282
Blob mcksum; /* Self-checksum on the manifest */
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 */
86
- int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
8786
8887
noSign = find_option("nosign","",0)!=0;
8988
zColor = find_option("bgcolor","c",1);
90
- if( fossil_strncmp(zColor, "auto", 4)==0 ) {
91
- bAutoColor = 1;
92
- zColor = 0;
93
- }
9489
isPrivate = find_option("private",0,0)!=0;
9590
zDateOvrd = find_option("date-override",0,1);
9691
zUserOvrd = find_option("user-override",0,1);
9792
verify_all_options();
9893
if( g.argc<5 ){
@@ -152,11 +147,10 @@
152147
manifest_destroy(pParent);
153148
154149
/* Add the symbolic branch name and the "branch" tag to identify
155150
** this as a new branch */
156151
if( content_is_private(rootid) ) isPrivate = 1;
157
- if( isPrivate && zColor==0 && !bAutoColor) zColor = "#fec084";
158152
if( zColor!=0 ){
159153
blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
160154
}
161155
blob_appendf(&branch, "T *branch * %F\n", zBranch);
162156
blob_appendf(&branch, "T *sym-%F *\n", zBranch);
@@ -665,12 +659,10 @@
665659
** Create a new branch BRANCH-NAME off of check-in BASIS.
666660
**
667661
** Options:
668662
** --private Branch is private (i.e., remains local)
669663
** --bgcolor COLOR Use COLOR instead of automatic background
670
-** ("auto" lets Fossil choose it automatically,
671
-** even for private branches)
672664
** --nosign Do not sign contents on this branch
673665
** --date-override DATE DATE to use instead of 'now'
674666
** --user-override USER USER to use instead of the current default
675667
**
676668
** DATE may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
677669
--- src/branch.c
+++ src/branch.c
@@ -81,18 +81,13 @@
81 Manifest *pParent; /* Parsed parent manifest */
82 Blob mcksum; /* Self-checksum on the manifest */
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 int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
87
88 noSign = find_option("nosign","",0)!=0;
89 zColor = find_option("bgcolor","c",1);
90 if( fossil_strncmp(zColor, "auto", 4)==0 ) {
91 bAutoColor = 1;
92 zColor = 0;
93 }
94 isPrivate = find_option("private",0,0)!=0;
95 zDateOvrd = find_option("date-override",0,1);
96 zUserOvrd = find_option("user-override",0,1);
97 verify_all_options();
98 if( g.argc<5 ){
@@ -152,11 +147,10 @@
152 manifest_destroy(pParent);
153
154 /* Add the symbolic branch name and the "branch" tag to identify
155 ** this as a new branch */
156 if( content_is_private(rootid) ) isPrivate = 1;
157 if( isPrivate && zColor==0 && !bAutoColor) zColor = "#fec084";
158 if( zColor!=0 ){
159 blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
160 }
161 blob_appendf(&branch, "T *branch * %F\n", zBranch);
162 blob_appendf(&branch, "T *sym-%F *\n", zBranch);
@@ -665,12 +659,10 @@
665 ** Create a new branch BRANCH-NAME off of check-in BASIS.
666 **
667 ** Options:
668 ** --private Branch is private (i.e., remains local)
669 ** --bgcolor COLOR Use COLOR instead of automatic background
670 ** ("auto" lets Fossil choose it automatically,
671 ** even for private branches)
672 ** --nosign Do not sign contents on this branch
673 ** --date-override DATE DATE to use instead of 'now'
674 ** --user-override USER USER to use instead of the current default
675 **
676 ** DATE may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
677
--- src/branch.c
+++ src/branch.c
@@ -81,18 +81,13 @@
81 Manifest *pParent; /* Parsed parent manifest */
82 Blob mcksum; /* Self-checksum on the manifest */
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();
93 if( g.argc<5 ){
@@ -152,11 +147,10 @@
147 manifest_destroy(pParent);
148
149 /* Add the symbolic branch name and the "branch" tag to identify
150 ** this as a new branch */
151 if( content_is_private(rootid) ) isPrivate = 1;
 
152 if( zColor!=0 ){
153 blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
154 }
155 blob_appendf(&branch, "T *branch * %F\n", zBranch);
156 blob_appendf(&branch, "T *sym-%F *\n", zBranch);
@@ -665,12 +659,10 @@
659 ** Create a new branch BRANCH-NAME off of check-in BASIS.
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
--- src/checkin.c
+++ src/checkin.c
@@ -2309,12 +2309,10 @@
23092309
** --allow-older Allow a commit older than its ancestor
23102310
** --baseline Use a baseline manifest in the commit process
23112311
** --bgcolor COLOR Apply COLOR to this one check-in only
23122312
** --branch NEW-BRANCH-NAME Check in to this new branch
23132313
** --branchcolor COLOR Apply given COLOR to the branch
2314
-** ("auto" lets Fossil choose it automatically,
2315
-** even for private branches)
23162314
** --close Close the branch being committed
23172315
** --date-override DATETIME DATE to use instead of 'now'
23182316
** --delta Use a delta manifest in the commit process
23192317
** --hash Verify file status using hashing rather
23202318
** than relying on file mtimes
@@ -2393,11 +2391,10 @@
23932391
int nConflict = 0; /* Number of unresolved merge conflicts */
23942392
int abortCommit = 0; /* Abort the commit due to text format conversions */
23952393
Blob ans; /* Answer to continuation prompts */
23962394
char cReply; /* First character of ans */
23972395
int bRecheck = 0; /* Repeat fork and closed-branch checks*/
2398
- int bAutoBrClr = 0; /* Value of "--branchcolor" is "auto" */
23992396
int bIgnoreSkew = 0; /* --ignore-clock-skew flag */
24002397
int mxSize;
24012398
24022399
memset(&sCiInfo, 0, sizeof(sCiInfo));
24032400
url_proxy_options();
@@ -2435,14 +2432,10 @@
24352432
noVerify = find_option("no-verify",0,0)!=0;
24362433
bTrace = find_option("trace",0,0)!=0;
24372434
sCiInfo.zBranch = find_option("branch","b",1);
24382435
sCiInfo.zColor = find_option("bgcolor",0,1);
24392436
sCiInfo.zBrClr = find_option("branchcolor",0,1);
2440
- if ( fossil_strncmp(sCiInfo.zBrClr, "auto", 4)==0 ) {
2441
- bAutoBrClr = 1;
2442
- sCiInfo.zBrClr = 0;
2443
- }
24442437
sCiInfo.closeFlag = find_option("close",0,0)!=0;
24452438
sCiInfo.integrateFlag = find_option("integrate",0,0)!=0;
24462439
sCiInfo.zMimetype = find_option("mimetype",0,1);
24472440
sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0;
24482441
while( (zTag = find_option("tag",0,1))!=0 ){
@@ -2480,13 +2473,10 @@
24802473
if( privateFlag && !privateParent ){
24812474
/* Apply default branch name ("private") and color ("orange") if not
24822475
** specified otherwise on the command-line, and if the parent is not
24832476
** already private. */
24842477
if( sCiInfo.zBranch==0 ) sCiInfo.zBranch = "private";
2485
- if( sCiInfo.zBrClr==0 && sCiInfo.zColor==0 && !bAutoBrClr) {
2486
- sCiInfo.zBrClr = "#fec084";
2487
- }
24882478
}
24892479
24902480
/* Do not allow the creation of a new branch using an existing open
24912481
** branch name unless the --force flag is used */
24922482
if( sCiInfo.zBranch!=0
24932483
--- src/checkin.c
+++ src/checkin.c
@@ -2309,12 +2309,10 @@
2309 ** --allow-older Allow a commit older than its ancestor
2310 ** --baseline Use a baseline manifest in the commit process
2311 ** --bgcolor COLOR Apply COLOR to this one check-in only
2312 ** --branch NEW-BRANCH-NAME Check in to this new branch
2313 ** --branchcolor COLOR Apply given COLOR to the branch
2314 ** ("auto" lets Fossil choose it automatically,
2315 ** even for private branches)
2316 ** --close Close the branch being committed
2317 ** --date-override DATETIME DATE to use instead of 'now'
2318 ** --delta Use a delta manifest in the commit process
2319 ** --hash Verify file status using hashing rather
2320 ** than relying on file mtimes
@@ -2393,11 +2391,10 @@
2393 int nConflict = 0; /* Number of unresolved merge conflicts */
2394 int abortCommit = 0; /* Abort the commit due to text format conversions */
2395 Blob ans; /* Answer to continuation prompts */
2396 char cReply; /* First character of ans */
2397 int bRecheck = 0; /* Repeat fork and closed-branch checks*/
2398 int bAutoBrClr = 0; /* Value of "--branchcolor" is "auto" */
2399 int bIgnoreSkew = 0; /* --ignore-clock-skew flag */
2400 int mxSize;
2401
2402 memset(&sCiInfo, 0, sizeof(sCiInfo));
2403 url_proxy_options();
@@ -2435,14 +2432,10 @@
2435 noVerify = find_option("no-verify",0,0)!=0;
2436 bTrace = find_option("trace",0,0)!=0;
2437 sCiInfo.zBranch = find_option("branch","b",1);
2438 sCiInfo.zColor = find_option("bgcolor",0,1);
2439 sCiInfo.zBrClr = find_option("branchcolor",0,1);
2440 if ( fossil_strncmp(sCiInfo.zBrClr, "auto", 4)==0 ) {
2441 bAutoBrClr = 1;
2442 sCiInfo.zBrClr = 0;
2443 }
2444 sCiInfo.closeFlag = find_option("close",0,0)!=0;
2445 sCiInfo.integrateFlag = find_option("integrate",0,0)!=0;
2446 sCiInfo.zMimetype = find_option("mimetype",0,1);
2447 sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0;
2448 while( (zTag = find_option("tag",0,1))!=0 ){
@@ -2480,13 +2473,10 @@
2480 if( privateFlag && !privateParent ){
2481 /* Apply default branch name ("private") and color ("orange") if not
2482 ** specified otherwise on the command-line, and if the parent is not
2483 ** already private. */
2484 if( sCiInfo.zBranch==0 ) sCiInfo.zBranch = "private";
2485 if( sCiInfo.zBrClr==0 && sCiInfo.zColor==0 && !bAutoBrClr) {
2486 sCiInfo.zBrClr = "#fec084";
2487 }
2488 }
2489
2490 /* Do not allow the creation of a new branch using an existing open
2491 ** branch name unless the --force flag is used */
2492 if( sCiInfo.zBranch!=0
2493
--- src/checkin.c
+++ src/checkin.c
@@ -2309,12 +2309,10 @@
2309 ** --allow-older Allow a commit older than its ancestor
2310 ** --baseline Use a baseline manifest in the commit process
2311 ** --bgcolor COLOR Apply COLOR to this one check-in only
2312 ** --branch NEW-BRANCH-NAME Check in to this new branch
2313 ** --branchcolor COLOR Apply given COLOR to the branch
 
 
2314 ** --close Close the branch being committed
2315 ** --date-override DATETIME DATE to use instead of 'now'
2316 ** --delta Use a delta manifest in the commit process
2317 ** --hash Verify file status using hashing rather
2318 ** than relying on file mtimes
@@ -2393,11 +2391,10 @@
2391 int nConflict = 0; /* Number of unresolved merge conflicts */
2392 int abortCommit = 0; /* Abort the commit due to text format conversions */
2393 Blob ans; /* Answer to continuation prompts */
2394 char cReply; /* First character of ans */
2395 int bRecheck = 0; /* Repeat fork and closed-branch checks*/
 
2396 int bIgnoreSkew = 0; /* --ignore-clock-skew flag */
2397 int mxSize;
2398
2399 memset(&sCiInfo, 0, sizeof(sCiInfo));
2400 url_proxy_options();
@@ -2435,14 +2432,10 @@
2432 noVerify = find_option("no-verify",0,0)!=0;
2433 bTrace = find_option("trace",0,0)!=0;
2434 sCiInfo.zBranch = find_option("branch","b",1);
2435 sCiInfo.zColor = find_option("bgcolor",0,1);
2436 sCiInfo.zBrClr = find_option("branchcolor",0,1);
 
 
 
 
2437 sCiInfo.closeFlag = find_option("close",0,0)!=0;
2438 sCiInfo.integrateFlag = find_option("integrate",0,0)!=0;
2439 sCiInfo.zMimetype = find_option("mimetype",0,1);
2440 sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0;
2441 while( (zTag = find_option("tag",0,1))!=0 ){
@@ -2480,13 +2473,10 @@
2473 if( privateFlag && !privateParent ){
2474 /* Apply default branch name ("private") and color ("orange") if not
2475 ** specified otherwise on the command-line, and if the parent is not
2476 ** already private. */
2477 if( sCiInfo.zBranch==0 ) sCiInfo.zBranch = "private";
 
 
 
2478 }
2479
2480 /* Do not allow the creation of a new branch using an existing open
2481 ** branch name unless the --force flag is used */
2482 if( sCiInfo.zBranch!=0
2483
--- src/checkin.c
+++ src/checkin.c
@@ -2309,12 +2309,10 @@
23092309
** --allow-older Allow a commit older than its ancestor
23102310
** --baseline Use a baseline manifest in the commit process
23112311
** --bgcolor COLOR Apply COLOR to this one check-in only
23122312
** --branch NEW-BRANCH-NAME Check in to this new branch
23132313
** --branchcolor COLOR Apply given COLOR to the branch
2314
-** ("auto" lets Fossil choose it automatically,
2315
-** even for private branches)
23162314
** --close Close the branch being committed
23172315
** --date-override DATETIME DATE to use instead of 'now'
23182316
** --delta Use a delta manifest in the commit process
23192317
** --hash Verify file status using hashing rather
23202318
** than relying on file mtimes
@@ -2393,11 +2391,10 @@
23932391
int nConflict = 0; /* Number of unresolved merge conflicts */
23942392
int abortCommit = 0; /* Abort the commit due to text format conversions */
23952393
Blob ans; /* Answer to continuation prompts */
23962394
char cReply; /* First character of ans */
23972395
int bRecheck = 0; /* Repeat fork and closed-branch checks*/
2398
- int bAutoBrClr = 0; /* Value of "--branchcolor" is "auto" */
23992396
int bIgnoreSkew = 0; /* --ignore-clock-skew flag */
24002397
int mxSize;
24012398
24022399
memset(&sCiInfo, 0, sizeof(sCiInfo));
24032400
url_proxy_options();
@@ -2435,14 +2432,10 @@
24352432
noVerify = find_option("no-verify",0,0)!=0;
24362433
bTrace = find_option("trace",0,0)!=0;
24372434
sCiInfo.zBranch = find_option("branch","b",1);
24382435
sCiInfo.zColor = find_option("bgcolor",0,1);
24392436
sCiInfo.zBrClr = find_option("branchcolor",0,1);
2440
- if ( fossil_strncmp(sCiInfo.zBrClr, "auto", 4)==0 ) {
2441
- bAutoBrClr = 1;
2442
- sCiInfo.zBrClr = 0;
2443
- }
24442437
sCiInfo.closeFlag = find_option("close",0,0)!=0;
24452438
sCiInfo.integrateFlag = find_option("integrate",0,0)!=0;
24462439
sCiInfo.zMimetype = find_option("mimetype",0,1);
24472440
sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0;
24482441
while( (zTag = find_option("tag",0,1))!=0 ){
@@ -2480,13 +2473,10 @@
24802473
if( privateFlag && !privateParent ){
24812474
/* Apply default branch name ("private") and color ("orange") if not
24822475
** specified otherwise on the command-line, and if the parent is not
24832476
** already private. */
24842477
if( sCiInfo.zBranch==0 ) sCiInfo.zBranch = "private";
2485
- if( sCiInfo.zBrClr==0 && sCiInfo.zColor==0 && !bAutoBrClr) {
2486
- sCiInfo.zBrClr = "#fec084";
2487
- }
24882478
}
24892479
24902480
/* Do not allow the creation of a new branch using an existing open
24912481
** branch name unless the --force flag is used */
24922482
if( sCiInfo.zBranch!=0
24932483
--- src/checkin.c
+++ src/checkin.c
@@ -2309,12 +2309,10 @@
2309 ** --allow-older Allow a commit older than its ancestor
2310 ** --baseline Use a baseline manifest in the commit process
2311 ** --bgcolor COLOR Apply COLOR to this one check-in only
2312 ** --branch NEW-BRANCH-NAME Check in to this new branch
2313 ** --branchcolor COLOR Apply given COLOR to the branch
2314 ** ("auto" lets Fossil choose it automatically,
2315 ** even for private branches)
2316 ** --close Close the branch being committed
2317 ** --date-override DATETIME DATE to use instead of 'now'
2318 ** --delta Use a delta manifest in the commit process
2319 ** --hash Verify file status using hashing rather
2320 ** than relying on file mtimes
@@ -2393,11 +2391,10 @@
2393 int nConflict = 0; /* Number of unresolved merge conflicts */
2394 int abortCommit = 0; /* Abort the commit due to text format conversions */
2395 Blob ans; /* Answer to continuation prompts */
2396 char cReply; /* First character of ans */
2397 int bRecheck = 0; /* Repeat fork and closed-branch checks*/
2398 int bAutoBrClr = 0; /* Value of "--branchcolor" is "auto" */
2399 int bIgnoreSkew = 0; /* --ignore-clock-skew flag */
2400 int mxSize;
2401
2402 memset(&sCiInfo, 0, sizeof(sCiInfo));
2403 url_proxy_options();
@@ -2435,14 +2432,10 @@
2435 noVerify = find_option("no-verify",0,0)!=0;
2436 bTrace = find_option("trace",0,0)!=0;
2437 sCiInfo.zBranch = find_option("branch","b",1);
2438 sCiInfo.zColor = find_option("bgcolor",0,1);
2439 sCiInfo.zBrClr = find_option("branchcolor",0,1);
2440 if ( fossil_strncmp(sCiInfo.zBrClr, "auto", 4)==0 ) {
2441 bAutoBrClr = 1;
2442 sCiInfo.zBrClr = 0;
2443 }
2444 sCiInfo.closeFlag = find_option("close",0,0)!=0;
2445 sCiInfo.integrateFlag = find_option("integrate",0,0)!=0;
2446 sCiInfo.zMimetype = find_option("mimetype",0,1);
2447 sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0;
2448 while( (zTag = find_option("tag",0,1))!=0 ){
@@ -2480,13 +2473,10 @@
2480 if( privateFlag && !privateParent ){
2481 /* Apply default branch name ("private") and color ("orange") if not
2482 ** specified otherwise on the command-line, and if the parent is not
2483 ** already private. */
2484 if( sCiInfo.zBranch==0 ) sCiInfo.zBranch = "private";
2485 if( sCiInfo.zBrClr==0 && sCiInfo.zColor==0 && !bAutoBrClr) {
2486 sCiInfo.zBrClr = "#fec084";
2487 }
2488 }
2489
2490 /* Do not allow the creation of a new branch using an existing open
2491 ** branch name unless the --force flag is used */
2492 if( sCiInfo.zBranch!=0
2493
--- src/checkin.c
+++ src/checkin.c
@@ -2309,12 +2309,10 @@
2309 ** --allow-older Allow a commit older than its ancestor
2310 ** --baseline Use a baseline manifest in the commit process
2311 ** --bgcolor COLOR Apply COLOR to this one check-in only
2312 ** --branch NEW-BRANCH-NAME Check in to this new branch
2313 ** --branchcolor COLOR Apply given COLOR to the branch
 
 
2314 ** --close Close the branch being committed
2315 ** --date-override DATETIME DATE to use instead of 'now'
2316 ** --delta Use a delta manifest in the commit process
2317 ** --hash Verify file status using hashing rather
2318 ** than relying on file mtimes
@@ -2393,11 +2391,10 @@
2391 int nConflict = 0; /* Number of unresolved merge conflicts */
2392 int abortCommit = 0; /* Abort the commit due to text format conversions */
2393 Blob ans; /* Answer to continuation prompts */
2394 char cReply; /* First character of ans */
2395 int bRecheck = 0; /* Repeat fork and closed-branch checks*/
 
2396 int bIgnoreSkew = 0; /* --ignore-clock-skew flag */
2397 int mxSize;
2398
2399 memset(&sCiInfo, 0, sizeof(sCiInfo));
2400 url_proxy_options();
@@ -2435,14 +2432,10 @@
2432 noVerify = find_option("no-verify",0,0)!=0;
2433 bTrace = find_option("trace",0,0)!=0;
2434 sCiInfo.zBranch = find_option("branch","b",1);
2435 sCiInfo.zColor = find_option("bgcolor",0,1);
2436 sCiInfo.zBrClr = find_option("branchcolor",0,1);
 
 
 
 
2437 sCiInfo.closeFlag = find_option("close",0,0)!=0;
2438 sCiInfo.integrateFlag = find_option("integrate",0,0)!=0;
2439 sCiInfo.zMimetype = find_option("mimetype",0,1);
2440 sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0;
2441 while( (zTag = find_option("tag",0,1))!=0 ){
@@ -2480,13 +2473,10 @@
2473 if( privateFlag && !privateParent ){
2474 /* Apply default branch name ("private") and color ("orange") if not
2475 ** specified otherwise on the command-line, and if the parent is not
2476 ** already private. */
2477 if( sCiInfo.zBranch==0 ) sCiInfo.zBranch = "private";
 
 
 
2478 }
2479
2480 /* Do not allow the creation of a new branch using an existing open
2481 ** branch name unless the --force flag is used */
2482 if( sCiInfo.zBranch!=0
2483
--- src/json_branch.c
+++ src/json_branch.c
@@ -197,16 +197,11 @@
197197
char *zDate; /* Date that branch was created */
198198
char *zComment; /* Check-in comment for the new branch */
199199
Blob branch; /* manifest for the new branch */
200200
Manifest *pParent; /* Parsed parent manifest */
201201
Blob mcksum; /* Self-checksum on the manifest */
202
- int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
203202
204
- if( fossil_strncmp(zColor, "auto", 4)==0 ) {
205
- bAutoColor = 1;
206
- zColor = 0;
207
- }
208203
/* fossil branch new name */
209204
if( zBranch==0 || zBranch[0]==0 ){
210205
zOpt->rcErrMsg = "Branch name may not be null/empty.";
211206
return FSL_JSON_E_INVALID_ARGS;
212207
}
@@ -265,11 +260,10 @@
265260
manifest_destroy(pParent);
266261
267262
/* Add the symbolic branch name and the "branch" tag to identify
268263
** this as a new branch */
269264
if( content_is_private(rootid) ) zOpt->isPrivate = 1;
270
- if( zOpt->isPrivate && zColor==0 && !bAutoColor) zColor = "#fec084";
271265
if( zColor!=0 ){
272266
blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
273267
}
274268
blob_appendf(&branch, "T *branch * %F\n", zBranch);
275269
blob_appendf(&branch, "T *sym-%F *\n", zBranch);
276270
--- src/json_branch.c
+++ src/json_branch.c
@@ -197,16 +197,11 @@
197 char *zDate; /* Date that branch was created */
198 char *zComment; /* Check-in comment for the new branch */
199 Blob branch; /* manifest for the new branch */
200 Manifest *pParent; /* Parsed parent manifest */
201 Blob mcksum; /* Self-checksum on the manifest */
202 int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
203
204 if( fossil_strncmp(zColor, "auto", 4)==0 ) {
205 bAutoColor = 1;
206 zColor = 0;
207 }
208 /* fossil branch new name */
209 if( zBranch==0 || zBranch[0]==0 ){
210 zOpt->rcErrMsg = "Branch name may not be null/empty.";
211 return FSL_JSON_E_INVALID_ARGS;
212 }
@@ -265,11 +260,10 @@
265 manifest_destroy(pParent);
266
267 /* Add the symbolic branch name and the "branch" tag to identify
268 ** this as a new branch */
269 if( content_is_private(rootid) ) zOpt->isPrivate = 1;
270 if( zOpt->isPrivate && zColor==0 && !bAutoColor) zColor = "#fec084";
271 if( zColor!=0 ){
272 blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
273 }
274 blob_appendf(&branch, "T *branch * %F\n", zBranch);
275 blob_appendf(&branch, "T *sym-%F *\n", zBranch);
276
--- src/json_branch.c
+++ src/json_branch.c
@@ -197,16 +197,11 @@
197 char *zDate; /* Date that branch was created */
198 char *zComment; /* Check-in comment for the new branch */
199 Blob branch; /* manifest for the new branch */
200 Manifest *pParent; /* Parsed parent manifest */
201 Blob mcksum; /* Self-checksum on the manifest */
 
202
 
 
 
 
203 /* fossil branch new name */
204 if( zBranch==0 || zBranch[0]==0 ){
205 zOpt->rcErrMsg = "Branch name may not be null/empty.";
206 return FSL_JSON_E_INVALID_ARGS;
207 }
@@ -265,11 +260,10 @@
260 manifest_destroy(pParent);
261
262 /* Add the symbolic branch name and the "branch" tag to identify
263 ** this as a new branch */
264 if( content_is_private(rootid) ) zOpt->isPrivate = 1;
 
265 if( zColor!=0 ){
266 blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
267 }
268 blob_appendf(&branch, "T *branch * %F\n", zBranch);
269 blob_appendf(&branch, "T *sym-%F *\n", zBranch);
270
--- src/json_branch.c
+++ src/json_branch.c
@@ -197,16 +197,11 @@
197197
char *zDate; /* Date that branch was created */
198198
char *zComment; /* Check-in comment for the new branch */
199199
Blob branch; /* manifest for the new branch */
200200
Manifest *pParent; /* Parsed parent manifest */
201201
Blob mcksum; /* Self-checksum on the manifest */
202
- int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
203202
204
- if( fossil_strncmp(zColor, "auto", 4)==0 ) {
205
- bAutoColor = 1;
206
- zColor = 0;
207
- }
208203
/* fossil branch new name */
209204
if( zBranch==0 || zBranch[0]==0 ){
210205
zOpt->rcErrMsg = "Branch name may not be null/empty.";
211206
return FSL_JSON_E_INVALID_ARGS;
212207
}
@@ -265,11 +260,10 @@
265260
manifest_destroy(pParent);
266261
267262
/* Add the symbolic branch name and the "branch" tag to identify
268263
** this as a new branch */
269264
if( content_is_private(rootid) ) zOpt->isPrivate = 1;
270
- if( zOpt->isPrivate && zColor==0 && !bAutoColor) zColor = "#fec084";
271265
if( zColor!=0 ){
272266
blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
273267
}
274268
blob_appendf(&branch, "T *branch * %F\n", zBranch);
275269
blob_appendf(&branch, "T *sym-%F *\n", zBranch);
276270
--- src/json_branch.c
+++ src/json_branch.c
@@ -197,16 +197,11 @@
197 char *zDate; /* Date that branch was created */
198 char *zComment; /* Check-in comment for the new branch */
199 Blob branch; /* manifest for the new branch */
200 Manifest *pParent; /* Parsed parent manifest */
201 Blob mcksum; /* Self-checksum on the manifest */
202 int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */
203
204 if( fossil_strncmp(zColor, "auto", 4)==0 ) {
205 bAutoColor = 1;
206 zColor = 0;
207 }
208 /* fossil branch new name */
209 if( zBranch==0 || zBranch[0]==0 ){
210 zOpt->rcErrMsg = "Branch name may not be null/empty.";
211 return FSL_JSON_E_INVALID_ARGS;
212 }
@@ -265,11 +260,10 @@
265 manifest_destroy(pParent);
266
267 /* Add the symbolic branch name and the "branch" tag to identify
268 ** this as a new branch */
269 if( content_is_private(rootid) ) zOpt->isPrivate = 1;
270 if( zOpt->isPrivate && zColor==0 && !bAutoColor) zColor = "#fec084";
271 if( zColor!=0 ){
272 blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
273 }
274 blob_appendf(&branch, "T *branch * %F\n", zBranch);
275 blob_appendf(&branch, "T *sym-%F *\n", zBranch);
276
--- src/json_branch.c
+++ src/json_branch.c
@@ -197,16 +197,11 @@
197 char *zDate; /* Date that branch was created */
198 char *zComment; /* Check-in comment for the new branch */
199 Blob branch; /* manifest for the new branch */
200 Manifest *pParent; /* Parsed parent manifest */
201 Blob mcksum; /* Self-checksum on the manifest */
 
202
 
 
 
 
203 /* fossil branch new name */
204 if( zBranch==0 || zBranch[0]==0 ){
205 zOpt->rcErrMsg = "Branch name may not be null/empty.";
206 return FSL_JSON_E_INVALID_ARGS;
207 }
@@ -265,11 +260,10 @@
260 manifest_destroy(pParent);
261
262 /* Add the symbolic branch name and the "branch" tag to identify
263 ** this as a new branch */
264 if( content_is_private(rootid) ) zOpt->isPrivate = 1;
 
265 if( zColor!=0 ){
266 blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
267 }
268 blob_appendf(&branch, "T *branch * %F\n", zBranch);
269 blob_appendf(&branch, "T *sym-%F *\n", zBranch);
270

Keyboard Shortcuts

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