Fossil

Check-in [ce08928a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the branch subcommand so that the branch name tags it creates begin with "sym-".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ce08928aaa684585ccb232ab3fb9801db5b61cd3
User & Date: drh 2008-02-08 21:50:31
Context
2008-02-08
21:51
Merge in changes from Stephan's branch. check-in: 8672e243 user: drh tags: trunk
21:50
Fix the branch subcommand so that the branch name tags it creates begin with "sym-". check-in: ce08928a user: drh tags: trunk
21:42
Rename the 'clearsign' setting to 'pgp-command'. Remove the 'safemerge' setting - safemerge is on by default and cannot be disabled. check-in: 5cc845cf user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/branch.c.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
...
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
  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");
  }
  zBranch = g.argv[3];
  if( zBranch==0 || zBranch[0]==0 ){
    fossil_panic("branch name cannot be empty");
  }

  user_select();
................................................................................
  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);
    }else{
      blob_appendf(&manifest, "T *bgcolor * %F\n", zColor);
      blob_appendf(&manifest, "T *%F *\n", zBranch);
    }
  }else{
    blob_appendf(&manifest, "T *%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);
................................................................................
** 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
**
**        Create a new branch BRANCH-NAME. You can optionally give
**        a commit message and branch color.
**
**    %fossil branch list
**
**        List all branches







|







 







<
<
|
<
<
|
<

|







 







|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
82
83
84
85
86
87
88


89


90

91
92
93
94
95
96
97
98
99
...
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
  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");
  }
  zBranch = g.argv[3];
  if( zBranch==0 || zBranch[0]==0 ){
    fossil_panic("branch name cannot be empty");
  }

  user_select();
................................................................................
  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 ){


    blob_appendf(&manifest, "T *bgcolor * %F\n", zColor);


    blob_appendf(&manifest, "T *sym-%F *\n", zBranch);

  }else{
    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);
................................................................................
** 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
**
**        Create a new branch BRANCH-NAME. You can optionally give
**        a commit message and branch color.
**
**    %fossil branch list
**
**        List all branches