Fossil SCM
Update the 'branch new' command to track the status of private branches in the PRIVATE table, instead of using +private tags.
Commit
70849e76417e2e27f09b6df95f798055fdcff4e53a890ae87917f460b2575c69
Parent
779ddefa190931f…
2 files changed
-1
+1
-4
-1
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -144,11 +144,10 @@ | ||
| 144 | 144 | blob_appendf(&branch, "T *bgcolor * %F\n", zColor); |
| 145 | 145 | } |
| 146 | 146 | blob_appendf(&branch, "T *branch * %F\n", zBranch); |
| 147 | 147 | blob_appendf(&branch, "T *sym-%F *\n", zBranch); |
| 148 | 148 | if( isPrivate ){ |
| 149 | - blob_appendf(&branch, "T +private *\n"); | |
| 150 | 149 | noSign = 1; |
| 151 | 150 | } |
| 152 | 151 | |
| 153 | 152 | /* Cancel all other symbolic tags */ |
| 154 | 153 | db_prepare(&q, |
| 155 | 154 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -144,11 +144,10 @@ | |
| 144 | blob_appendf(&branch, "T *bgcolor * %F\n", zColor); |
| 145 | } |
| 146 | blob_appendf(&branch, "T *branch * %F\n", zBranch); |
| 147 | blob_appendf(&branch, "T *sym-%F *\n", zBranch); |
| 148 | if( isPrivate ){ |
| 149 | blob_appendf(&branch, "T +private *\n"); |
| 150 | noSign = 1; |
| 151 | } |
| 152 | |
| 153 | /* Cancel all other symbolic tags */ |
| 154 | db_prepare(&q, |
| 155 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -144,11 +144,10 @@ | |
| 144 | blob_appendf(&branch, "T *bgcolor * %F\n", zColor); |
| 145 | } |
| 146 | blob_appendf(&branch, "T *branch * %F\n", zBranch); |
| 147 | blob_appendf(&branch, "T *sym-%F *\n", zBranch); |
| 148 | if( isPrivate ){ |
| 149 | noSign = 1; |
| 150 | } |
| 151 | |
| 152 | /* Cancel all other symbolic tags */ |
| 153 | db_prepare(&q, |
| 154 |
+1
-4
| --- src/json_branch.c | ||
| +++ src/json_branch.c | ||
| @@ -266,13 +266,10 @@ | ||
| 266 | 266 | if( zColor!=0 ){ |
| 267 | 267 | blob_appendf(&branch, "T *bgcolor * %F\n", zColor); |
| 268 | 268 | } |
| 269 | 269 | blob_appendf(&branch, "T *branch * %F\n", zBranch); |
| 270 | 270 | blob_appendf(&branch, "T *sym-%F *\n", zBranch); |
| 271 | - if( zOpt->isPrivate ){ | |
| 272 | - blob_appendf(&branch, "T +private *\n"); | |
| 273 | - } | |
| 274 | 271 | |
| 275 | 272 | /* Cancel all other symbolic tags */ |
| 276 | 273 | db_prepare(&q, |
| 277 | 274 | "SELECT tagname FROM tagxref, tag" |
| 278 | 275 | " WHERE tagxref.rid=%d AND tagxref.tagid=tag.tagid" |
| @@ -287,11 +284,11 @@ | ||
| 287 | 284 | |
| 288 | 285 | blob_appendf(&branch, "U %F\n", g.zLogin); |
| 289 | 286 | md5sum_blob(&branch, &mcksum); |
| 290 | 287 | blob_appendf(&branch, "Z %b\n", &mcksum); |
| 291 | 288 | |
| 292 | - brid = content_put(&branch); | |
| 289 | + brid = content_put_ex(&branch, 0, 0, 0, zOpt->isPrivate); | |
| 293 | 290 | if( brid==0 ){ |
| 294 | 291 | fossil_panic("Problem committing manifest: %s", g.zErrMsg); |
| 295 | 292 | } |
| 296 | 293 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", brid); |
| 297 | 294 | if( manifest_crosslink(brid, &branch, MC_PERMIT_HOOKS)==0 ){ |
| 298 | 295 |
| --- src/json_branch.c | |
| +++ src/json_branch.c | |
| @@ -266,13 +266,10 @@ | |
| 266 | if( zColor!=0 ){ |
| 267 | blob_appendf(&branch, "T *bgcolor * %F\n", zColor); |
| 268 | } |
| 269 | blob_appendf(&branch, "T *branch * %F\n", zBranch); |
| 270 | blob_appendf(&branch, "T *sym-%F *\n", zBranch); |
| 271 | if( zOpt->isPrivate ){ |
| 272 | blob_appendf(&branch, "T +private *\n"); |
| 273 | } |
| 274 | |
| 275 | /* Cancel all other symbolic tags */ |
| 276 | db_prepare(&q, |
| 277 | "SELECT tagname FROM tagxref, tag" |
| 278 | " WHERE tagxref.rid=%d AND tagxref.tagid=tag.tagid" |
| @@ -287,11 +284,11 @@ | |
| 287 | |
| 288 | blob_appendf(&branch, "U %F\n", g.zLogin); |
| 289 | md5sum_blob(&branch, &mcksum); |
| 290 | blob_appendf(&branch, "Z %b\n", &mcksum); |
| 291 | |
| 292 | brid = content_put(&branch); |
| 293 | if( brid==0 ){ |
| 294 | fossil_panic("Problem committing manifest: %s", g.zErrMsg); |
| 295 | } |
| 296 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", brid); |
| 297 | if( manifest_crosslink(brid, &branch, MC_PERMIT_HOOKS)==0 ){ |
| 298 |
| --- src/json_branch.c | |
| +++ src/json_branch.c | |
| @@ -266,13 +266,10 @@ | |
| 266 | if( zColor!=0 ){ |
| 267 | blob_appendf(&branch, "T *bgcolor * %F\n", zColor); |
| 268 | } |
| 269 | blob_appendf(&branch, "T *branch * %F\n", zBranch); |
| 270 | blob_appendf(&branch, "T *sym-%F *\n", zBranch); |
| 271 | |
| 272 | /* Cancel all other symbolic tags */ |
| 273 | db_prepare(&q, |
| 274 | "SELECT tagname FROM tagxref, tag" |
| 275 | " WHERE tagxref.rid=%d AND tagxref.tagid=tag.tagid" |
| @@ -287,11 +284,11 @@ | |
| 284 | |
| 285 | blob_appendf(&branch, "U %F\n", g.zLogin); |
| 286 | md5sum_blob(&branch, &mcksum); |
| 287 | blob_appendf(&branch, "Z %b\n", &mcksum); |
| 288 | |
| 289 | brid = content_put_ex(&branch, 0, 0, 0, zOpt->isPrivate); |
| 290 | if( brid==0 ){ |
| 291 | fossil_panic("Problem committing manifest: %s", g.zErrMsg); |
| 292 | } |
| 293 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", brid); |
| 294 | if( manifest_crosslink(brid, &branch, MC_PERMIT_HOOKS)==0 ){ |
| 295 |