Overview
SHA1 Hash: | ce08928aaa684585ccb232ab3fb9801db5b61cd3 |
---|---|
Date: | 2008-02-08 21:50:31 |
User: | drh |
Comment: | Fix the branch subcommand so that the branch name tags it creates begin with "sym-". |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/branch.c from [b16668e4cd] to [40033fd3ad].
@@ -44,11 +44,11 @@ verify_all_options(); /* fossil branch new name */ if( g.argc<3 ){ - usage("branch new ?-bgcolor COLOR BRANCH-NAME"); + usage("branch new ?-bgcolor COLOR? BRANCH-NAME"); } zBranch = g.argv[3]; if( zBranch==0 || zBranch[0]==0 ){ fossil_panic("branch name cannot be empty"); } @@ -84,19 +84,14 @@ zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", vid); blob_appendf(&manifest, "P %s\n", zUuid); blob_appendf(&manifest, "R %b\n", &cksum1); if( zColor!=0 ){ - if( strcmp("bgcolor",zBranch)>=0 ){ - blob_appendf(&manifest, "T *%F *\n", zBranch); - blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); - }else{ - blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); - blob_appendf(&manifest, "T *%F *\n", zBranch); - } + blob_appendf(&manifest, "T *bgcolor * %F\n", zColor); + blob_appendf(&manifest, "T *sym-%F *\n", zBranch); }else{ - blob_appendf(&manifest, "T *%F *\n", zBranch); + blob_appendf(&manifest, "T *sym-%F *\n", zBranch); } /* Cancel any tags that propagate */ db_prepare(&q, "SELECT tagname" @@ -169,11 +164,11 @@ ** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE? ** ** Run various subcommands on the branches of the open repository or ** of the repository identified by the -R or --repository option. ** -** %fossil branch new ?-bgcolor COLOR BRANCH-NAME +** %fossil branch new ?-bgcolor COLOR? BRANCH-NAME ** ** Create a new branch BRANCH-NAME. You can optionally give ** a commit message and branch color. ** ** %fossil branch list