Fossil SCM

Add a checkbox in the ci_edit page which allows to close multiple leaves (all successors of the current check-in) to be closed in a single action.

jan.nijtmans 2013-12-05 08:40 trunk
Commit 718cc002089f4d7229e34a084a07cc6d730d10de
1 file changed +19 -8
+19 -8
--- src/info.c
+++ src/info.c
@@ -2146,11 +2146,12 @@
21462146
db_multi_exec("REPLACE INTO newtags VALUES(%Q,'-',NULL)", zTag);
21472147
}
21482148
}
21492149
db_finalize(&q);
21502150
if( zCloseFlag[0] ){
2151
- db_multi_exec("REPLACE INTO newtags VALUES('closed','+',NULL)");
2151
+ db_multi_exec("REPLACE INTO newtags VALUES('closed','%s',NULL)",
2152
+ is_a_leaf(rid)?"+":"*");
21522153
}
21532154
if( zNewTagFlag[0] && zNewTag[0] ){
21542155
db_multi_exec("REPLACE INTO newtags VALUES('sym-%q','+',NULL)", zNewTag);
21552156
}
21562157
if( zNewBrFlag[0] && zNewBranch[0] ){
@@ -2324,17 +2325,27 @@
23242325
@ Make this check-in the start of a new branch named:</label>
23252326
@ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)"
23262327
@ onkeyup="gebi('newbr').checked=!!this.value" />
23272328
@ </td></tr>
23282329
2329
- if( !fHasClosed && is_a_leaf(rid) ){
2330
- @ <tr><th align="right" valign="top">Leaf Closure:</th>
2331
- @ <td valign="top">
2332
- @ <label><input type="checkbox" name="close"%s(zCloseFlag) />
2333
- @ Mark this leaf as "closed" so that it no longer appears on the
2334
- @ "leaves" page and is no longer labeled as a "<b>Leaf</b>"</label>
2335
- @ </td></tr>
2330
+ if( !fHasClosed ){
2331
+ if( is_a_leaf(rid) ){
2332
+ @ <tr><th align="right" valign="top">Leaf Closure:</th>
2333
+ @ <td valign="top">
2334
+ @ <label><input type="checkbox" name="close"%s(zCloseFlag) />
2335
+ @ Mark this leaf as "closed" so that it no longer appears on the
2336
+ @ "leaves" page and is no longer labeled as a "<b>Leaf</b>"</label>
2337
+ @ </td></tr>
2338
+ }else if( zBranchName ){
2339
+ @ <tr><th align="right" valign="top">Branch Closure:</th>
2340
+ @ <td valign="top">
2341
+ @ <label><input type="checkbox" name="close"%s(zCloseFlag) />
2342
+ @ Mark branch <span style="font-weight:bold" id="cbranch">%s(zBranchName)</span>
2343
+ @ as "closed" so that its leaf no longer appears on the "leaves" page
2344
+ @ and is no longer labeled as a "<b>Leaf</b>"</label>
2345
+ @ </td></tr>
2346
+ }
23362347
}
23372348
if(zBranchName) fossil_free(zBranchName);
23382349
23392350
23402351
@ <tr><td colspan="2">
23412352
--- src/info.c
+++ src/info.c
@@ -2146,11 +2146,12 @@
2146 db_multi_exec("REPLACE INTO newtags VALUES(%Q,'-',NULL)", zTag);
2147 }
2148 }
2149 db_finalize(&q);
2150 if( zCloseFlag[0] ){
2151 db_multi_exec("REPLACE INTO newtags VALUES('closed','+',NULL)");
 
2152 }
2153 if( zNewTagFlag[0] && zNewTag[0] ){
2154 db_multi_exec("REPLACE INTO newtags VALUES('sym-%q','+',NULL)", zNewTag);
2155 }
2156 if( zNewBrFlag[0] && zNewBranch[0] ){
@@ -2324,17 +2325,27 @@
2324 @ Make this check-in the start of a new branch named:</label>
2325 @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)"
2326 @ onkeyup="gebi('newbr').checked=!!this.value" />
2327 @ </td></tr>
2328
2329 if( !fHasClosed && is_a_leaf(rid) ){
2330 @ <tr><th align="right" valign="top">Leaf Closure:</th>
2331 @ <td valign="top">
2332 @ <label><input type="checkbox" name="close"%s(zCloseFlag) />
2333 @ Mark this leaf as "closed" so that it no longer appears on the
2334 @ "leaves" page and is no longer labeled as a "<b>Leaf</b>"</label>
2335 @ </td></tr>
 
 
 
 
 
 
 
 
 
 
2336 }
2337 if(zBranchName) fossil_free(zBranchName);
2338
2339
2340 @ <tr><td colspan="2">
2341
--- src/info.c
+++ src/info.c
@@ -2146,11 +2146,12 @@
2146 db_multi_exec("REPLACE INTO newtags VALUES(%Q,'-',NULL)", zTag);
2147 }
2148 }
2149 db_finalize(&q);
2150 if( zCloseFlag[0] ){
2151 db_multi_exec("REPLACE INTO newtags VALUES('closed','%s',NULL)",
2152 is_a_leaf(rid)?"+":"*");
2153 }
2154 if( zNewTagFlag[0] && zNewTag[0] ){
2155 db_multi_exec("REPLACE INTO newtags VALUES('sym-%q','+',NULL)", zNewTag);
2156 }
2157 if( zNewBrFlag[0] && zNewBranch[0] ){
@@ -2324,17 +2325,27 @@
2325 @ Make this check-in the start of a new branch named:</label>
2326 @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)"
2327 @ onkeyup="gebi('newbr').checked=!!this.value" />
2328 @ </td></tr>
2329
2330 if( !fHasClosed ){
2331 if( is_a_leaf(rid) ){
2332 @ <tr><th align="right" valign="top">Leaf Closure:</th>
2333 @ <td valign="top">
2334 @ <label><input type="checkbox" name="close"%s(zCloseFlag) />
2335 @ Mark this leaf as "closed" so that it no longer appears on the
2336 @ "leaves" page and is no longer labeled as a "<b>Leaf</b>"</label>
2337 @ </td></tr>
2338 }else if( zBranchName ){
2339 @ <tr><th align="right" valign="top">Branch Closure:</th>
2340 @ <td valign="top">
2341 @ <label><input type="checkbox" name="close"%s(zCloseFlag) />
2342 @ Mark branch <span style="font-weight:bold" id="cbranch">%s(zBranchName)</span>
2343 @ as "closed" so that its leaf no longer appears on the "leaves" page
2344 @ and is no longer labeled as a "<b>Leaf</b>"</label>
2345 @ </td></tr>
2346 }
2347 }
2348 if(zBranchName) fossil_free(zBranchName);
2349
2350
2351 @ <tr><td colspan="2">
2352

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button