Fossil

Check-in [3529f2c4]
Login

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

Overview
Comment:If the name of a 'sym-<branchname>' tag sorts before the 'branch' tag, no option in the ci_edit page should be displayed to cancel the tag. Bug-fix discovered and implemented by Andy Bradford.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3529f2c47bb068692371220f4abf743b452b9b25
User & Date: jan.nijtmans 2013-12-16 10:46:47
Context
2013-12-17
00:55
Refactor the complex Win32-specific file routines into their own subsystem. check-in: d9ff9682 user: mistachkin tags: trunk
2013-12-16
11:00
Merge updates from trunk. Closed-Leaf check-in: fb17052e user: mistachkin tags: win32File
10:57
Merge trunk. Eliminate need for special Makefile.Cygwin. Simplify handling of '\\?\' prefix: Only add it when necessary (calculated path>=260 chars). check-in: 23b849cc user: jan.nijtmans tags: win32-longpath
10:46
If the name of a 'sym-<branchname>' tag sorts before the 'branch' tag, no option in the ci_edit page should be displayed to cancel the tag. Bug-fix discovered and implemented by Andy Bradford. check-in: 3529f2c4 user: jan.nijtmans tags: trunk
08:52
Recognize IE11's new UA string. check-in: 07a8e5d0 user: joel tags: trunk
2013-12-14
17:32
Revert to original ordering to retain sorting of special tags. Get the branch name prior to the loop that displays the special and sym- tags. Closed-Leaf check-in: 818c0acd user: andybradford tags: cancel-tag-fix
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/info.c.

  1768   1768     }
  1769   1769     modPending = moderation_pending(rid);
  1770   1770     if( modPending ){
  1771   1771       @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
  1772   1772     }
  1773   1773     @ <tr><th>Ticket:</th>
  1774   1774     @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a>
  1775         -  if(zTktTitle){
         1775  +  if( zTktTitle ){
  1776   1776           @<br>%h(zTktTitle)
  1777   1777     }
  1778   1778     @</td></tr>
  1779   1779     @ <tr><th>Date:</th><td>
  1780   1780     hyperlink_to_date(zDate, "</td></tr>");
  1781   1781     @ <tr><th>User:</th><td>
  1782   1782     hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>");
................................................................................
  2293   2293   
  2294   2294     @ <tr><th align="right" valign="top">Tags:</th>
  2295   2295     @ <td valign="top">
  2296   2296     @ <label><input type="checkbox" id="newtag" name="newtag"%s(zNewTagFlag) />
  2297   2297     @ Add the following new tag name to this check-in:</label>
  2298   2298     @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)"
  2299   2299     @ onkeyup="gebi('newtag').checked=!!this.value" />
         2300  +  zBranchName = db_text(0, "SELECT value FROM tagxref, tag"
         2301  +     " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
         2302  +     " AND tagxref.tagid=%d", rid, TAG_BRANCH);
  2300   2303     db_prepare(&q,
  2301   2304        "SELECT tag.tagid, tagname, tagxref.value FROM tagxref, tag"
  2302   2305        " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
  2303   2306        " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)"
  2304   2307        "               ELSE tagname END /*sort*/",
  2305   2308        rid
  2306   2309     );
  2307   2310     while( db_step(&q)==SQLITE_ROW ){
  2308   2311       int tagid = db_column_int(&q, 0);
  2309   2312       const char *zTagName = db_column_text(&q, 1);
  2310         -    int isSpecialTag = strncmp(zTagName, "sym-", 4)!=0;
         2313  +    int isSpecialTag = fossil_strncmp(zTagName, "sym-", 4)!=0;
  2311   2314       char zLabel[30];
  2312   2315   
  2313         -    if (tagid == TAG_CLOSED){
         2316  +    if( tagid == TAG_CLOSED ){
  2314   2317         fHasClosed = 1;
  2315         -    }else if (tagid == TAG_COMMENT){
         2318  +    }else if( (tagid == TAG_COMMENT) || (tagid == TAG_BRANCH) ){
  2316   2319         continue;
  2317         -    }else if (tagid == TAG_BRANCH){
  2318         -      zBranchName = mprintf("%s", db_column_text(&q, 2));
  2319         -      continue;
  2320         -    }else if( !isSpecialTag && zBranchName &&
  2321         -        strcmp(&zTagName[4], zBranchName)==0){
         2320  +    }else if( !isSpecialTag && zTagName &&
         2321  +        fossil_strcmp(&zTagName[4], zBranchName)==0){
  2322   2322         continue;
  2323   2323       }
  2324   2324       sqlite3_snprintf(sizeof(zLabel), zLabel, "c%d", tagid);
  2325   2325       @ <br /><label>
  2326   2326       if( P(zLabel) ){
  2327   2327         @ <input type="checkbox" name="c%d(tagid)" checked="checked" />
  2328   2328       }else{
................................................................................
  2366   2366         @ Mark branch
  2367   2367         @ <span style="font-weight:bold" id="cbranch">%h(zBranchName)</span>
  2368   2368         @ as "closed" so that its leafs no longer appear on the "leaves" page
  2369   2369         @ and are no longer labeled as a leaf "<b>Leaf</b>"</label>
  2370   2370         @ </td></tr>
  2371   2371       }
  2372   2372     }
  2373         -  if(zBranchName) fossil_free(zBranchName);
         2373  +  if( zBranchName ) fossil_free(zBranchName);
  2374   2374   
  2375   2375   
  2376   2376     @ <tr><td colspan="2">
  2377   2377     @ <input type="submit" name="preview" value="Preview" />
  2378   2378     @ <input type="submit" name="apply" value="Apply Changes" />
  2379   2379     @ <input type="submit" name="cancel" value="Cancel" />
  2380   2380     @ </td></tr>
  2381   2381     @ </table>
  2382   2382     @ </div></form>
  2383   2383     style_footer();
  2384   2384   }