Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add the --private option to the "fossil branch new" command. Give a default orange color to private branches created by "fossil branch new". If the new branch created by "fossil branch new" is off of a private branch, make the new branch private too. Ticket [e24ec32b1da5f8f5e4abe] |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
2b3378169443a20446b360e93a3d834d |
| User & Date: | drh 2011-03-26 12:53:45.847 |
References
|
2011-09-08
| ||
| 20:47 | • Fixed ticket [950a80de55]: "branch --private" option plus 2 other changes ... (artifact: 5a0176d6f6 user: dmitry) | |
Context
|
2011-03-27
| ||
| 21:53 | Fix typos in the FAQ. ... (check-in: 4fe9a37e90 user: drh tags: trunk) | |
|
2011-03-26
| ||
| 12:53 | Add the --private option to the "fossil branch new" command. Give a default orange color to private branches created by "fossil branch new". If the new branch created by "fossil branch new" is off of a private branch, make the new branch private too. Ticket [e24ec32b1da5f8f5e4abe] ... (check-in: 2b33781694 user: drh tags: trunk) | |
|
2011-03-25
| ||
| 02:55 | Move vfile_check_signature into "finfo --status" branch. The other options don't use it and it involves a lot of IO. ... (check-in: ae84e6c7d1 user: joerg tags: trunk) | |
Changes
Changes to src/branch.c.
| ︙ | ︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
char *zComment; /* Check-in comment for the new branch */
const char *zColor; /* Color of the new branch */
Blob branch; /* manifest for the new branch */
Manifest *pParent; /* Parsed parent manifest */
Blob mcksum; /* Self-checksum on the manifest */
const char *zDateOvrd; /* Override date string */
const char *zUserOvrd; /* Override user name */
noSign = find_option("nosign","",0)!=0;
zColor = find_option("bgcolor","c",1);
zDateOvrd = find_option("date-override",0,1);
zUserOvrd = find_option("user-override",0,1);
verify_all_options();
if( g.argc<5 ){
usage("new BRANCH-NAME CHECK-IN ?-bgcolor COLOR?");
}
db_find_and_open_repository(0, 0);
| > > | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
char *zComment; /* Check-in comment for the new branch */
const char *zColor; /* Color of the new branch */
Blob branch; /* manifest for the new branch */
Manifest *pParent; /* Parsed parent manifest */
Blob mcksum; /* Self-checksum on the manifest */
const char *zDateOvrd; /* Override date string */
const char *zUserOvrd; /* Override user name */
int isPrivate = 0; /* True if the branch should be private */
noSign = find_option("nosign","",0)!=0;
zColor = find_option("bgcolor","c",1);
isPrivate = find_option("private",0,0)!=0;
zDateOvrd = find_option("date-override",0,1);
zUserOvrd = find_option("user-override",0,1);
verify_all_options();
if( g.argc<5 ){
usage("new BRANCH-NAME CHECK-IN ?-bgcolor COLOR?");
}
db_find_and_open_repository(0, 0);
|
| ︙ | ︙ | |||
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
if( pParent->zRepoCksum ){
blob_appendf(&branch, "R %s\n", pParent->zRepoCksum);
}
manifest_destroy(pParent);
/* Add the symbolic branch name and the "branch" tag to identify
** this as a new branch */
if( zColor!=0 ){
blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
}
blob_appendf(&branch, "T *branch * %F\n", zBranch);
blob_appendf(&branch, "T *sym-%F *\n", zBranch);
/* Cancel all other symbolic tags */
db_prepare(&q,
"SELECT tagname FROM tagxref, tag"
" WHERE tagxref.rid=%d AND tagxref.tagid=tag.tagid"
" AND tagtype>0 AND tagname GLOB 'sym-*'"
" ORDER BY tagname",
| > > > > > > | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
if( pParent->zRepoCksum ){
blob_appendf(&branch, "R %s\n", pParent->zRepoCksum);
}
manifest_destroy(pParent);
/* Add the symbolic branch name and the "branch" tag to identify
** this as a new branch */
if( content_is_private(rootid) ) isPrivate = 1;
if( isPrivate && zColor==0 ) zColor = "#fec084";
if( zColor!=0 ){
blob_appendf(&branch, "T *bgcolor * %F\n", zColor);
}
blob_appendf(&branch, "T *branch * %F\n", zBranch);
blob_appendf(&branch, "T *sym-%F *\n", zBranch);
if( isPrivate ){
blob_appendf(&branch, "T +private *\n");
noSign = 1;
}
/* Cancel all other symbolic tags */
db_prepare(&q,
"SELECT tagname FROM tagxref, tag"
" WHERE tagxref.rid=%d AND tagxref.tagid=tag.tagid"
" AND tagtype>0 AND tagname GLOB 'sym-*'"
" ORDER BY tagname",
|
| ︙ | ︙ | |||
175 176 177 178 179 180 181 | ** COMMAND: branch ** ** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE? ** ** Run various subcommands to manage branches of the open repository or ** of the repository identified by the -R or --repository option. ** | | | > | | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
** COMMAND: branch
**
** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE?
**
** Run various subcommands to manage branches of the open repository or
** of the repository identified by the -R or --repository option.
**
** %fossil branch new BRANCH-NAME BASIS ?--bgcolor COLOR? ?--private?
**
** Create a new branch BRANCH-NAME off of check-in BASIS.
** You can optionally give the branch a default color. The
** --private option makes the branch private.
**
** %fossil branch list
** %fossil branch ls
**
** List all branches
**
*/
void branch_cmd(void){
int n;
|
| ︙ | ︙ |