Fossil SCM
Add a checkbox to the ci_edit page which allows to hide a (partial) branch from the timeline.
Commit
22a4e0c5a27bc4120975202f275f1f68c0b2617d
Parent
e4c9dd0905f2d4c…
2 files changed
+19
+19
+19
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2051,12 +2051,14 @@ | ||
| 2051 | 2051 | const char *zNewTagFlag; |
| 2052 | 2052 | const char *zNewTag; |
| 2053 | 2053 | const char *zNewBrFlag; |
| 2054 | 2054 | const char *zNewBranch; |
| 2055 | 2055 | const char *zCloseFlag; |
| 2056 | + const char *zHideFlag; | |
| 2056 | 2057 | int fPropagateColor; /* True if color propagates before edit */ |
| 2057 | 2058 | int fNewPropagateColor; /* True if color propagates after edit */ |
| 2059 | + int fHasHidden = 0; /* True if hidden tag already set */ | |
| 2058 | 2060 | int fHasClosed = 0; /* True if closed tag already set */ |
| 2059 | 2061 | const char *zChngTime = 0; /* Value of chngtime= query param, if any */ |
| 2060 | 2062 | char *zUuid; |
| 2061 | 2063 | Blob comment; |
| 2062 | 2064 | char *zBranchName = 0; |
| @@ -2095,10 +2097,11 @@ | ||
| 2095 | 2097 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 2096 | 2098 | zNewTag = PDT("tagname",""); |
| 2097 | 2099 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 2098 | 2100 | zNewBranch = PDT("brname",""); |
| 2099 | 2101 | zCloseFlag = P("close") ? " checked" : ""; |
| 2102 | + zHideFlag = P("hide") ? " checked" : ""; | |
| 2100 | 2103 | if( P("apply") ){ |
| 2101 | 2104 | Blob ctrl; |
| 2102 | 2105 | char *zNow; |
| 2103 | 2106 | int nChng = 0; |
| 2104 | 2107 | |
| @@ -2145,10 +2148,13 @@ | ||
| 2145 | 2148 | if( P(zLabel) ){ |
| 2146 | 2149 | db_multi_exec("REPLACE INTO newtags VALUES(%Q,'-',NULL)", zTag); |
| 2147 | 2150 | } |
| 2148 | 2151 | } |
| 2149 | 2152 | db_finalize(&q); |
| 2153 | + if( zHideFlag[0] ){ | |
| 2154 | + db_multi_exec("REPLACE INTO newtags VALUES('hidden','*',NULL)"); | |
| 2155 | + } | |
| 2150 | 2156 | if( zCloseFlag[0] ){ |
| 2151 | 2157 | db_multi_exec("REPLACE INTO newtags VALUES('closed','%s',NULL)", |
| 2152 | 2158 | is_a_leaf(rid)?"+":"*"); |
| 2153 | 2159 | } |
| 2154 | 2160 | if( zNewTagFlag[0] && zNewTag[0] ){ |
| @@ -2207,16 +2213,18 @@ | ||
| 2207 | 2213 | @ <script> |
| 2208 | 2214 | @ function chgcbn(checked, branch){ |
| 2209 | 2215 | @ val = gebi('brname').value.trim(); |
| 2210 | 2216 | @ if( !val || !checked ) val = branch; |
| 2211 | 2217 | @ if( checked ) gebi('brname').select(); |
| 2218 | + @ gebi('hbranch').textContent = val; | |
| 2212 | 2219 | @ cidbrid = document.getElementById('cbranch'); |
| 2213 | 2220 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2214 | 2221 | @ } |
| 2215 | 2222 | @ function chgbn(val, branch){ |
| 2216 | 2223 | @ if( !val ) val = branch; |
| 2217 | 2224 | @ gebi('newbr').checked = (val!=branch); |
| 2225 | + @ gebi('hbranch').textContent = val; | |
| 2218 | 2226 | @ cidbrid = document.getElementById('cbranch'); |
| 2219 | 2227 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2220 | 2228 | @ } |
| 2221 | 2229 | @ </script> |
| 2222 | 2230 | if( P("preview") ){ |
| @@ -2316,10 +2324,12 @@ | ||
| 2316 | 2324 | |
| 2317 | 2325 | if( tagid == TAG_CLOSED ){ |
| 2318 | 2326 | fHasClosed = 1; |
| 2319 | 2327 | }else if( (tagid == TAG_COMMENT) || (tagid == TAG_BRANCH) ){ |
| 2320 | 2328 | continue; |
| 2329 | + }else if( tagid==TAG_HIDDEN ){ | |
| 2330 | + fHasHidden = 1; | |
| 2321 | 2331 | }else if( !isSpecialTag && zTagName && |
| 2322 | 2332 | fossil_strcmp(&zTagName[4], zBranchName)==0){ |
| 2323 | 2333 | continue; |
| 2324 | 2334 | } |
| 2325 | 2335 | sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid); |
| @@ -2350,10 +2360,19 @@ | ||
| 2350 | 2360 | @ onchange="chgcbn(this.checked,'%h(zBranchName)')" /> |
| 2351 | 2361 | @ Make this check-in the start of a new branch named:</label> |
| 2352 | 2362 | @ <input id="brname" type="text" style="width:15;" name="brname" |
| 2353 | 2363 | @ value="%h(zNewBranch)" |
| 2354 | 2364 | @ onkeyup="chgbn(this.value.trim(),'%h(zBranchName)')" /></td></tr> |
| 2365 | + if( !fHasHidden ){ | |
| 2366 | + @ <tr><th align="right" valign="top">Branch Hiding:</th> | |
| 2367 | + @ <td valign="top"> | |
| 2368 | + @ <label><input type="checkbox" id="hidebr" name="hide"%s(zHideFlag) /> | |
| 2369 | + @ Hide branch | |
| 2370 | + @ <span style="font-weight:bold" id="hbranch">%h(zBranchName)</span> | |
| 2371 | + @ from the timeline starting from this check-in</label> | |
| 2372 | + @ </td></tr> | |
| 2373 | + } | |
| 2355 | 2374 | if( !fHasClosed ){ |
| 2356 | 2375 | if( is_a_leaf(rid) ){ |
| 2357 | 2376 | @ <tr><th align="right" valign="top">Leaf Closure:</th> |
| 2358 | 2377 | @ <td valign="top"> |
| 2359 | 2378 | @ <label><input type="checkbox" name="close"%s(zCloseFlag) /> |
| 2360 | 2379 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2051,12 +2051,14 @@ | |
| 2051 | const char *zNewTagFlag; |
| 2052 | const char *zNewTag; |
| 2053 | const char *zNewBrFlag; |
| 2054 | const char *zNewBranch; |
| 2055 | const char *zCloseFlag; |
| 2056 | int fPropagateColor; /* True if color propagates before edit */ |
| 2057 | int fNewPropagateColor; /* True if color propagates after edit */ |
| 2058 | int fHasClosed = 0; /* True if closed tag already set */ |
| 2059 | const char *zChngTime = 0; /* Value of chngtime= query param, if any */ |
| 2060 | char *zUuid; |
| 2061 | Blob comment; |
| 2062 | char *zBranchName = 0; |
| @@ -2095,10 +2097,11 @@ | |
| 2095 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 2096 | zNewTag = PDT("tagname",""); |
| 2097 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 2098 | zNewBranch = PDT("brname",""); |
| 2099 | zCloseFlag = P("close") ? " checked" : ""; |
| 2100 | if( P("apply") ){ |
| 2101 | Blob ctrl; |
| 2102 | char *zNow; |
| 2103 | int nChng = 0; |
| 2104 | |
| @@ -2145,10 +2148,13 @@ | |
| 2145 | if( P(zLabel) ){ |
| 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] ){ |
| @@ -2207,16 +2213,18 @@ | |
| 2207 | @ <script> |
| 2208 | @ function chgcbn(checked, branch){ |
| 2209 | @ val = gebi('brname').value.trim(); |
| 2210 | @ if( !val || !checked ) val = branch; |
| 2211 | @ if( checked ) gebi('brname').select(); |
| 2212 | @ cidbrid = document.getElementById('cbranch'); |
| 2213 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2214 | @ } |
| 2215 | @ function chgbn(val, branch){ |
| 2216 | @ if( !val ) val = branch; |
| 2217 | @ gebi('newbr').checked = (val!=branch); |
| 2218 | @ cidbrid = document.getElementById('cbranch'); |
| 2219 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2220 | @ } |
| 2221 | @ </script> |
| 2222 | if( P("preview") ){ |
| @@ -2316,10 +2324,12 @@ | |
| 2316 | |
| 2317 | if( tagid == TAG_CLOSED ){ |
| 2318 | fHasClosed = 1; |
| 2319 | }else if( (tagid == TAG_COMMENT) || (tagid == TAG_BRANCH) ){ |
| 2320 | continue; |
| 2321 | }else if( !isSpecialTag && zTagName && |
| 2322 | fossil_strcmp(&zTagName[4], zBranchName)==0){ |
| 2323 | continue; |
| 2324 | } |
| 2325 | sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid); |
| @@ -2350,10 +2360,19 @@ | |
| 2350 | @ onchange="chgcbn(this.checked,'%h(zBranchName)')" /> |
| 2351 | @ Make this check-in the start of a new branch named:</label> |
| 2352 | @ <input id="brname" type="text" style="width:15;" name="brname" |
| 2353 | @ value="%h(zNewBranch)" |
| 2354 | @ onkeyup="chgbn(this.value.trim(),'%h(zBranchName)')" /></td></tr> |
| 2355 | if( !fHasClosed ){ |
| 2356 | if( is_a_leaf(rid) ){ |
| 2357 | @ <tr><th align="right" valign="top">Leaf Closure:</th> |
| 2358 | @ <td valign="top"> |
| 2359 | @ <label><input type="checkbox" name="close"%s(zCloseFlag) /> |
| 2360 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2051,12 +2051,14 @@ | |
| 2051 | const char *zNewTagFlag; |
| 2052 | const char *zNewTag; |
| 2053 | const char *zNewBrFlag; |
| 2054 | const char *zNewBranch; |
| 2055 | const char *zCloseFlag; |
| 2056 | const char *zHideFlag; |
| 2057 | int fPropagateColor; /* True if color propagates before edit */ |
| 2058 | int fNewPropagateColor; /* True if color propagates after edit */ |
| 2059 | int fHasHidden = 0; /* True if hidden tag already set */ |
| 2060 | int fHasClosed = 0; /* True if closed tag already set */ |
| 2061 | const char *zChngTime = 0; /* Value of chngtime= query param, if any */ |
| 2062 | char *zUuid; |
| 2063 | Blob comment; |
| 2064 | char *zBranchName = 0; |
| @@ -2095,10 +2097,11 @@ | |
| 2097 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 2098 | zNewTag = PDT("tagname",""); |
| 2099 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 2100 | zNewBranch = PDT("brname",""); |
| 2101 | zCloseFlag = P("close") ? " checked" : ""; |
| 2102 | zHideFlag = P("hide") ? " checked" : ""; |
| 2103 | if( P("apply") ){ |
| 2104 | Blob ctrl; |
| 2105 | char *zNow; |
| 2106 | int nChng = 0; |
| 2107 | |
| @@ -2145,10 +2148,13 @@ | |
| 2148 | if( P(zLabel) ){ |
| 2149 | db_multi_exec("REPLACE INTO newtags VALUES(%Q,'-',NULL)", zTag); |
| 2150 | } |
| 2151 | } |
| 2152 | db_finalize(&q); |
| 2153 | if( zHideFlag[0] ){ |
| 2154 | db_multi_exec("REPLACE INTO newtags VALUES('hidden','*',NULL)"); |
| 2155 | } |
| 2156 | if( zCloseFlag[0] ){ |
| 2157 | db_multi_exec("REPLACE INTO newtags VALUES('closed','%s',NULL)", |
| 2158 | is_a_leaf(rid)?"+":"*"); |
| 2159 | } |
| 2160 | if( zNewTagFlag[0] && zNewTag[0] ){ |
| @@ -2207,16 +2213,18 @@ | |
| 2213 | @ <script> |
| 2214 | @ function chgcbn(checked, branch){ |
| 2215 | @ val = gebi('brname').value.trim(); |
| 2216 | @ if( !val || !checked ) val = branch; |
| 2217 | @ if( checked ) gebi('brname').select(); |
| 2218 | @ gebi('hbranch').textContent = val; |
| 2219 | @ cidbrid = document.getElementById('cbranch'); |
| 2220 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2221 | @ } |
| 2222 | @ function chgbn(val, branch){ |
| 2223 | @ if( !val ) val = branch; |
| 2224 | @ gebi('newbr').checked = (val!=branch); |
| 2225 | @ gebi('hbranch').textContent = val; |
| 2226 | @ cidbrid = document.getElementById('cbranch'); |
| 2227 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2228 | @ } |
| 2229 | @ </script> |
| 2230 | if( P("preview") ){ |
| @@ -2316,10 +2324,12 @@ | |
| 2324 | |
| 2325 | if( tagid == TAG_CLOSED ){ |
| 2326 | fHasClosed = 1; |
| 2327 | }else if( (tagid == TAG_COMMENT) || (tagid == TAG_BRANCH) ){ |
| 2328 | continue; |
| 2329 | }else if( tagid==TAG_HIDDEN ){ |
| 2330 | fHasHidden = 1; |
| 2331 | }else if( !isSpecialTag && zTagName && |
| 2332 | fossil_strcmp(&zTagName[4], zBranchName)==0){ |
| 2333 | continue; |
| 2334 | } |
| 2335 | sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid); |
| @@ -2350,10 +2360,19 @@ | |
| 2360 | @ onchange="chgcbn(this.checked,'%h(zBranchName)')" /> |
| 2361 | @ Make this check-in the start of a new branch named:</label> |
| 2362 | @ <input id="brname" type="text" style="width:15;" name="brname" |
| 2363 | @ value="%h(zNewBranch)" |
| 2364 | @ onkeyup="chgbn(this.value.trim(),'%h(zBranchName)')" /></td></tr> |
| 2365 | if( !fHasHidden ){ |
| 2366 | @ <tr><th align="right" valign="top">Branch Hiding:</th> |
| 2367 | @ <td valign="top"> |
| 2368 | @ <label><input type="checkbox" id="hidebr" name="hide"%s(zHideFlag) /> |
| 2369 | @ Hide branch |
| 2370 | @ <span style="font-weight:bold" id="hbranch">%h(zBranchName)</span> |
| 2371 | @ from the timeline starting from this check-in</label> |
| 2372 | @ </td></tr> |
| 2373 | } |
| 2374 | if( !fHasClosed ){ |
| 2375 | if( is_a_leaf(rid) ){ |
| 2376 | @ <tr><th align="right" valign="top">Leaf Closure:</th> |
| 2377 | @ <td valign="top"> |
| 2378 | @ <label><input type="checkbox" name="close"%s(zCloseFlag) /> |
| 2379 |
+19
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2051,12 +2051,14 @@ | ||
| 2051 | 2051 | const char *zNewTagFlag; |
| 2052 | 2052 | const char *zNewTag; |
| 2053 | 2053 | const char *zNewBrFlag; |
| 2054 | 2054 | const char *zNewBranch; |
| 2055 | 2055 | const char *zCloseFlag; |
| 2056 | + const char *zHideFlag; | |
| 2056 | 2057 | int fPropagateColor; /* True if color propagates before edit */ |
| 2057 | 2058 | int fNewPropagateColor; /* True if color propagates after edit */ |
| 2059 | + int fHasHidden = 0; /* True if hidden tag already set */ | |
| 2058 | 2060 | int fHasClosed = 0; /* True if closed tag already set */ |
| 2059 | 2061 | const char *zChngTime = 0; /* Value of chngtime= query param, if any */ |
| 2060 | 2062 | char *zUuid; |
| 2061 | 2063 | Blob comment; |
| 2062 | 2064 | char *zBranchName = 0; |
| @@ -2095,10 +2097,11 @@ | ||
| 2095 | 2097 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 2096 | 2098 | zNewTag = PDT("tagname",""); |
| 2097 | 2099 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 2098 | 2100 | zNewBranch = PDT("brname",""); |
| 2099 | 2101 | zCloseFlag = P("close") ? " checked" : ""; |
| 2102 | + zHideFlag = P("hide") ? " checked" : ""; | |
| 2100 | 2103 | if( P("apply") ){ |
| 2101 | 2104 | Blob ctrl; |
| 2102 | 2105 | char *zNow; |
| 2103 | 2106 | int nChng = 0; |
| 2104 | 2107 | |
| @@ -2145,10 +2148,13 @@ | ||
| 2145 | 2148 | if( P(zLabel) ){ |
| 2146 | 2149 | db_multi_exec("REPLACE INTO newtags VALUES(%Q,'-',NULL)", zTag); |
| 2147 | 2150 | } |
| 2148 | 2151 | } |
| 2149 | 2152 | db_finalize(&q); |
| 2153 | + if( zHideFlag[0] ){ | |
| 2154 | + db_multi_exec("REPLACE INTO newtags VALUES('hidden','*',NULL)"); | |
| 2155 | + } | |
| 2150 | 2156 | if( zCloseFlag[0] ){ |
| 2151 | 2157 | db_multi_exec("REPLACE INTO newtags VALUES('closed','%s',NULL)", |
| 2152 | 2158 | is_a_leaf(rid)?"+":"*"); |
| 2153 | 2159 | } |
| 2154 | 2160 | if( zNewTagFlag[0] && zNewTag[0] ){ |
| @@ -2207,16 +2213,18 @@ | ||
| 2207 | 2213 | @ <script> |
| 2208 | 2214 | @ function chgcbn(checked, branch){ |
| 2209 | 2215 | @ val = gebi('brname').value.trim(); |
| 2210 | 2216 | @ if( !val || !checked ) val = branch; |
| 2211 | 2217 | @ if( checked ) gebi('brname').select(); |
| 2218 | + @ gebi('hbranch').textContent = val; | |
| 2212 | 2219 | @ cidbrid = document.getElementById('cbranch'); |
| 2213 | 2220 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2214 | 2221 | @ } |
| 2215 | 2222 | @ function chgbn(val, branch){ |
| 2216 | 2223 | @ if( !val ) val = branch; |
| 2217 | 2224 | @ gebi('newbr').checked = (val!=branch); |
| 2225 | + @ gebi('hbranch').textContent = val; | |
| 2218 | 2226 | @ cidbrid = document.getElementById('cbranch'); |
| 2219 | 2227 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2220 | 2228 | @ } |
| 2221 | 2229 | @ </script> |
| 2222 | 2230 | if( P("preview") ){ |
| @@ -2316,10 +2324,12 @@ | ||
| 2316 | 2324 | |
| 2317 | 2325 | if( tagid == TAG_CLOSED ){ |
| 2318 | 2326 | fHasClosed = 1; |
| 2319 | 2327 | }else if( (tagid == TAG_COMMENT) || (tagid == TAG_BRANCH) ){ |
| 2320 | 2328 | continue; |
| 2329 | + }else if( tagid==TAG_HIDDEN ){ | |
| 2330 | + fHasHidden = 1; | |
| 2321 | 2331 | }else if( !isSpecialTag && zTagName && |
| 2322 | 2332 | fossil_strcmp(&zTagName[4], zBranchName)==0){ |
| 2323 | 2333 | continue; |
| 2324 | 2334 | } |
| 2325 | 2335 | sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid); |
| @@ -2350,10 +2360,19 @@ | ||
| 2350 | 2360 | @ onchange="chgcbn(this.checked,'%h(zBranchName)')" /> |
| 2351 | 2361 | @ Make this check-in the start of a new branch named:</label> |
| 2352 | 2362 | @ <input id="brname" type="text" style="width:15;" name="brname" |
| 2353 | 2363 | @ value="%h(zNewBranch)" |
| 2354 | 2364 | @ onkeyup="chgbn(this.value.trim(),'%h(zBranchName)')" /></td></tr> |
| 2365 | + if( !fHasHidden ){ | |
| 2366 | + @ <tr><th align="right" valign="top">Branch Hiding:</th> | |
| 2367 | + @ <td valign="top"> | |
| 2368 | + @ <label><input type="checkbox" id="hidebr" name="hide"%s(zHideFlag) /> | |
| 2369 | + @ Hide branch | |
| 2370 | + @ <span style="font-weight:bold" id="hbranch">%h(zBranchName)</span> | |
| 2371 | + @ from the timeline starting from this check-in</label> | |
| 2372 | + @ </td></tr> | |
| 2373 | + } | |
| 2355 | 2374 | if( !fHasClosed ){ |
| 2356 | 2375 | if( is_a_leaf(rid) ){ |
| 2357 | 2376 | @ <tr><th align="right" valign="top">Leaf Closure:</th> |
| 2358 | 2377 | @ <td valign="top"> |
| 2359 | 2378 | @ <label><input type="checkbox" name="close"%s(zCloseFlag) /> |
| 2360 | 2379 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2051,12 +2051,14 @@ | |
| 2051 | const char *zNewTagFlag; |
| 2052 | const char *zNewTag; |
| 2053 | const char *zNewBrFlag; |
| 2054 | const char *zNewBranch; |
| 2055 | const char *zCloseFlag; |
| 2056 | int fPropagateColor; /* True if color propagates before edit */ |
| 2057 | int fNewPropagateColor; /* True if color propagates after edit */ |
| 2058 | int fHasClosed = 0; /* True if closed tag already set */ |
| 2059 | const char *zChngTime = 0; /* Value of chngtime= query param, if any */ |
| 2060 | char *zUuid; |
| 2061 | Blob comment; |
| 2062 | char *zBranchName = 0; |
| @@ -2095,10 +2097,11 @@ | |
| 2095 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 2096 | zNewTag = PDT("tagname",""); |
| 2097 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 2098 | zNewBranch = PDT("brname",""); |
| 2099 | zCloseFlag = P("close") ? " checked" : ""; |
| 2100 | if( P("apply") ){ |
| 2101 | Blob ctrl; |
| 2102 | char *zNow; |
| 2103 | int nChng = 0; |
| 2104 | |
| @@ -2145,10 +2148,13 @@ | |
| 2145 | if( P(zLabel) ){ |
| 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] ){ |
| @@ -2207,16 +2213,18 @@ | |
| 2207 | @ <script> |
| 2208 | @ function chgcbn(checked, branch){ |
| 2209 | @ val = gebi('brname').value.trim(); |
| 2210 | @ if( !val || !checked ) val = branch; |
| 2211 | @ if( checked ) gebi('brname').select(); |
| 2212 | @ cidbrid = document.getElementById('cbranch'); |
| 2213 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2214 | @ } |
| 2215 | @ function chgbn(val, branch){ |
| 2216 | @ if( !val ) val = branch; |
| 2217 | @ gebi('newbr').checked = (val!=branch); |
| 2218 | @ cidbrid = document.getElementById('cbranch'); |
| 2219 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2220 | @ } |
| 2221 | @ </script> |
| 2222 | if( P("preview") ){ |
| @@ -2316,10 +2324,12 @@ | |
| 2316 | |
| 2317 | if( tagid == TAG_CLOSED ){ |
| 2318 | fHasClosed = 1; |
| 2319 | }else if( (tagid == TAG_COMMENT) || (tagid == TAG_BRANCH) ){ |
| 2320 | continue; |
| 2321 | }else if( !isSpecialTag && zTagName && |
| 2322 | fossil_strcmp(&zTagName[4], zBranchName)==0){ |
| 2323 | continue; |
| 2324 | } |
| 2325 | sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid); |
| @@ -2350,10 +2360,19 @@ | |
| 2350 | @ onchange="chgcbn(this.checked,'%h(zBranchName)')" /> |
| 2351 | @ Make this check-in the start of a new branch named:</label> |
| 2352 | @ <input id="brname" type="text" style="width:15;" name="brname" |
| 2353 | @ value="%h(zNewBranch)" |
| 2354 | @ onkeyup="chgbn(this.value.trim(),'%h(zBranchName)')" /></td></tr> |
| 2355 | if( !fHasClosed ){ |
| 2356 | if( is_a_leaf(rid) ){ |
| 2357 | @ <tr><th align="right" valign="top">Leaf Closure:</th> |
| 2358 | @ <td valign="top"> |
| 2359 | @ <label><input type="checkbox" name="close"%s(zCloseFlag) /> |
| 2360 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2051,12 +2051,14 @@ | |
| 2051 | const char *zNewTagFlag; |
| 2052 | const char *zNewTag; |
| 2053 | const char *zNewBrFlag; |
| 2054 | const char *zNewBranch; |
| 2055 | const char *zCloseFlag; |
| 2056 | const char *zHideFlag; |
| 2057 | int fPropagateColor; /* True if color propagates before edit */ |
| 2058 | int fNewPropagateColor; /* True if color propagates after edit */ |
| 2059 | int fHasHidden = 0; /* True if hidden tag already set */ |
| 2060 | int fHasClosed = 0; /* True if closed tag already set */ |
| 2061 | const char *zChngTime = 0; /* Value of chngtime= query param, if any */ |
| 2062 | char *zUuid; |
| 2063 | Blob comment; |
| 2064 | char *zBranchName = 0; |
| @@ -2095,10 +2097,11 @@ | |
| 2097 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 2098 | zNewTag = PDT("tagname",""); |
| 2099 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 2100 | zNewBranch = PDT("brname",""); |
| 2101 | zCloseFlag = P("close") ? " checked" : ""; |
| 2102 | zHideFlag = P("hide") ? " checked" : ""; |
| 2103 | if( P("apply") ){ |
| 2104 | Blob ctrl; |
| 2105 | char *zNow; |
| 2106 | int nChng = 0; |
| 2107 | |
| @@ -2145,10 +2148,13 @@ | |
| 2148 | if( P(zLabel) ){ |
| 2149 | db_multi_exec("REPLACE INTO newtags VALUES(%Q,'-',NULL)", zTag); |
| 2150 | } |
| 2151 | } |
| 2152 | db_finalize(&q); |
| 2153 | if( zHideFlag[0] ){ |
| 2154 | db_multi_exec("REPLACE INTO newtags VALUES('hidden','*',NULL)"); |
| 2155 | } |
| 2156 | if( zCloseFlag[0] ){ |
| 2157 | db_multi_exec("REPLACE INTO newtags VALUES('closed','%s',NULL)", |
| 2158 | is_a_leaf(rid)?"+":"*"); |
| 2159 | } |
| 2160 | if( zNewTagFlag[0] && zNewTag[0] ){ |
| @@ -2207,16 +2213,18 @@ | |
| 2213 | @ <script> |
| 2214 | @ function chgcbn(checked, branch){ |
| 2215 | @ val = gebi('brname').value.trim(); |
| 2216 | @ if( !val || !checked ) val = branch; |
| 2217 | @ if( checked ) gebi('brname').select(); |
| 2218 | @ gebi('hbranch').textContent = val; |
| 2219 | @ cidbrid = document.getElementById('cbranch'); |
| 2220 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2221 | @ } |
| 2222 | @ function chgbn(val, branch){ |
| 2223 | @ if( !val ) val = branch; |
| 2224 | @ gebi('newbr').checked = (val!=branch); |
| 2225 | @ gebi('hbranch').textContent = val; |
| 2226 | @ cidbrid = document.getElementById('cbranch'); |
| 2227 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2228 | @ } |
| 2229 | @ </script> |
| 2230 | if( P("preview") ){ |
| @@ -2316,10 +2324,12 @@ | |
| 2324 | |
| 2325 | if( tagid == TAG_CLOSED ){ |
| 2326 | fHasClosed = 1; |
| 2327 | }else if( (tagid == TAG_COMMENT) || (tagid == TAG_BRANCH) ){ |
| 2328 | continue; |
| 2329 | }else if( tagid==TAG_HIDDEN ){ |
| 2330 | fHasHidden = 1; |
| 2331 | }else if( !isSpecialTag && zTagName && |
| 2332 | fossil_strcmp(&zTagName[4], zBranchName)==0){ |
| 2333 | continue; |
| 2334 | } |
| 2335 | sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid); |
| @@ -2350,10 +2360,19 @@ | |
| 2360 | @ onchange="chgcbn(this.checked,'%h(zBranchName)')" /> |
| 2361 | @ Make this check-in the start of a new branch named:</label> |
| 2362 | @ <input id="brname" type="text" style="width:15;" name="brname" |
| 2363 | @ value="%h(zNewBranch)" |
| 2364 | @ onkeyup="chgbn(this.value.trim(),'%h(zBranchName)')" /></td></tr> |
| 2365 | if( !fHasHidden ){ |
| 2366 | @ <tr><th align="right" valign="top">Branch Hiding:</th> |
| 2367 | @ <td valign="top"> |
| 2368 | @ <label><input type="checkbox" id="hidebr" name="hide"%s(zHideFlag) /> |
| 2369 | @ Hide branch |
| 2370 | @ <span style="font-weight:bold" id="hbranch">%h(zBranchName)</span> |
| 2371 | @ from the timeline starting from this check-in</label> |
| 2372 | @ </td></tr> |
| 2373 | } |
| 2374 | if( !fHasClosed ){ |
| 2375 | if( is_a_leaf(rid) ){ |
| 2376 | @ <tr><th align="right" valign="top">Leaf Closure:</th> |
| 2377 | @ <td valign="top"> |
| 2378 | @ <label><input type="checkbox" name="close"%s(zCloseFlag) /> |
| 2379 |