42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
-
+
|
noSign = db_get_int("omitsign", 0)|noSign;
zColor = find_option("bgcolor","c",1);
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");
}
user_select();
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
-
-
-
+
-
-
-
+
-
-
+
|
db_finalize(&q);
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);
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 *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"
" FROM tagxref JOIN tag ON tagxref.tagid=tag.tagid"
" WHERE rid=%d AND tagtype=2", vid);
|
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
-
+
|
** COMMAND: branch
**
** 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
**
** List all branches
|