Fossil SCM
Fix the branch subcommand so that the branch name tags it creates begin with "sym-".
Commit
ce08928aaa684585ccb232ab3fb9801db5b61cd3
Parent
5cc845cfeb32e18…
1 file changed
+6
-11
+6
-11
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -44,11 +44,11 @@ | ||
| 44 | 44 | |
| 45 | 45 | verify_all_options(); |
| 46 | 46 | |
| 47 | 47 | /* fossil branch new name */ |
| 48 | 48 | if( g.argc<3 ){ |
| 49 | - usage("branch new ?-bgcolor COLOR BRANCH-NAME"); | |
| 49 | + usage("branch new ?-bgcolor COLOR? BRANCH-NAME"); | |
| 50 | 50 | } |
| 51 | 51 | zBranch = g.argv[3]; |
| 52 | 52 | if( zBranch==0 || zBranch[0]==0 ){ |
| 53 | 53 | fossil_panic("branch name cannot be empty"); |
| 54 | 54 | } |
| @@ -84,19 +84,14 @@ | ||
| 84 | 84 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 85 | 85 | blob_appendf(&manifest, "P %s\n", zUuid); |
| 86 | 86 | blob_appendf(&manifest, "R %b\n", &cksum1); |
| 87 | 87 | |
| 88 | 88 | if( zColor!=0 ){ |
| 89 | - if( strcmp("bgcolor",zBranch)>=0 ){ | |
| 90 | - blob_appendf(&manifest, "T *%F *\n", zBranch); | |
| 91 | - blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); | |
| 92 | - }else{ | |
| 93 | - blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); | |
| 94 | - blob_appendf(&manifest, "T *%F *\n", zBranch); | |
| 95 | - } | |
| 96 | - }else{ | |
| 97 | - blob_appendf(&manifest, "T *%F *\n", zBranch); | |
| 89 | + blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); | |
| 90 | + blob_appendf(&manifest, "T *sym-%F *\n", zBranch); | |
| 91 | + }else{ | |
| 92 | + blob_appendf(&manifest, "T *sym-%F *\n", zBranch); | |
| 98 | 93 | } |
| 99 | 94 | |
| 100 | 95 | /* Cancel any tags that propagate */ |
| 101 | 96 | db_prepare(&q, |
| 102 | 97 | "SELECT tagname" |
| @@ -169,11 +164,11 @@ | ||
| 169 | 164 | ** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE? |
| 170 | 165 | ** |
| 171 | 166 | ** Run various subcommands on the branches of the open repository or |
| 172 | 167 | ** of the repository identified by the -R or --repository option. |
| 173 | 168 | ** |
| 174 | -** %fossil branch new ?-bgcolor COLOR BRANCH-NAME | |
| 169 | +** %fossil branch new ?-bgcolor COLOR? BRANCH-NAME | |
| 175 | 170 | ** |
| 176 | 171 | ** Create a new branch BRANCH-NAME. You can optionally give |
| 177 | 172 | ** a commit message and branch color. |
| 178 | 173 | ** |
| 179 | 174 | ** %fossil branch list |
| 180 | 175 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -44,11 +44,11 @@ | |
| 44 | |
| 45 | verify_all_options(); |
| 46 | |
| 47 | /* fossil branch new name */ |
| 48 | if( g.argc<3 ){ |
| 49 | usage("branch new ?-bgcolor COLOR BRANCH-NAME"); |
| 50 | } |
| 51 | zBranch = g.argv[3]; |
| 52 | if( zBranch==0 || zBranch[0]==0 ){ |
| 53 | fossil_panic("branch name cannot be empty"); |
| 54 | } |
| @@ -84,19 +84,14 @@ | |
| 84 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 85 | blob_appendf(&manifest, "P %s\n", zUuid); |
| 86 | blob_appendf(&manifest, "R %b\n", &cksum1); |
| 87 | |
| 88 | if( zColor!=0 ){ |
| 89 | if( strcmp("bgcolor",zBranch)>=0 ){ |
| 90 | blob_appendf(&manifest, "T *%F *\n", zBranch); |
| 91 | blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); |
| 92 | }else{ |
| 93 | blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); |
| 94 | blob_appendf(&manifest, "T *%F *\n", zBranch); |
| 95 | } |
| 96 | }else{ |
| 97 | blob_appendf(&manifest, "T *%F *\n", zBranch); |
| 98 | } |
| 99 | |
| 100 | /* Cancel any tags that propagate */ |
| 101 | db_prepare(&q, |
| 102 | "SELECT tagname" |
| @@ -169,11 +164,11 @@ | |
| 169 | ** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE? |
| 170 | ** |
| 171 | ** Run various subcommands on the branches of the open repository or |
| 172 | ** of the repository identified by the -R or --repository option. |
| 173 | ** |
| 174 | ** %fossil branch new ?-bgcolor COLOR BRANCH-NAME |
| 175 | ** |
| 176 | ** Create a new branch BRANCH-NAME. You can optionally give |
| 177 | ** a commit message and branch color. |
| 178 | ** |
| 179 | ** %fossil branch list |
| 180 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -44,11 +44,11 @@ | |
| 44 | |
| 45 | verify_all_options(); |
| 46 | |
| 47 | /* fossil branch new name */ |
| 48 | if( g.argc<3 ){ |
| 49 | usage("branch new ?-bgcolor COLOR? BRANCH-NAME"); |
| 50 | } |
| 51 | zBranch = g.argv[3]; |
| 52 | if( zBranch==0 || zBranch[0]==0 ){ |
| 53 | fossil_panic("branch name cannot be empty"); |
| 54 | } |
| @@ -84,19 +84,14 @@ | |
| 84 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); |
| 85 | blob_appendf(&manifest, "P %s\n", zUuid); |
| 86 | blob_appendf(&manifest, "R %b\n", &cksum1); |
| 87 | |
| 88 | if( zColor!=0 ){ |
| 89 | blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); |
| 90 | blob_appendf(&manifest, "T *sym-%F *\n", zBranch); |
| 91 | }else{ |
| 92 | blob_appendf(&manifest, "T *sym-%F *\n", zBranch); |
| 93 | } |
| 94 | |
| 95 | /* Cancel any tags that propagate */ |
| 96 | db_prepare(&q, |
| 97 | "SELECT tagname" |
| @@ -169,11 +164,11 @@ | |
| 164 | ** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE? |
| 165 | ** |
| 166 | ** Run various subcommands on the branches of the open repository or |
| 167 | ** of the repository identified by the -R or --repository option. |
| 168 | ** |
| 169 | ** %fossil branch new ?-bgcolor COLOR? BRANCH-NAME |
| 170 | ** |
| 171 | ** Create a new branch BRANCH-NAME. You can optionally give |
| 172 | ** a commit message and branch color. |
| 173 | ** |
| 174 | ** %fossil branch list |
| 175 |