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.
Commit
718cc002089f4d7229e34a084a07cc6d730d10de
Parent
844436929e107fe…
1 file changed
+19
-8
+19
-8
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2146,11 +2146,12 @@ | ||
| 2146 | 2146 | db_multi_exec("REPLACE INTO newtags VALUES(%Q,'-',NULL)", zTag); |
| 2147 | 2147 | } |
| 2148 | 2148 | } |
| 2149 | 2149 | db_finalize(&q); |
| 2150 | 2150 | 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)?"+":"*"); | |
| 2152 | 2153 | } |
| 2153 | 2154 | if( zNewTagFlag[0] && zNewTag[0] ){ |
| 2154 | 2155 | db_multi_exec("REPLACE INTO newtags VALUES('sym-%q','+',NULL)", zNewTag); |
| 2155 | 2156 | } |
| 2156 | 2157 | if( zNewBrFlag[0] && zNewBranch[0] ){ |
| @@ -2324,17 +2325,27 @@ | ||
| 2324 | 2325 | @ Make this check-in the start of a new branch named:</label> |
| 2325 | 2326 | @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)" |
| 2326 | 2327 | @ onkeyup="gebi('newbr').checked=!!this.value" /> |
| 2327 | 2328 | @ </td></tr> |
| 2328 | 2329 | |
| 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 | + } | |
| 2336 | 2347 | } |
| 2337 | 2348 | if(zBranchName) fossil_free(zBranchName); |
| 2338 | 2349 | |
| 2339 | 2350 | |
| 2340 | 2351 | @ <tr><td colspan="2"> |
| 2341 | 2352 |
| --- 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 |