Fossil SCM
Merge in latest fixes.
Commit
5460b0cfa22de7f4a24e2cbd3959d4c1bd000d02
Parent
4b1b56c99cb498f…
15 files changed
+8
-11
+9
-9
+2
+1
-1
+1
-1
+4
-4
+28
-34
+2
-4
+12
-19
+10
+1
-1
+20
+2
-2
+2
-2
+2
-2
+8
-11
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -85,11 +85,11 @@ | ||
| 85 | 85 | |
| 86 | 86 | for(i=0; zPath[i]; i=j){ |
| 87 | 87 | for(j=i; zPath[j] && zPath[j]!='/'; j++){} |
| 88 | 88 | if( zPath[j] && g.perm.Hyperlink ){ |
| 89 | 89 | if( zCI ){ |
| 90 | - char *zLink = href("%R/%s?ci=%S&name=%#T%s", zURI, zCI, j, zPath,zREx); | |
| 90 | + char *zLink = href("%R/%s?name=%#T%s&ci=%s", zURI, j, zPath, zREx, zCI); | |
| 91 | 91 | blob_appendf(pOut, "%s%z%#h</a>", |
| 92 | 92 | zSep, zLink, j-i, &zPath[i]); |
| 93 | 93 | }else{ |
| 94 | 94 | char *zLink = href("%R/%s?name=%#T%s", zURI, j, zPath, zREx); |
| 95 | 95 | blob_appendf(pOut, "%s%z%#h</a>", |
| @@ -179,18 +179,15 @@ | ||
| 179 | 179 | if( linkTip ){ |
| 180 | 180 | style_submenu_element("Tip", "Tip", "%s", |
| 181 | 181 | url_render(&sURI, "ci", "tip", 0, 0)); |
| 182 | 182 | } |
| 183 | 183 | if( zCI ){ |
| 184 | - char zShort[20]; | |
| 185 | - memcpy(zShort, zUuid, 10); | |
| 186 | - zShort[10] = 0; | |
| 187 | - @ <h2>Files of check-in [%z(href("vinfo?name=%T",zUuid))%s(zShort)</a>] | |
| 184 | + @ <h2>Files of check-in [%z(href("vinfo?name=%s",zUuid))%.10s(zUuid)</a>] | |
| 188 | 185 | @ %s(blob_str(&dirname))</h2> |
| 189 | - zSubdirLink = mprintf("%R/dir?ci=%S&name=%T", zUuid, zPrefix); | |
| 186 | + zSubdirLink = mprintf("%R/dir?ci=%s&name=%T", zUuid, zPrefix); | |
| 190 | 187 | if( nD==0 ){ |
| 191 | - style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%S", | |
| 188 | + style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s", | |
| 192 | 189 | zUuid); |
| 193 | 190 | } |
| 194 | 191 | }else{ |
| 195 | 192 | @ <h2>The union of all files from all check-ins |
| 196 | 193 | @ %s(blob_str(&dirname))</h2> |
| @@ -490,11 +487,11 @@ | ||
| 490 | 487 | } |
| 491 | 488 | if( zCI ){ |
| 492 | 489 | style_submenu_element("All", "All", "%s", |
| 493 | 490 | url_render(&sURI, "ci", 0, 0, 0)); |
| 494 | 491 | if( nD==0 && !showDirOnly ){ |
| 495 | - style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%S", | |
| 492 | + style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s", | |
| 496 | 493 | zUuid); |
| 497 | 494 | } |
| 498 | 495 | } |
| 499 | 496 | if( linkTrunk ){ |
| 500 | 497 | style_submenu_element("Trunk", "Trunk", "%s", |
| @@ -574,11 +571,11 @@ | ||
| 574 | 571 | if( zCI ){ |
| 575 | 572 | @ <h2>%d(nFile) %s(zObjType) of check-in |
| 576 | 573 | if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){ |
| 577 | 574 | @ "%h(zCI)" |
| 578 | 575 | } |
| 579 | - @ [%z(href("vinfo?name=%T",zUuid))%S(zUuid)</a>] %s(blob_str(&dirname))</h2> | |
| 576 | + @ [%z(href("vinfo?name=%s",zUuid))%S(zUuid)</a>] %s(blob_str(&dirname))</h2> | |
| 580 | 577 | }else{ |
| 581 | 578 | int n = db_int(0, "SELECT count(*) FROM plink"); |
| 582 | 579 | @ <h2>%d(nFile) %s(zObjType) from all %d(n) check-ins |
| 583 | 580 | @ %s(blob_str(&dirname))</h2> |
| 584 | 581 | } |
| @@ -617,11 +614,11 @@ | ||
| 617 | 614 | nDir++; |
| 618 | 615 | }else if( !showDirOnly ){ |
| 619 | 616 | const char *zFileClass = fileext_class(p->zName); |
| 620 | 617 | char *zLink; |
| 621 | 618 | if( zCI ){ |
| 622 | - zLink = href("%R/artifact/%S",p->zUuid); | |
| 619 | + zLink = href("%R/artifact/%s",p->zUuid); | |
| 623 | 620 | }else{ |
| 624 | 621 | zLink = href("%R/finfo?name=%T",p->zFullName); |
| 625 | 622 | } |
| 626 | 623 | @ <li class="%z(zFileClass)%s(zLastClass)">%z(zLink)%h(p->zName)</a> |
| 627 | 624 | } |
| @@ -875,14 +872,14 @@ | ||
| 875 | 872 | zAge[0] = 0; |
| 876 | 873 | } |
| 877 | 874 | @ <tr> |
| 878 | 875 | @ <td>%s(zAge) |
| 879 | 876 | @ <td width="25"> |
| 880 | - @ <td>%z(href("%R/artifact/%S?ln", zFUuid))%h(db_column_text(&q, 3))</a> | |
| 877 | + @ <td>%z(href("%R/artifact/%s?ln", zFUuid))%h(db_column_text(&q, 3))</a> | |
| 881 | 878 | @ </tr> |
| 882 | 879 | @ |
| 883 | 880 | } |
| 884 | 881 | @ <tr><td colspan=3><hr></tr> |
| 885 | 882 | @ </table> |
| 886 | 883 | db_finalize(&q); |
| 887 | 884 | style_footer(); |
| 888 | 885 | } |
| 889 | 886 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -85,11 +85,11 @@ | |
| 85 | |
| 86 | for(i=0; zPath[i]; i=j){ |
| 87 | for(j=i; zPath[j] && zPath[j]!='/'; j++){} |
| 88 | if( zPath[j] && g.perm.Hyperlink ){ |
| 89 | if( zCI ){ |
| 90 | char *zLink = href("%R/%s?ci=%S&name=%#T%s", zURI, zCI, j, zPath,zREx); |
| 91 | blob_appendf(pOut, "%s%z%#h</a>", |
| 92 | zSep, zLink, j-i, &zPath[i]); |
| 93 | }else{ |
| 94 | char *zLink = href("%R/%s?name=%#T%s", zURI, j, zPath, zREx); |
| 95 | blob_appendf(pOut, "%s%z%#h</a>", |
| @@ -179,18 +179,15 @@ | |
| 179 | if( linkTip ){ |
| 180 | style_submenu_element("Tip", "Tip", "%s", |
| 181 | url_render(&sURI, "ci", "tip", 0, 0)); |
| 182 | } |
| 183 | if( zCI ){ |
| 184 | char zShort[20]; |
| 185 | memcpy(zShort, zUuid, 10); |
| 186 | zShort[10] = 0; |
| 187 | @ <h2>Files of check-in [%z(href("vinfo?name=%T",zUuid))%s(zShort)</a>] |
| 188 | @ %s(blob_str(&dirname))</h2> |
| 189 | zSubdirLink = mprintf("%R/dir?ci=%S&name=%T", zUuid, zPrefix); |
| 190 | if( nD==0 ){ |
| 191 | style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%S", |
| 192 | zUuid); |
| 193 | } |
| 194 | }else{ |
| 195 | @ <h2>The union of all files from all check-ins |
| 196 | @ %s(blob_str(&dirname))</h2> |
| @@ -490,11 +487,11 @@ | |
| 490 | } |
| 491 | if( zCI ){ |
| 492 | style_submenu_element("All", "All", "%s", |
| 493 | url_render(&sURI, "ci", 0, 0, 0)); |
| 494 | if( nD==0 && !showDirOnly ){ |
| 495 | style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%S", |
| 496 | zUuid); |
| 497 | } |
| 498 | } |
| 499 | if( linkTrunk ){ |
| 500 | style_submenu_element("Trunk", "Trunk", "%s", |
| @@ -574,11 +571,11 @@ | |
| 574 | if( zCI ){ |
| 575 | @ <h2>%d(nFile) %s(zObjType) of check-in |
| 576 | if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){ |
| 577 | @ "%h(zCI)" |
| 578 | } |
| 579 | @ [%z(href("vinfo?name=%T",zUuid))%S(zUuid)</a>] %s(blob_str(&dirname))</h2> |
| 580 | }else{ |
| 581 | int n = db_int(0, "SELECT count(*) FROM plink"); |
| 582 | @ <h2>%d(nFile) %s(zObjType) from all %d(n) check-ins |
| 583 | @ %s(blob_str(&dirname))</h2> |
| 584 | } |
| @@ -617,11 +614,11 @@ | |
| 617 | nDir++; |
| 618 | }else if( !showDirOnly ){ |
| 619 | const char *zFileClass = fileext_class(p->zName); |
| 620 | char *zLink; |
| 621 | if( zCI ){ |
| 622 | zLink = href("%R/artifact/%S",p->zUuid); |
| 623 | }else{ |
| 624 | zLink = href("%R/finfo?name=%T",p->zFullName); |
| 625 | } |
| 626 | @ <li class="%z(zFileClass)%s(zLastClass)">%z(zLink)%h(p->zName)</a> |
| 627 | } |
| @@ -875,14 +872,14 @@ | |
| 875 | zAge[0] = 0; |
| 876 | } |
| 877 | @ <tr> |
| 878 | @ <td>%s(zAge) |
| 879 | @ <td width="25"> |
| 880 | @ <td>%z(href("%R/artifact/%S?ln", zFUuid))%h(db_column_text(&q, 3))</a> |
| 881 | @ </tr> |
| 882 | @ |
| 883 | } |
| 884 | @ <tr><td colspan=3><hr></tr> |
| 885 | @ </table> |
| 886 | db_finalize(&q); |
| 887 | style_footer(); |
| 888 | } |
| 889 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -85,11 +85,11 @@ | |
| 85 | |
| 86 | for(i=0; zPath[i]; i=j){ |
| 87 | for(j=i; zPath[j] && zPath[j]!='/'; j++){} |
| 88 | if( zPath[j] && g.perm.Hyperlink ){ |
| 89 | if( zCI ){ |
| 90 | char *zLink = href("%R/%s?name=%#T%s&ci=%s", zURI, j, zPath, zREx, zCI); |
| 91 | blob_appendf(pOut, "%s%z%#h</a>", |
| 92 | zSep, zLink, j-i, &zPath[i]); |
| 93 | }else{ |
| 94 | char *zLink = href("%R/%s?name=%#T%s", zURI, j, zPath, zREx); |
| 95 | blob_appendf(pOut, "%s%z%#h</a>", |
| @@ -179,18 +179,15 @@ | |
| 179 | if( linkTip ){ |
| 180 | style_submenu_element("Tip", "Tip", "%s", |
| 181 | url_render(&sURI, "ci", "tip", 0, 0)); |
| 182 | } |
| 183 | if( zCI ){ |
| 184 | @ <h2>Files of check-in [%z(href("vinfo?name=%s",zUuid))%.10s(zUuid)</a>] |
| 185 | @ %s(blob_str(&dirname))</h2> |
| 186 | zSubdirLink = mprintf("%R/dir?ci=%s&name=%T", zUuid, zPrefix); |
| 187 | if( nD==0 ){ |
| 188 | style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s", |
| 189 | zUuid); |
| 190 | } |
| 191 | }else{ |
| 192 | @ <h2>The union of all files from all check-ins |
| 193 | @ %s(blob_str(&dirname))</h2> |
| @@ -490,11 +487,11 @@ | |
| 487 | } |
| 488 | if( zCI ){ |
| 489 | style_submenu_element("All", "All", "%s", |
| 490 | url_render(&sURI, "ci", 0, 0, 0)); |
| 491 | if( nD==0 && !showDirOnly ){ |
| 492 | style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s", |
| 493 | zUuid); |
| 494 | } |
| 495 | } |
| 496 | if( linkTrunk ){ |
| 497 | style_submenu_element("Trunk", "Trunk", "%s", |
| @@ -574,11 +571,11 @@ | |
| 571 | if( zCI ){ |
| 572 | @ <h2>%d(nFile) %s(zObjType) of check-in |
| 573 | if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){ |
| 574 | @ "%h(zCI)" |
| 575 | } |
| 576 | @ [%z(href("vinfo?name=%s",zUuid))%S(zUuid)</a>] %s(blob_str(&dirname))</h2> |
| 577 | }else{ |
| 578 | int n = db_int(0, "SELECT count(*) FROM plink"); |
| 579 | @ <h2>%d(nFile) %s(zObjType) from all %d(n) check-ins |
| 580 | @ %s(blob_str(&dirname))</h2> |
| 581 | } |
| @@ -617,11 +614,11 @@ | |
| 614 | nDir++; |
| 615 | }else if( !showDirOnly ){ |
| 616 | const char *zFileClass = fileext_class(p->zName); |
| 617 | char *zLink; |
| 618 | if( zCI ){ |
| 619 | zLink = href("%R/artifact/%s",p->zUuid); |
| 620 | }else{ |
| 621 | zLink = href("%R/finfo?name=%T",p->zFullName); |
| 622 | } |
| 623 | @ <li class="%z(zFileClass)%s(zLastClass)">%z(zLink)%h(p->zName)</a> |
| 624 | } |
| @@ -875,14 +872,14 @@ | |
| 872 | zAge[0] = 0; |
| 873 | } |
| 874 | @ <tr> |
| 875 | @ <td>%s(zAge) |
| 876 | @ <td width="25"> |
| 877 | @ <td>%z(href("%R/artifact/%s?ln", zFUuid))%h(db_column_text(&q, 3))</a> |
| 878 | @ </tr> |
| 879 | @ |
| 880 | } |
| 881 | @ <tr><td colspan=3><hr></tr> |
| 882 | @ </table> |
| 883 | db_finalize(&q); |
| 884 | style_footer(); |
| 885 | } |
| 886 |
+9
-9
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -2307,17 +2307,17 @@ | ||
| 2307 | 2307 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2308 | 2308 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2309 | 2309 | } |
| 2310 | 2310 | |
| 2311 | 2311 | if( showLog ){ |
| 2312 | - char *zLink = href("%R/finfo?name=%t&ci=%S",zFilename,zCI); | |
| 2312 | + char *zLink = href("%R/finfo?name=%t&ci=%s",zFilename,zCI); | |
| 2313 | 2313 | @ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2> |
| 2314 | 2314 | @ <ol> |
| 2315 | 2315 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2316 | 2316 | @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) |
| 2317 | - @ check-in %z(href("%R/info/%S",p->zMUuid))%.10s(p->zMUuid)</a> | |
| 2318 | - @ artifact %z(href("%R/artifact/%S",p->zFUuid))%.10s(p->zFUuid)</a> | |
| 2317 | + @ check-in %z(href("%R/info/%s",p->zMUuid))%.10s(p->zMUuid)</a> | |
| 2318 | + @ artifact %z(href("%R/artifact/%s",p->zFUuid))%.10s(p->zFUuid)</a> | |
| 2319 | 2319 | @ </span> |
| 2320 | 2320 | #if 0 |
| 2321 | 2321 | if( i>0 ){ |
| 2322 | 2322 | char *zLink = xhref("target='infowindow'", |
| 2323 | 2323 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| @@ -2335,17 +2335,17 @@ | ||
| 2335 | 2335 | @ </ol> |
| 2336 | 2336 | @ <hr> |
| 2337 | 2337 | } |
| 2338 | 2338 | if( !ann.bLimit ){ |
| 2339 | 2339 | @ <h2>Origin for each line in |
| 2340 | - @ %z(href("%R/finfo?name=%h&ci=%S", zFilename, zCI))%h(zFilename)</a> | |
| 2341 | - @ from check-in %z(href("%R/info/%S",zCI))%S(zCI)</a>:</h2> | |
| 2340 | + @ %z(href("%R/finfo?name=%h&ci=%s", zFilename, zCI))%h(zFilename)</a> | |
| 2341 | + @ from check-in %z(href("%R/info/%s",zCI))%S(zCI)</a>:</h2> | |
| 2342 | 2342 | iLimit = ann.nVers+10; |
| 2343 | 2343 | }else{ |
| 2344 | 2344 | @ <h2>Lines added by the %d(iLimit) most recent ancestors of |
| 2345 | - @ %z(href("%R/finfo?name=%h&ci=%S", zFilename, zCI))%h(zFilename)</a> | |
| 2346 | - @ from check-in %z(href("%R/info/%S",zCI))%S(zCI)</a>:</h2> | |
| 2345 | + @ %z(href("%R/finfo?name=%h&ci=%s", zFilename, zCI))%h(zFilename)</a> | |
| 2346 | + @ from check-in %z(href("%R/info/%s",zCI))%S(zCI)</a>:</h2> | |
| 2347 | 2347 | } |
| 2348 | 2348 | @ <pre> |
| 2349 | 2349 | for(i=0; i<ann.nOrig; i++){ |
| 2350 | 2350 | int iVers = ann.aOrig[i].iVers; |
| 2351 | 2351 | char *z = (char*)ann.aOrig[i].z; |
| @@ -2355,11 +2355,11 @@ | ||
| 2355 | 2355 | if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1; |
| 2356 | 2356 | |
| 2357 | 2357 | if( bBlame ){ |
| 2358 | 2358 | if( iVers>=0 ){ |
| 2359 | 2359 | struct AnnVers *p = ann.aVers+iVers; |
| 2360 | - char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid); | |
| 2360 | + char *zLink = xhref("target='infowindow'", "%R/info/%s", p->zMUuid); | |
| 2361 | 2361 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, |
| 2362 | 2362 | "<span style='background-color:%s'>" |
| 2363 | 2363 | "%s%.10s</a> %s</span> %13.13s:", |
| 2364 | 2364 | p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser); |
| 2365 | 2365 | fossil_free(zLink); |
| @@ -2367,11 +2367,11 @@ | ||
| 2367 | 2367 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s", ""); |
| 2368 | 2368 | } |
| 2369 | 2369 | }else{ |
| 2370 | 2370 | if( iVers>=0 ){ |
| 2371 | 2371 | struct AnnVers *p = ann.aVers+iVers; |
| 2372 | - char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid); | |
| 2372 | + char *zLink = xhref("target='infowindow'", "%R/info/%s", p->zMUuid); | |
| 2373 | 2373 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, |
| 2374 | 2374 | "<span style='background-color:%s'>" |
| 2375 | 2375 | "%s%.10s</a> %s</span> %4d:", |
| 2376 | 2376 | p->zBgColor, zLink, p->zMUuid, p->zDate, i+1); |
| 2377 | 2377 | fossil_free(zLink); |
| 2378 | 2378 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2307,17 +2307,17 @@ | |
| 2307 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2308 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2309 | } |
| 2310 | |
| 2311 | if( showLog ){ |
| 2312 | char *zLink = href("%R/finfo?name=%t&ci=%S",zFilename,zCI); |
| 2313 | @ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2> |
| 2314 | @ <ol> |
| 2315 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2316 | @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) |
| 2317 | @ check-in %z(href("%R/info/%S",p->zMUuid))%.10s(p->zMUuid)</a> |
| 2318 | @ artifact %z(href("%R/artifact/%S",p->zFUuid))%.10s(p->zFUuid)</a> |
| 2319 | @ </span> |
| 2320 | #if 0 |
| 2321 | if( i>0 ){ |
| 2322 | char *zLink = xhref("target='infowindow'", |
| 2323 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| @@ -2335,17 +2335,17 @@ | |
| 2335 | @ </ol> |
| 2336 | @ <hr> |
| 2337 | } |
| 2338 | if( !ann.bLimit ){ |
| 2339 | @ <h2>Origin for each line in |
| 2340 | @ %z(href("%R/finfo?name=%h&ci=%S", zFilename, zCI))%h(zFilename)</a> |
| 2341 | @ from check-in %z(href("%R/info/%S",zCI))%S(zCI)</a>:</h2> |
| 2342 | iLimit = ann.nVers+10; |
| 2343 | }else{ |
| 2344 | @ <h2>Lines added by the %d(iLimit) most recent ancestors of |
| 2345 | @ %z(href("%R/finfo?name=%h&ci=%S", zFilename, zCI))%h(zFilename)</a> |
| 2346 | @ from check-in %z(href("%R/info/%S",zCI))%S(zCI)</a>:</h2> |
| 2347 | } |
| 2348 | @ <pre> |
| 2349 | for(i=0; i<ann.nOrig; i++){ |
| 2350 | int iVers = ann.aOrig[i].iVers; |
| 2351 | char *z = (char*)ann.aOrig[i].z; |
| @@ -2355,11 +2355,11 @@ | |
| 2355 | if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1; |
| 2356 | |
| 2357 | if( bBlame ){ |
| 2358 | if( iVers>=0 ){ |
| 2359 | struct AnnVers *p = ann.aVers+iVers; |
| 2360 | char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid); |
| 2361 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, |
| 2362 | "<span style='background-color:%s'>" |
| 2363 | "%s%.10s</a> %s</span> %13.13s:", |
| 2364 | p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser); |
| 2365 | fossil_free(zLink); |
| @@ -2367,11 +2367,11 @@ | |
| 2367 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s", ""); |
| 2368 | } |
| 2369 | }else{ |
| 2370 | if( iVers>=0 ){ |
| 2371 | struct AnnVers *p = ann.aVers+iVers; |
| 2372 | char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid); |
| 2373 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, |
| 2374 | "<span style='background-color:%s'>" |
| 2375 | "%s%.10s</a> %s</span> %4d:", |
| 2376 | p->zBgColor, zLink, p->zMUuid, p->zDate, i+1); |
| 2377 | fossil_free(zLink); |
| 2378 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2307,17 +2307,17 @@ | |
| 2307 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2308 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2309 | } |
| 2310 | |
| 2311 | if( showLog ){ |
| 2312 | char *zLink = href("%R/finfo?name=%t&ci=%s",zFilename,zCI); |
| 2313 | @ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2> |
| 2314 | @ <ol> |
| 2315 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2316 | @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) |
| 2317 | @ check-in %z(href("%R/info/%s",p->zMUuid))%.10s(p->zMUuid)</a> |
| 2318 | @ artifact %z(href("%R/artifact/%s",p->zFUuid))%.10s(p->zFUuid)</a> |
| 2319 | @ </span> |
| 2320 | #if 0 |
| 2321 | if( i>0 ){ |
| 2322 | char *zLink = xhref("target='infowindow'", |
| 2323 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| @@ -2335,17 +2335,17 @@ | |
| 2335 | @ </ol> |
| 2336 | @ <hr> |
| 2337 | } |
| 2338 | if( !ann.bLimit ){ |
| 2339 | @ <h2>Origin for each line in |
| 2340 | @ %z(href("%R/finfo?name=%h&ci=%s", zFilename, zCI))%h(zFilename)</a> |
| 2341 | @ from check-in %z(href("%R/info/%s",zCI))%S(zCI)</a>:</h2> |
| 2342 | iLimit = ann.nVers+10; |
| 2343 | }else{ |
| 2344 | @ <h2>Lines added by the %d(iLimit) most recent ancestors of |
| 2345 | @ %z(href("%R/finfo?name=%h&ci=%s", zFilename, zCI))%h(zFilename)</a> |
| 2346 | @ from check-in %z(href("%R/info/%s",zCI))%S(zCI)</a>:</h2> |
| 2347 | } |
| 2348 | @ <pre> |
| 2349 | for(i=0; i<ann.nOrig; i++){ |
| 2350 | int iVers = ann.aOrig[i].iVers; |
| 2351 | char *z = (char*)ann.aOrig[i].z; |
| @@ -2355,11 +2355,11 @@ | |
| 2355 | if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1; |
| 2356 | |
| 2357 | if( bBlame ){ |
| 2358 | if( iVers>=0 ){ |
| 2359 | struct AnnVers *p = ann.aVers+iVers; |
| 2360 | char *zLink = xhref("target='infowindow'", "%R/info/%s", p->zMUuid); |
| 2361 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, |
| 2362 | "<span style='background-color:%s'>" |
| 2363 | "%s%.10s</a> %s</span> %13.13s:", |
| 2364 | p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser); |
| 2365 | fossil_free(zLink); |
| @@ -2367,11 +2367,11 @@ | |
| 2367 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s", ""); |
| 2368 | } |
| 2369 | }else{ |
| 2370 | if( iVers>=0 ){ |
| 2371 | struct AnnVers *p = ann.aVers+iVers; |
| 2372 | char *zLink = xhref("target='infowindow'", "%R/info/%s", p->zMUuid); |
| 2373 | sqlite3_snprintf(sizeof(zPrefix), zPrefix, |
| 2374 | "<span style='background-color:%s'>" |
| 2375 | "%s%.10s</a> %s</span> %4d:", |
| 2376 | p->zBgColor, zLink, p->zMUuid, p->zDate, i+1); |
| 2377 | fossil_free(zLink); |
| 2378 |
+2
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -977,10 +977,12 @@ | ||
| 977 | 977 | for(j=i+1; zPwd[j]; j++){ |
| 978 | 978 | if( zPwd[j]=='/' ){ |
| 979 | 979 | blob_append(pOut, "/..", 3); |
| 980 | 980 | } |
| 981 | 981 | } |
| 982 | + while( i>0 && (zPwd[i]!='/')) --i; | |
| 983 | + blob_append(pOut, zPath+i, j-i); | |
| 982 | 984 | } |
| 983 | 985 | if( slash && i>0 && zPath[strlen(zPath)-1]=='/'){ |
| 984 | 986 | blob_append(pOut, "/", 1); |
| 985 | 987 | } |
| 986 | 988 | blob_reset(&tmp); |
| 987 | 989 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -977,10 +977,12 @@ | |
| 977 | for(j=i+1; zPwd[j]; j++){ |
| 978 | if( zPwd[j]=='/' ){ |
| 979 | blob_append(pOut, "/..", 3); |
| 980 | } |
| 981 | } |
| 982 | } |
| 983 | if( slash && i>0 && zPath[strlen(zPath)-1]=='/'){ |
| 984 | blob_append(pOut, "/", 1); |
| 985 | } |
| 986 | blob_reset(&tmp); |
| 987 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -977,10 +977,12 @@ | |
| 977 | for(j=i+1; zPwd[j]; j++){ |
| 978 | if( zPwd[j]=='/' ){ |
| 979 | blob_append(pOut, "/..", 3); |
| 980 | } |
| 981 | } |
| 982 | while( i>0 && (zPwd[i]!='/')) --i; |
| 983 | blob_append(pOut, zPath+i, j-i); |
| 984 | } |
| 985 | if( slash && i>0 && zPath[strlen(zPath)-1]=='/'){ |
| 986 | blob_append(pOut, "/", 1); |
| 987 | } |
| 988 | blob_reset(&tmp); |
| 989 |
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1189,11 +1189,11 @@ | ||
| 1189 | 1189 | } |
| 1190 | 1190 | @ - %!w(zCom) (user: |
| 1191 | 1191 | hyperlink_to_user(zUser,zDate,")"); |
| 1192 | 1192 | if( g.perm.Hyperlink ){ |
| 1193 | 1193 | @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a> |
| 1194 | - @ %z(href("%R/annotate?checkin=%s&filename=%T",zVers,zName)) | |
| 1194 | + @ %z(href("%R/annotate?filename=%T&checkin=%s",zName,zVers)) | |
| 1195 | 1195 | @ [annotate]</a> |
| 1196 | 1196 | @ %z(href("%R/blame?filename=%T&checkin=%s",zName,zVers)) |
| 1197 | 1197 | @ [blame]</a> |
| 1198 | 1198 | } |
| 1199 | 1199 | cnt++; |
| 1200 | 1200 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | } |
| 1190 | @ - %!w(zCom) (user: |
| 1191 | hyperlink_to_user(zUser,zDate,")"); |
| 1192 | if( g.perm.Hyperlink ){ |
| 1193 | @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a> |
| 1194 | @ %z(href("%R/annotate?checkin=%s&filename=%T",zVers,zName)) |
| 1195 | @ [annotate]</a> |
| 1196 | @ %z(href("%R/blame?filename=%T&checkin=%s",zName,zVers)) |
| 1197 | @ [blame]</a> |
| 1198 | } |
| 1199 | cnt++; |
| 1200 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | } |
| 1190 | @ - %!w(zCom) (user: |
| 1191 | hyperlink_to_user(zUser,zDate,")"); |
| 1192 | if( g.perm.Hyperlink ){ |
| 1193 | @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a> |
| 1194 | @ %z(href("%R/annotate?filename=%T&checkin=%s",zName,zVers)) |
| 1195 | @ [annotate]</a> |
| 1196 | @ %z(href("%R/blame?filename=%T&checkin=%s",zName,zVers)) |
| 1197 | @ [blame]</a> |
| 1198 | } |
| 1199 | cnt++; |
| 1200 |
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1189,11 +1189,11 @@ | ||
| 1189 | 1189 | } |
| 1190 | 1190 | @ - %!w(zCom) (user: |
| 1191 | 1191 | hyperlink_to_user(zUser,zDate,")"); |
| 1192 | 1192 | if( g.perm.Hyperlink ){ |
| 1193 | 1193 | @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a> |
| 1194 | - @ %z(href("%R/annotate?checkin=%s&filename=%T",zVers,zName)) | |
| 1194 | + @ %z(href("%R/annotate?filename=%T&checkin=%s",zName,zVers)) | |
| 1195 | 1195 | @ [annotate]</a> |
| 1196 | 1196 | @ %z(href("%R/blame?filename=%T&checkin=%s",zName,zVers)) |
| 1197 | 1197 | @ [blame]</a> |
| 1198 | 1198 | } |
| 1199 | 1199 | cnt++; |
| 1200 | 1200 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | } |
| 1190 | @ - %!w(zCom) (user: |
| 1191 | hyperlink_to_user(zUser,zDate,")"); |
| 1192 | if( g.perm.Hyperlink ){ |
| 1193 | @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a> |
| 1194 | @ %z(href("%R/annotate?checkin=%s&filename=%T",zVers,zName)) |
| 1195 | @ [annotate]</a> |
| 1196 | @ %z(href("%R/blame?filename=%T&checkin=%s",zName,zVers)) |
| 1197 | @ [blame]</a> |
| 1198 | } |
| 1199 | cnt++; |
| 1200 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | } |
| 1190 | @ - %!w(zCom) (user: |
| 1191 | hyperlink_to_user(zUser,zDate,")"); |
| 1192 | if( g.perm.Hyperlink ){ |
| 1193 | @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a> |
| 1194 | @ %z(href("%R/annotate?filename=%T&checkin=%s",zName,zVers)) |
| 1195 | @ [annotate]</a> |
| 1196 | @ %z(href("%R/blame?filename=%T&checkin=%s",zName,zVers)) |
| 1197 | @ [blame]</a> |
| 1198 | } |
| 1199 | cnt++; |
| 1200 |
+4
-4
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -444,12 +444,12 @@ | ||
| 444 | 444 | #### The directories where the OpenSSL include and library files are located. |
| 445 | 445 | # The recommended usage here is to use the Sysinternals junction tool |
| 446 | 446 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 447 | 447 | # Fossil source code directory and the target OpenSSL source directory. |
| 448 | 448 | # |
| 449 | -OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1f/include | |
| 450 | -OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1f | |
| 449 | +OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1g/include | |
| 450 | +OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1g | |
| 451 | 451 | |
| 452 | 452 | #### Either the directory where the Tcl library is installed or the Tcl |
| 453 | 453 | # source code directory resides (depending on the value of the macro |
| 454 | 454 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 455 | 455 | # this directory must have "include" and "lib" sub-directories. If |
| @@ -1012,12 +1012,12 @@ | ||
| 1012 | 1012 | |
| 1013 | 1013 | # Uncomment to enable Tcl support |
| 1014 | 1014 | # FOSSIL_ENABLE_TCL = 1 |
| 1015 | 1015 | |
| 1016 | 1016 | !ifdef FOSSIL_ENABLE_SSL |
| 1017 | -SSLINCDIR = $(B)\compat\openssl-1.0.1f\include | |
| 1018 | -SSLLIBDIR = $(B)\compat\openssl-1.0.1f\out32 | |
| 1017 | +SSLINCDIR = $(B)\compat\openssl-1.0.1g\include | |
| 1018 | +SSLLIBDIR = $(B)\compat\openssl-1.0.1g\out32 | |
| 1019 | 1019 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1020 | 1020 | !endif |
| 1021 | 1021 | |
| 1022 | 1022 | !ifdef FOSSIL_ENABLE_TCL |
| 1023 | 1023 | TCLDIR = $(B)\compat\tcl-8.6 |
| 1024 | 1024 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -444,12 +444,12 @@ | |
| 444 | #### The directories where the OpenSSL include and library files are located. |
| 445 | # The recommended usage here is to use the Sysinternals junction tool |
| 446 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 447 | # Fossil source code directory and the target OpenSSL source directory. |
| 448 | # |
| 449 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1f/include |
| 450 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1f |
| 451 | |
| 452 | #### Either the directory where the Tcl library is installed or the Tcl |
| 453 | # source code directory resides (depending on the value of the macro |
| 454 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 455 | # this directory must have "include" and "lib" sub-directories. If |
| @@ -1012,12 +1012,12 @@ | |
| 1012 | |
| 1013 | # Uncomment to enable Tcl support |
| 1014 | # FOSSIL_ENABLE_TCL = 1 |
| 1015 | |
| 1016 | !ifdef FOSSIL_ENABLE_SSL |
| 1017 | SSLINCDIR = $(B)\compat\openssl-1.0.1f\include |
| 1018 | SSLLIBDIR = $(B)\compat\openssl-1.0.1f\out32 |
| 1019 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1020 | !endif |
| 1021 | |
| 1022 | !ifdef FOSSIL_ENABLE_TCL |
| 1023 | TCLDIR = $(B)\compat\tcl-8.6 |
| 1024 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -444,12 +444,12 @@ | |
| 444 | #### The directories where the OpenSSL include and library files are located. |
| 445 | # The recommended usage here is to use the Sysinternals junction tool |
| 446 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 447 | # Fossil source code directory and the target OpenSSL source directory. |
| 448 | # |
| 449 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1g/include |
| 450 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1g |
| 451 | |
| 452 | #### Either the directory where the Tcl library is installed or the Tcl |
| 453 | # source code directory resides (depending on the value of the macro |
| 454 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 455 | # this directory must have "include" and "lib" sub-directories. If |
| @@ -1012,12 +1012,12 @@ | |
| 1012 | |
| 1013 | # Uncomment to enable Tcl support |
| 1014 | # FOSSIL_ENABLE_TCL = 1 |
| 1015 | |
| 1016 | !ifdef FOSSIL_ENABLE_SSL |
| 1017 | SSLINCDIR = $(B)\compat\openssl-1.0.1g\include |
| 1018 | SSLLIBDIR = $(B)\compat\openssl-1.0.1g\out32 |
| 1019 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1020 | !endif |
| 1021 | |
| 1022 | !ifdef FOSSIL_ENABLE_TCL |
| 1023 | TCLDIR = $(B)\compat\tcl-8.6 |
| 1024 |
+28
-34
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -135,16 +135,16 @@ | ||
| 135 | 135 | ** Clear the memory allocated in a manifest object |
| 136 | 136 | */ |
| 137 | 137 | void manifest_destroy(Manifest *p){ |
| 138 | 138 | if( p ){ |
| 139 | 139 | blob_reset(&p->content); |
| 140 | - free(p->aFile); | |
| 141 | - free(p->azParent); | |
| 142 | - free(p->azCChild); | |
| 143 | - free(p->aTag); | |
| 144 | - free(p->aField); | |
| 145 | - free(p->aCherrypick); | |
| 140 | + fossil_free(p->aFile); | |
| 141 | + fossil_free(p->azParent); | |
| 142 | + fossil_free(p->azCChild); | |
| 143 | + fossil_free(p->aTag); | |
| 144 | + fossil_free(p->aField); | |
| 145 | + fossil_free(p->aCherrypick); | |
| 146 | 146 | if( p->pBaseline ) manifest_destroy(p->pBaseline); |
| 147 | 147 | memset(p, 0, sizeof(*p)); |
| 148 | 148 | fossil_free(p); |
| 149 | 149 | } |
| 150 | 150 | } |
| @@ -1608,11 +1608,11 @@ | ||
| 1608 | 1608 | blob_appendf(&comment, "Ticket [%s|%.10s] <i>%h</i> status still %h with " |
| 1609 | 1609 | "%d other change%s", |
| 1610 | 1610 | pManifest->zTicketUuid, pManifest->zTicketUuid, zTitle, zNewStatus, |
| 1611 | 1611 | pManifest->nField, pManifest->nField==1 ? "" : "s" |
| 1612 | 1612 | ); |
| 1613 | - free(zNewStatus); | |
| 1613 | + fossil_free(zNewStatus); | |
| 1614 | 1614 | blob_appendf(&brief, "Ticket [%s|%.10s]: %d change%s", |
| 1615 | 1615 | pManifest->zTicketUuid, pManifest->zTicketUuid, pManifest->nField, |
| 1616 | 1616 | pManifest->nField==1 ? "" : "s" |
| 1617 | 1617 | ); |
| 1618 | 1618 | } |
| @@ -1621,11 +1621,11 @@ | ||
| 1621 | 1621 | pManifest->zTicketUuid, pManifest->zTicketUuid, zTitle |
| 1622 | 1622 | ); |
| 1623 | 1623 | blob_appendf(&brief, "New ticket [%s|%.10s].", pManifest->zTicketUuid, |
| 1624 | 1624 | pManifest->zTicketUuid); |
| 1625 | 1625 | } |
| 1626 | - free(zTitle); | |
| 1626 | + fossil_free(zTitle); | |
| 1627 | 1627 | db_multi_exec( |
| 1628 | 1628 | "REPLACE INTO event(type,tagid,mtime,objid,user,comment,brief)" |
| 1629 | 1629 | "VALUES('t',%d,%.17g,%d,%Q,%Q,%Q)", |
| 1630 | 1630 | tktTagId, pManifest->rDate, rid, pManifest->zUser, |
| 1631 | 1631 | blob_str(&comment), blob_str(&brief) |
| @@ -1753,11 +1753,11 @@ | ||
| 1753 | 1753 | TAG_COMMENT, rid, p->rDate |
| 1754 | 1754 | ); |
| 1755 | 1755 | zCom = db_text(0, "SELECT coalesce(ecomment, comment) FROM event" |
| 1756 | 1756 | " WHERE rowid=last_insert_rowid()"); |
| 1757 | 1757 | wiki_extract_links(zCom, rid, 0, p->rDate, 1, WIKI_INLINE); |
| 1758 | - free(zCom); | |
| 1758 | + fossil_free(zCom); | |
| 1759 | 1759 | |
| 1760 | 1760 | /* If this is a delta-manifest, record the fact that this repository |
| 1761 | 1761 | ** contains delta manifests, to free the "commit" logic to generate |
| 1762 | 1762 | ** new delta manifests. |
| 1763 | 1763 | */ |
| @@ -1822,11 +1822,11 @@ | ||
| 1822 | 1822 | char zLength[40]; |
| 1823 | 1823 | while( fossil_isspace(p->zWiki[0]) ) p->zWiki++; |
| 1824 | 1824 | nWiki = strlen(p->zWiki); |
| 1825 | 1825 | sqlite3_snprintf(sizeof(zLength), zLength, "%d", nWiki); |
| 1826 | 1826 | tag_insert(zTag, 1, zLength, rid, p->rDate, rid); |
| 1827 | - free(zTag); | |
| 1827 | + fossil_free(zTag); | |
| 1828 | 1828 | prior = db_int(0, |
| 1829 | 1829 | "SELECT rid FROM tagxref" |
| 1830 | 1830 | " WHERE tagid=%d AND mtime<%.17g" |
| 1831 | 1831 | " ORDER BY mtime DESC", |
| 1832 | 1832 | tagid, p->rDate |
| @@ -1850,11 +1850,11 @@ | ||
| 1850 | 1850 | TAG_BGCOLOR, rid, |
| 1851 | 1851 | TAG_BGCOLOR, rid, |
| 1852 | 1852 | TAG_USER, rid, |
| 1853 | 1853 | TAG_COMMENT, rid |
| 1854 | 1854 | ); |
| 1855 | - free(zComment); | |
| 1855 | + fossil_free(zComment); | |
| 1856 | 1856 | } |
| 1857 | 1857 | if( p->type==CFTYPE_EVENT ){ |
| 1858 | 1858 | char *zTag = mprintf("event-%s", p->zEventId); |
| 1859 | 1859 | int tagid = tag_findid(zTag, 1); |
| 1860 | 1860 | int prior, subsequent; |
| @@ -1862,11 +1862,11 @@ | ||
| 1862 | 1862 | char zLength[40]; |
| 1863 | 1863 | while( fossil_isspace(p->zWiki[0]) ) p->zWiki++; |
| 1864 | 1864 | nWiki = strlen(p->zWiki); |
| 1865 | 1865 | sqlite3_snprintf(sizeof(zLength), zLength, "%d", nWiki); |
| 1866 | 1866 | tag_insert(zTag, 1, zLength, rid, p->rDate, rid); |
| 1867 | - free(zTag); | |
| 1867 | + fossil_free(zTag); | |
| 1868 | 1868 | prior = db_int(0, |
| 1869 | 1869 | "SELECT rid FROM tagxref" |
| 1870 | 1870 | " WHERE tagid=%d AND mtime<%.17g AND rid!=%d" |
| 1871 | 1871 | " ORDER BY mtime DESC", |
| 1872 | 1872 | tagid, p->rDate, rid |
| @@ -1901,22 +1901,26 @@ | ||
| 1901 | 1901 | ); |
| 1902 | 1902 | } |
| 1903 | 1903 | } |
| 1904 | 1904 | if( p->type==CFTYPE_TICKET ){ |
| 1905 | 1905 | char *zTag; |
| 1906 | - | |
| 1907 | 1906 | assert( manifest_crosslink_busy==1 ); |
| 1908 | 1907 | zTag = mprintf("tkt-%s", p->zTicketUuid); |
| 1909 | 1908 | tag_insert(zTag, 1, 0, rid, p->rDate, rid); |
| 1910 | - free(zTag); | |
| 1909 | + fossil_free(zTag); | |
| 1911 | 1910 | db_multi_exec("INSERT OR IGNORE INTO pending_tkt VALUES(%Q)", |
| 1912 | 1911 | p->zTicketUuid); |
| 1913 | 1912 | } |
| 1914 | 1913 | if( p->type==CFTYPE_ATTACHMENT ){ |
| 1914 | + char *zComment = 0; | |
| 1915 | + char const isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; | |
| 1916 | + char const attachToType = fossil_is_uuid(p->zAttachTarget) | |
| 1917 | + ? 't' /* attach to ticket */ | |
| 1918 | + : 'w' /* attach to wiki page */; | |
| 1915 | 1919 | db_multi_exec( |
| 1916 | 1920 | "INSERT INTO attachment(attachid, mtime, src, target," |
| 1917 | - "filename, comment, user)" | |
| 1921 | + "filename, comment, user)" | |
| 1918 | 1922 | "VALUES(%d,%.17g,%Q,%Q,%Q,%Q,%Q);", |
| 1919 | 1923 | rid, p->rDate, p->zAttachSrc, p->zAttachTarget, p->zAttachName, |
| 1920 | 1924 | (p->zComment ? p->zComment : ""), p->zUser |
| 1921 | 1925 | ); |
| 1922 | 1926 | db_multi_exec( |
| @@ -1925,45 +1929,35 @@ | ||
| 1925 | 1929 | " WHERE target=%Q AND filename=%Q))" |
| 1926 | 1930 | " WHERE target=%Q AND filename=%Q", |
| 1927 | 1931 | p->zAttachTarget, p->zAttachName, |
| 1928 | 1932 | p->zAttachTarget, p->zAttachName |
| 1929 | 1933 | ); |
| 1930 | - if( strlen(p->zAttachTarget)!=UUID_SIZE | |
| 1931 | - || !validate16(p->zAttachTarget, UUID_SIZE) | |
| 1932 | - ){ | |
| 1933 | - char *zComment; | |
| 1934 | - if( p->zAttachSrc && p->zAttachSrc[0] ){ | |
| 1934 | + if( 'w' == attachToType ){ | |
| 1935 | + if( isAdd ){ | |
| 1935 | 1936 | zComment = mprintf( |
| 1936 | 1937 | "Add attachment [/artifact/%s|%h] to wiki page [%h]", |
| 1937 | 1938 | p->zAttachSrc, p->zAttachName, p->zAttachTarget); |
| 1938 | 1939 | }else{ |
| 1939 | 1940 | zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]", |
| 1940 | 1941 | p->zAttachName, p->zAttachTarget); |
| 1941 | 1942 | } |
| 1942 | - db_multi_exec( | |
| 1943 | - "REPLACE INTO event(type,mtime,objid,user,comment)" | |
| 1944 | - "VALUES('w',%.17g,%d,%Q,%Q)", | |
| 1945 | - p->rDate, rid, p->zUser, zComment | |
| 1946 | - ); | |
| 1947 | - free(zComment); | |
| 1948 | 1943 | }else{ |
| 1949 | - char *zComment; | |
| 1950 | - if( p->zAttachSrc && p->zAttachSrc[0] ){ | |
| 1944 | + if( isAdd ){ | |
| 1951 | 1945 | zComment = mprintf( |
| 1952 | 1946 | "Add attachment [/artifact/%s|%h] to ticket [%s|%.10s]", |
| 1953 | 1947 | p->zAttachSrc, p->zAttachName, p->zAttachTarget, p->zAttachTarget); |
| 1954 | 1948 | }else{ |
| 1955 | 1949 | zComment = mprintf("Delete attachment \"%h\" from ticket [%s|%.10s]", |
| 1956 | 1950 | p->zAttachName, p->zAttachTarget, p->zAttachTarget); |
| 1957 | 1951 | } |
| 1958 | - db_multi_exec( | |
| 1952 | + } | |
| 1953 | + db_multi_exec( | |
| 1959 | 1954 | "REPLACE INTO event(type,mtime,objid,user,comment)" |
| 1960 | - "VALUES('t',%.17g,%d,%Q,%Q)", | |
| 1961 | - p->rDate, rid, p->zUser, zComment | |
| 1962 | - ); | |
| 1963 | - free(zComment); | |
| 1964 | - } | |
| 1955 | + "VALUES('%c',%.17g,%d,%Q,%Q)", | |
| 1956 | + attachToType, p->rDate, rid, p->zUser, zComment | |
| 1957 | + ); | |
| 1958 | + fossil_free(zComment); | |
| 1965 | 1959 | } |
| 1966 | 1960 | if( p->type==CFTYPE_CONTROL ){ |
| 1967 | 1961 | Blob comment; |
| 1968 | 1962 | int i; |
| 1969 | 1963 | const char *zName; |
| 1970 | 1964 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -135,16 +135,16 @@ | |
| 135 | ** Clear the memory allocated in a manifest object |
| 136 | */ |
| 137 | void manifest_destroy(Manifest *p){ |
| 138 | if( p ){ |
| 139 | blob_reset(&p->content); |
| 140 | free(p->aFile); |
| 141 | free(p->azParent); |
| 142 | free(p->azCChild); |
| 143 | free(p->aTag); |
| 144 | free(p->aField); |
| 145 | free(p->aCherrypick); |
| 146 | if( p->pBaseline ) manifest_destroy(p->pBaseline); |
| 147 | memset(p, 0, sizeof(*p)); |
| 148 | fossil_free(p); |
| 149 | } |
| 150 | } |
| @@ -1608,11 +1608,11 @@ | |
| 1608 | blob_appendf(&comment, "Ticket [%s|%.10s] <i>%h</i> status still %h with " |
| 1609 | "%d other change%s", |
| 1610 | pManifest->zTicketUuid, pManifest->zTicketUuid, zTitle, zNewStatus, |
| 1611 | pManifest->nField, pManifest->nField==1 ? "" : "s" |
| 1612 | ); |
| 1613 | free(zNewStatus); |
| 1614 | blob_appendf(&brief, "Ticket [%s|%.10s]: %d change%s", |
| 1615 | pManifest->zTicketUuid, pManifest->zTicketUuid, pManifest->nField, |
| 1616 | pManifest->nField==1 ? "" : "s" |
| 1617 | ); |
| 1618 | } |
| @@ -1621,11 +1621,11 @@ | |
| 1621 | pManifest->zTicketUuid, pManifest->zTicketUuid, zTitle |
| 1622 | ); |
| 1623 | blob_appendf(&brief, "New ticket [%s|%.10s].", pManifest->zTicketUuid, |
| 1624 | pManifest->zTicketUuid); |
| 1625 | } |
| 1626 | free(zTitle); |
| 1627 | db_multi_exec( |
| 1628 | "REPLACE INTO event(type,tagid,mtime,objid,user,comment,brief)" |
| 1629 | "VALUES('t',%d,%.17g,%d,%Q,%Q,%Q)", |
| 1630 | tktTagId, pManifest->rDate, rid, pManifest->zUser, |
| 1631 | blob_str(&comment), blob_str(&brief) |
| @@ -1753,11 +1753,11 @@ | |
| 1753 | TAG_COMMENT, rid, p->rDate |
| 1754 | ); |
| 1755 | zCom = db_text(0, "SELECT coalesce(ecomment, comment) FROM event" |
| 1756 | " WHERE rowid=last_insert_rowid()"); |
| 1757 | wiki_extract_links(zCom, rid, 0, p->rDate, 1, WIKI_INLINE); |
| 1758 | free(zCom); |
| 1759 | |
| 1760 | /* If this is a delta-manifest, record the fact that this repository |
| 1761 | ** contains delta manifests, to free the "commit" logic to generate |
| 1762 | ** new delta manifests. |
| 1763 | */ |
| @@ -1822,11 +1822,11 @@ | |
| 1822 | char zLength[40]; |
| 1823 | while( fossil_isspace(p->zWiki[0]) ) p->zWiki++; |
| 1824 | nWiki = strlen(p->zWiki); |
| 1825 | sqlite3_snprintf(sizeof(zLength), zLength, "%d", nWiki); |
| 1826 | tag_insert(zTag, 1, zLength, rid, p->rDate, rid); |
| 1827 | free(zTag); |
| 1828 | prior = db_int(0, |
| 1829 | "SELECT rid FROM tagxref" |
| 1830 | " WHERE tagid=%d AND mtime<%.17g" |
| 1831 | " ORDER BY mtime DESC", |
| 1832 | tagid, p->rDate |
| @@ -1850,11 +1850,11 @@ | |
| 1850 | TAG_BGCOLOR, rid, |
| 1851 | TAG_BGCOLOR, rid, |
| 1852 | TAG_USER, rid, |
| 1853 | TAG_COMMENT, rid |
| 1854 | ); |
| 1855 | free(zComment); |
| 1856 | } |
| 1857 | if( p->type==CFTYPE_EVENT ){ |
| 1858 | char *zTag = mprintf("event-%s", p->zEventId); |
| 1859 | int tagid = tag_findid(zTag, 1); |
| 1860 | int prior, subsequent; |
| @@ -1862,11 +1862,11 @@ | |
| 1862 | char zLength[40]; |
| 1863 | while( fossil_isspace(p->zWiki[0]) ) p->zWiki++; |
| 1864 | nWiki = strlen(p->zWiki); |
| 1865 | sqlite3_snprintf(sizeof(zLength), zLength, "%d", nWiki); |
| 1866 | tag_insert(zTag, 1, zLength, rid, p->rDate, rid); |
| 1867 | free(zTag); |
| 1868 | prior = db_int(0, |
| 1869 | "SELECT rid FROM tagxref" |
| 1870 | " WHERE tagid=%d AND mtime<%.17g AND rid!=%d" |
| 1871 | " ORDER BY mtime DESC", |
| 1872 | tagid, p->rDate, rid |
| @@ -1901,22 +1901,26 @@ | |
| 1901 | ); |
| 1902 | } |
| 1903 | } |
| 1904 | if( p->type==CFTYPE_TICKET ){ |
| 1905 | char *zTag; |
| 1906 | |
| 1907 | assert( manifest_crosslink_busy==1 ); |
| 1908 | zTag = mprintf("tkt-%s", p->zTicketUuid); |
| 1909 | tag_insert(zTag, 1, 0, rid, p->rDate, rid); |
| 1910 | free(zTag); |
| 1911 | db_multi_exec("INSERT OR IGNORE INTO pending_tkt VALUES(%Q)", |
| 1912 | p->zTicketUuid); |
| 1913 | } |
| 1914 | if( p->type==CFTYPE_ATTACHMENT ){ |
| 1915 | db_multi_exec( |
| 1916 | "INSERT INTO attachment(attachid, mtime, src, target," |
| 1917 | "filename, comment, user)" |
| 1918 | "VALUES(%d,%.17g,%Q,%Q,%Q,%Q,%Q);", |
| 1919 | rid, p->rDate, p->zAttachSrc, p->zAttachTarget, p->zAttachName, |
| 1920 | (p->zComment ? p->zComment : ""), p->zUser |
| 1921 | ); |
| 1922 | db_multi_exec( |
| @@ -1925,45 +1929,35 @@ | |
| 1925 | " WHERE target=%Q AND filename=%Q))" |
| 1926 | " WHERE target=%Q AND filename=%Q", |
| 1927 | p->zAttachTarget, p->zAttachName, |
| 1928 | p->zAttachTarget, p->zAttachName |
| 1929 | ); |
| 1930 | if( strlen(p->zAttachTarget)!=UUID_SIZE |
| 1931 | || !validate16(p->zAttachTarget, UUID_SIZE) |
| 1932 | ){ |
| 1933 | char *zComment; |
| 1934 | if( p->zAttachSrc && p->zAttachSrc[0] ){ |
| 1935 | zComment = mprintf( |
| 1936 | "Add attachment [/artifact/%s|%h] to wiki page [%h]", |
| 1937 | p->zAttachSrc, p->zAttachName, p->zAttachTarget); |
| 1938 | }else{ |
| 1939 | zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]", |
| 1940 | p->zAttachName, p->zAttachTarget); |
| 1941 | } |
| 1942 | db_multi_exec( |
| 1943 | "REPLACE INTO event(type,mtime,objid,user,comment)" |
| 1944 | "VALUES('w',%.17g,%d,%Q,%Q)", |
| 1945 | p->rDate, rid, p->zUser, zComment |
| 1946 | ); |
| 1947 | free(zComment); |
| 1948 | }else{ |
| 1949 | char *zComment; |
| 1950 | if( p->zAttachSrc && p->zAttachSrc[0] ){ |
| 1951 | zComment = mprintf( |
| 1952 | "Add attachment [/artifact/%s|%h] to ticket [%s|%.10s]", |
| 1953 | p->zAttachSrc, p->zAttachName, p->zAttachTarget, p->zAttachTarget); |
| 1954 | }else{ |
| 1955 | zComment = mprintf("Delete attachment \"%h\" from ticket [%s|%.10s]", |
| 1956 | p->zAttachName, p->zAttachTarget, p->zAttachTarget); |
| 1957 | } |
| 1958 | db_multi_exec( |
| 1959 | "REPLACE INTO event(type,mtime,objid,user,comment)" |
| 1960 | "VALUES('t',%.17g,%d,%Q,%Q)", |
| 1961 | p->rDate, rid, p->zUser, zComment |
| 1962 | ); |
| 1963 | free(zComment); |
| 1964 | } |
| 1965 | } |
| 1966 | if( p->type==CFTYPE_CONTROL ){ |
| 1967 | Blob comment; |
| 1968 | int i; |
| 1969 | const char *zName; |
| 1970 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -135,16 +135,16 @@ | |
| 135 | ** Clear the memory allocated in a manifest object |
| 136 | */ |
| 137 | void manifest_destroy(Manifest *p){ |
| 138 | if( p ){ |
| 139 | blob_reset(&p->content); |
| 140 | fossil_free(p->aFile); |
| 141 | fossil_free(p->azParent); |
| 142 | fossil_free(p->azCChild); |
| 143 | fossil_free(p->aTag); |
| 144 | fossil_free(p->aField); |
| 145 | fossil_free(p->aCherrypick); |
| 146 | if( p->pBaseline ) manifest_destroy(p->pBaseline); |
| 147 | memset(p, 0, sizeof(*p)); |
| 148 | fossil_free(p); |
| 149 | } |
| 150 | } |
| @@ -1608,11 +1608,11 @@ | |
| 1608 | blob_appendf(&comment, "Ticket [%s|%.10s] <i>%h</i> status still %h with " |
| 1609 | "%d other change%s", |
| 1610 | pManifest->zTicketUuid, pManifest->zTicketUuid, zTitle, zNewStatus, |
| 1611 | pManifest->nField, pManifest->nField==1 ? "" : "s" |
| 1612 | ); |
| 1613 | fossil_free(zNewStatus); |
| 1614 | blob_appendf(&brief, "Ticket [%s|%.10s]: %d change%s", |
| 1615 | pManifest->zTicketUuid, pManifest->zTicketUuid, pManifest->nField, |
| 1616 | pManifest->nField==1 ? "" : "s" |
| 1617 | ); |
| 1618 | } |
| @@ -1621,11 +1621,11 @@ | |
| 1621 | pManifest->zTicketUuid, pManifest->zTicketUuid, zTitle |
| 1622 | ); |
| 1623 | blob_appendf(&brief, "New ticket [%s|%.10s].", pManifest->zTicketUuid, |
| 1624 | pManifest->zTicketUuid); |
| 1625 | } |
| 1626 | fossil_free(zTitle); |
| 1627 | db_multi_exec( |
| 1628 | "REPLACE INTO event(type,tagid,mtime,objid,user,comment,brief)" |
| 1629 | "VALUES('t',%d,%.17g,%d,%Q,%Q,%Q)", |
| 1630 | tktTagId, pManifest->rDate, rid, pManifest->zUser, |
| 1631 | blob_str(&comment), blob_str(&brief) |
| @@ -1753,11 +1753,11 @@ | |
| 1753 | TAG_COMMENT, rid, p->rDate |
| 1754 | ); |
| 1755 | zCom = db_text(0, "SELECT coalesce(ecomment, comment) FROM event" |
| 1756 | " WHERE rowid=last_insert_rowid()"); |
| 1757 | wiki_extract_links(zCom, rid, 0, p->rDate, 1, WIKI_INLINE); |
| 1758 | fossil_free(zCom); |
| 1759 | |
| 1760 | /* If this is a delta-manifest, record the fact that this repository |
| 1761 | ** contains delta manifests, to free the "commit" logic to generate |
| 1762 | ** new delta manifests. |
| 1763 | */ |
| @@ -1822,11 +1822,11 @@ | |
| 1822 | char zLength[40]; |
| 1823 | while( fossil_isspace(p->zWiki[0]) ) p->zWiki++; |
| 1824 | nWiki = strlen(p->zWiki); |
| 1825 | sqlite3_snprintf(sizeof(zLength), zLength, "%d", nWiki); |
| 1826 | tag_insert(zTag, 1, zLength, rid, p->rDate, rid); |
| 1827 | fossil_free(zTag); |
| 1828 | prior = db_int(0, |
| 1829 | "SELECT rid FROM tagxref" |
| 1830 | " WHERE tagid=%d AND mtime<%.17g" |
| 1831 | " ORDER BY mtime DESC", |
| 1832 | tagid, p->rDate |
| @@ -1850,11 +1850,11 @@ | |
| 1850 | TAG_BGCOLOR, rid, |
| 1851 | TAG_BGCOLOR, rid, |
| 1852 | TAG_USER, rid, |
| 1853 | TAG_COMMENT, rid |
| 1854 | ); |
| 1855 | fossil_free(zComment); |
| 1856 | } |
| 1857 | if( p->type==CFTYPE_EVENT ){ |
| 1858 | char *zTag = mprintf("event-%s", p->zEventId); |
| 1859 | int tagid = tag_findid(zTag, 1); |
| 1860 | int prior, subsequent; |
| @@ -1862,11 +1862,11 @@ | |
| 1862 | char zLength[40]; |
| 1863 | while( fossil_isspace(p->zWiki[0]) ) p->zWiki++; |
| 1864 | nWiki = strlen(p->zWiki); |
| 1865 | sqlite3_snprintf(sizeof(zLength), zLength, "%d", nWiki); |
| 1866 | tag_insert(zTag, 1, zLength, rid, p->rDate, rid); |
| 1867 | fossil_free(zTag); |
| 1868 | prior = db_int(0, |
| 1869 | "SELECT rid FROM tagxref" |
| 1870 | " WHERE tagid=%d AND mtime<%.17g AND rid!=%d" |
| 1871 | " ORDER BY mtime DESC", |
| 1872 | tagid, p->rDate, rid |
| @@ -1901,22 +1901,26 @@ | |
| 1901 | ); |
| 1902 | } |
| 1903 | } |
| 1904 | if( p->type==CFTYPE_TICKET ){ |
| 1905 | char *zTag; |
| 1906 | assert( manifest_crosslink_busy==1 ); |
| 1907 | zTag = mprintf("tkt-%s", p->zTicketUuid); |
| 1908 | tag_insert(zTag, 1, 0, rid, p->rDate, rid); |
| 1909 | fossil_free(zTag); |
| 1910 | db_multi_exec("INSERT OR IGNORE INTO pending_tkt VALUES(%Q)", |
| 1911 | p->zTicketUuid); |
| 1912 | } |
| 1913 | if( p->type==CFTYPE_ATTACHMENT ){ |
| 1914 | char *zComment = 0; |
| 1915 | char const isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; |
| 1916 | char const attachToType = fossil_is_uuid(p->zAttachTarget) |
| 1917 | ? 't' /* attach to ticket */ |
| 1918 | : 'w' /* attach to wiki page */; |
| 1919 | db_multi_exec( |
| 1920 | "INSERT INTO attachment(attachid, mtime, src, target," |
| 1921 | "filename, comment, user)" |
| 1922 | "VALUES(%d,%.17g,%Q,%Q,%Q,%Q,%Q);", |
| 1923 | rid, p->rDate, p->zAttachSrc, p->zAttachTarget, p->zAttachName, |
| 1924 | (p->zComment ? p->zComment : ""), p->zUser |
| 1925 | ); |
| 1926 | db_multi_exec( |
| @@ -1925,45 +1929,35 @@ | |
| 1929 | " WHERE target=%Q AND filename=%Q))" |
| 1930 | " WHERE target=%Q AND filename=%Q", |
| 1931 | p->zAttachTarget, p->zAttachName, |
| 1932 | p->zAttachTarget, p->zAttachName |
| 1933 | ); |
| 1934 | if( 'w' == attachToType ){ |
| 1935 | if( isAdd ){ |
| 1936 | zComment = mprintf( |
| 1937 | "Add attachment [/artifact/%s|%h] to wiki page [%h]", |
| 1938 | p->zAttachSrc, p->zAttachName, p->zAttachTarget); |
| 1939 | }else{ |
| 1940 | zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]", |
| 1941 | p->zAttachName, p->zAttachTarget); |
| 1942 | } |
| 1943 | }else{ |
| 1944 | if( isAdd ){ |
| 1945 | zComment = mprintf( |
| 1946 | "Add attachment [/artifact/%s|%h] to ticket [%s|%.10s]", |
| 1947 | p->zAttachSrc, p->zAttachName, p->zAttachTarget, p->zAttachTarget); |
| 1948 | }else{ |
| 1949 | zComment = mprintf("Delete attachment \"%h\" from ticket [%s|%.10s]", |
| 1950 | p->zAttachName, p->zAttachTarget, p->zAttachTarget); |
| 1951 | } |
| 1952 | } |
| 1953 | db_multi_exec( |
| 1954 | "REPLACE INTO event(type,mtime,objid,user,comment)" |
| 1955 | "VALUES('%c',%.17g,%d,%Q,%Q)", |
| 1956 | attachToType, p->rDate, rid, p->zUser, zComment |
| 1957 | ); |
| 1958 | fossil_free(zComment); |
| 1959 | } |
| 1960 | if( p->type==CFTYPE_CONTROL ){ |
| 1961 | Blob comment; |
| 1962 | int i; |
| 1963 | const char *zName; |
| 1964 |
M
src/th.c
+2
-4
| --- src/th.c | ||
| +++ src/th.c | ||
| @@ -2639,17 +2639,15 @@ | ||
| 2639 | 2639 | if( z[i]=='0' ){ |
| 2640 | 2640 | if( z[i+1]=='x' || z[i+1]=='X' ){ |
| 2641 | 2641 | i += 2; |
| 2642 | 2642 | base = 16; |
| 2643 | 2643 | isdigit = th_ishexdig; |
| 2644 | - } | |
| 2645 | - if( z[i+1]=='o' || z[i+1]=='O' ){ | |
| 2644 | + }else if( z[i+1]=='o' || z[i+1]=='O' ){ | |
| 2646 | 2645 | i += 2; |
| 2647 | 2646 | base = 8; |
| 2648 | 2647 | isdigit = th_isoctdig; |
| 2649 | - } | |
| 2650 | - if( z[i+1]=='b' || z[i+1]=='B' ){ | |
| 2648 | + }else if( z[i+1]=='b' || z[i+1]=='B' ){ | |
| 2651 | 2649 | i += 2; |
| 2652 | 2650 | base = 2; |
| 2653 | 2651 | isdigit = th_isbindig; |
| 2654 | 2652 | } |
| 2655 | 2653 | } |
| 2656 | 2654 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -2639,17 +2639,15 @@ | |
| 2639 | if( z[i]=='0' ){ |
| 2640 | if( z[i+1]=='x' || z[i+1]=='X' ){ |
| 2641 | i += 2; |
| 2642 | base = 16; |
| 2643 | isdigit = th_ishexdig; |
| 2644 | } |
| 2645 | if( z[i+1]=='o' || z[i+1]=='O' ){ |
| 2646 | i += 2; |
| 2647 | base = 8; |
| 2648 | isdigit = th_isoctdig; |
| 2649 | } |
| 2650 | if( z[i+1]=='b' || z[i+1]=='B' ){ |
| 2651 | i += 2; |
| 2652 | base = 2; |
| 2653 | isdigit = th_isbindig; |
| 2654 | } |
| 2655 | } |
| 2656 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -2639,17 +2639,15 @@ | |
| 2639 | if( z[i]=='0' ){ |
| 2640 | if( z[i+1]=='x' || z[i+1]=='X' ){ |
| 2641 | i += 2; |
| 2642 | base = 16; |
| 2643 | isdigit = th_ishexdig; |
| 2644 | }else if( z[i+1]=='o' || z[i+1]=='O' ){ |
| 2645 | i += 2; |
| 2646 | base = 8; |
| 2647 | isdigit = th_isoctdig; |
| 2648 | }else if( z[i+1]=='b' || z[i+1]=='B' ){ |
| 2649 | i += 2; |
| 2650 | base = 2; |
| 2651 | isdigit = th_isbindig; |
| 2652 | } |
| 2653 | } |
| 2654 |
+12
-19
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -446,14 +446,14 @@ | ||
| 446 | 446 | style_submenu_element("Attach", "Add An Attachment", |
| 447 | 447 | "%s/attachadd?tkt=%T&from=%s/tktview/%t", |
| 448 | 448 | g.zTop, zUuid, g.zTop, zUuid); |
| 449 | 449 | } |
| 450 | 450 | if( P("plaintext") ){ |
| 451 | - style_submenu_element("Formatted", "Formatted", "%R/tktview/%S", zUuid); | |
| 451 | + style_submenu_element("Formatted", "Formatted", "%R/tktview/%s", zUuid); | |
| 452 | 452 | }else{ |
| 453 | 453 | style_submenu_element("Plaintext", "Plaintext", |
| 454 | - "%R/tktview/%S?plaintext", zUuid); | |
| 454 | + "%R/tktview/%s?plaintext", zUuid); | |
| 455 | 455 | } |
| 456 | 456 | style_header("View Ticket"); |
| 457 | 457 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br />\n", -1); |
| 458 | 458 | ticket_init(); |
| 459 | 459 | initializeVariablesFromCGI(); |
| @@ -895,14 +895,14 @@ | ||
| 895 | 895 | "%s/tkttimeline?name=%s&y=ci", g.zTop, zUuid); |
| 896 | 896 | style_submenu_element("Timeline", "Timeline", |
| 897 | 897 | "%s/tkttimeline?name=%s", g.zTop, zUuid); |
| 898 | 898 | if( P("plaintext")!=0 ){ |
| 899 | 899 | style_submenu_element("Formatted", "Formatted", |
| 900 | - "%R/tkthistory/%S", zUuid); | |
| 900 | + "%R/tkthistory/%s", zUuid); | |
| 901 | 901 | }else{ |
| 902 | 902 | style_submenu_element("Plaintext", "Plaintext", |
| 903 | - "%R/tkthistory/%S?plaintext", zUuid); | |
| 903 | + "%R/tkthistory/%s?plaintext", zUuid); | |
| 904 | 904 | } |
| 905 | 905 | style_header(zTitle); |
| 906 | 906 | free(zTitle); |
| 907 | 907 | |
| 908 | 908 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); |
| @@ -924,17 +924,14 @@ | ||
| 924 | 924 | " ORDER BY 1", |
| 925 | 925 | timeline_utc(), tagid, timeline_utc(), tagid |
| 926 | 926 | ); |
| 927 | 927 | while( db_step(&q)==SQLITE_ROW ){ |
| 928 | 928 | Manifest *pTicket; |
| 929 | - char zShort[12]; | |
| 930 | 929 | const char *zDate = db_column_text(&q, 0); |
| 931 | 930 | int rid = db_column_int(&q, 1); |
| 932 | 931 | const char *zChngUuid = db_column_text(&q, 2); |
| 933 | 932 | const char *zFile = db_column_text(&q, 4); |
| 934 | - memcpy(zShort, zChngUuid, 10); | |
| 935 | - zShort[10] = 0; | |
| 936 | 933 | if( nChng==0 ){ |
| 937 | 934 | @ <ol> |
| 938 | 935 | } |
| 939 | 936 | nChng++; |
| 940 | 937 | if( zFile!=0 ){ |
| @@ -944,22 +941,22 @@ | ||
| 944 | 941 | @ |
| 945 | 942 | @ <li><p>Delete attachment "%h(zFile)" |
| 946 | 943 | }else{ |
| 947 | 944 | @ |
| 948 | 945 | @ <li><p>Add attachment |
| 949 | - @ "%z(href("%R/artifact/%S",zSrc))%s(zFile)</a>" | |
| 946 | + @ "%z(href("%R/artifact/%s",zSrc))%s(zFile)</a>" | |
| 950 | 947 | } |
| 951 | - @ [%z(href("%R/artifact/%T",zChngUuid))%s(zShort)</a>] | |
| 948 | + @ [%z(href("%R/artifact/%s",zChngUuid))%.10s(zChngUuid)</a>] | |
| 952 | 949 | @ (rid %d(rid)) by |
| 953 | 950 | hyperlink_to_user(zUser,zDate," on"); |
| 954 | 951 | hyperlink_to_date(zDate, ".</p>"); |
| 955 | 952 | }else{ |
| 956 | 953 | pTicket = manifest_get(rid, CFTYPE_TICKET, 0); |
| 957 | 954 | if( pTicket ){ |
| 958 | 955 | @ |
| 959 | 956 | @ <li><p>Ticket change |
| 960 | - @ [%z(href("%R/artifact/%T",zChngUuid))%s(zShort)</a>] | |
| 957 | + @ [%z(href("%R/artifact/%s",zChngUuid))%.10s(zChngUuid)</a>] | |
| 961 | 958 | @ (rid %d(rid)) by |
| 962 | 959 | hyperlink_to_user(pTicket->zUser,zDate," on"); |
| 963 | 960 | hyperlink_to_date(zDate, ":"); |
| 964 | 961 | @ </p> |
| 965 | 962 | ticket_output_change_artifact(pTicket, "a"); |
| @@ -1219,35 +1216,31 @@ | ||
| 1219 | 1216 | zTktUuid); |
| 1220 | 1217 | if( tagid==0 ){ |
| 1221 | 1218 | fossil_fatal("no such ticket %h", zTktUuid); |
| 1222 | 1219 | } |
| 1223 | 1220 | db_prepare(&q, |
| 1224 | - "SELECT datetime(mtime%s), objid, uuid, NULL, NULL, NULL" | |
| 1221 | + "SELECT datetime(mtime%s), objid, NULL, NULL, NULL" | |
| 1225 | 1222 | " FROM event, blob" |
| 1226 | 1223 | " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)" |
| 1227 | 1224 | " AND blob.rid=event.objid" |
| 1228 | 1225 | " UNION " |
| 1229 | - "SELECT datetime(mtime%s), attachid, uuid, src, " | |
| 1230 | - " filename, user" | |
| 1226 | + "SELECT datetime(mtime%s), attachid, filename, " | |
| 1227 | + " src, user" | |
| 1231 | 1228 | " FROM attachment, blob" |
| 1232 | 1229 | " WHERE target=(SELECT substr(tagname,5) FROM tag WHERE tagid=%d)" |
| 1233 | 1230 | " AND blob.rid=attachid" |
| 1234 | 1231 | " ORDER BY 1 DESC", |
| 1235 | 1232 | timeline_utc(), tagid, timeline_utc(), tagid |
| 1236 | 1233 | ); |
| 1237 | 1234 | while( db_step(&q)==SQLITE_ROW ){ |
| 1238 | 1235 | Manifest *pTicket; |
| 1239 | - char zShort[12]; | |
| 1240 | 1236 | const char *zDate = db_column_text(&q, 0); |
| 1241 | 1237 | int rid = db_column_int(&q, 1); |
| 1242 | - const char *zChngUuid = db_column_text(&q, 2); | |
| 1243 | - const char *zFile = db_column_text(&q, 4); | |
| 1244 | - memcpy(zShort, zChngUuid, 10); | |
| 1245 | - zShort[10] = 0; | |
| 1238 | + const char *zFile = db_column_text(&q, 2); | |
| 1246 | 1239 | if( zFile!=0 ){ |
| 1247 | 1240 | const char *zSrc = db_column_text(&q, 3); |
| 1248 | - const char *zUser = db_column_text(&q, 5); | |
| 1241 | + const char *zUser = db_column_text(&q, 4); | |
| 1249 | 1242 | if( zSrc==0 || zSrc[0]==0 ){ |
| 1250 | 1243 | fossil_print("Delete attachment %s\n", zFile); |
| 1251 | 1244 | }else{ |
| 1252 | 1245 | fossil_print("Add attachment %s\n", zFile); |
| 1253 | 1246 | } |
| 1254 | 1247 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -446,14 +446,14 @@ | |
| 446 | style_submenu_element("Attach", "Add An Attachment", |
| 447 | "%s/attachadd?tkt=%T&from=%s/tktview/%t", |
| 448 | g.zTop, zUuid, g.zTop, zUuid); |
| 449 | } |
| 450 | if( P("plaintext") ){ |
| 451 | style_submenu_element("Formatted", "Formatted", "%R/tktview/%S", zUuid); |
| 452 | }else{ |
| 453 | style_submenu_element("Plaintext", "Plaintext", |
| 454 | "%R/tktview/%S?plaintext", zUuid); |
| 455 | } |
| 456 | style_header("View Ticket"); |
| 457 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br />\n", -1); |
| 458 | ticket_init(); |
| 459 | initializeVariablesFromCGI(); |
| @@ -895,14 +895,14 @@ | |
| 895 | "%s/tkttimeline?name=%s&y=ci", g.zTop, zUuid); |
| 896 | style_submenu_element("Timeline", "Timeline", |
| 897 | "%s/tkttimeline?name=%s", g.zTop, zUuid); |
| 898 | if( P("plaintext")!=0 ){ |
| 899 | style_submenu_element("Formatted", "Formatted", |
| 900 | "%R/tkthistory/%S", zUuid); |
| 901 | }else{ |
| 902 | style_submenu_element("Plaintext", "Plaintext", |
| 903 | "%R/tkthistory/%S?plaintext", zUuid); |
| 904 | } |
| 905 | style_header(zTitle); |
| 906 | free(zTitle); |
| 907 | |
| 908 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); |
| @@ -924,17 +924,14 @@ | |
| 924 | " ORDER BY 1", |
| 925 | timeline_utc(), tagid, timeline_utc(), tagid |
| 926 | ); |
| 927 | while( db_step(&q)==SQLITE_ROW ){ |
| 928 | Manifest *pTicket; |
| 929 | char zShort[12]; |
| 930 | const char *zDate = db_column_text(&q, 0); |
| 931 | int rid = db_column_int(&q, 1); |
| 932 | const char *zChngUuid = db_column_text(&q, 2); |
| 933 | const char *zFile = db_column_text(&q, 4); |
| 934 | memcpy(zShort, zChngUuid, 10); |
| 935 | zShort[10] = 0; |
| 936 | if( nChng==0 ){ |
| 937 | @ <ol> |
| 938 | } |
| 939 | nChng++; |
| 940 | if( zFile!=0 ){ |
| @@ -944,22 +941,22 @@ | |
| 944 | @ |
| 945 | @ <li><p>Delete attachment "%h(zFile)" |
| 946 | }else{ |
| 947 | @ |
| 948 | @ <li><p>Add attachment |
| 949 | @ "%z(href("%R/artifact/%S",zSrc))%s(zFile)</a>" |
| 950 | } |
| 951 | @ [%z(href("%R/artifact/%T",zChngUuid))%s(zShort)</a>] |
| 952 | @ (rid %d(rid)) by |
| 953 | hyperlink_to_user(zUser,zDate," on"); |
| 954 | hyperlink_to_date(zDate, ".</p>"); |
| 955 | }else{ |
| 956 | pTicket = manifest_get(rid, CFTYPE_TICKET, 0); |
| 957 | if( pTicket ){ |
| 958 | @ |
| 959 | @ <li><p>Ticket change |
| 960 | @ [%z(href("%R/artifact/%T",zChngUuid))%s(zShort)</a>] |
| 961 | @ (rid %d(rid)) by |
| 962 | hyperlink_to_user(pTicket->zUser,zDate," on"); |
| 963 | hyperlink_to_date(zDate, ":"); |
| 964 | @ </p> |
| 965 | ticket_output_change_artifact(pTicket, "a"); |
| @@ -1219,35 +1216,31 @@ | |
| 1219 | zTktUuid); |
| 1220 | if( tagid==0 ){ |
| 1221 | fossil_fatal("no such ticket %h", zTktUuid); |
| 1222 | } |
| 1223 | db_prepare(&q, |
| 1224 | "SELECT datetime(mtime%s), objid, uuid, NULL, NULL, NULL" |
| 1225 | " FROM event, blob" |
| 1226 | " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)" |
| 1227 | " AND blob.rid=event.objid" |
| 1228 | " UNION " |
| 1229 | "SELECT datetime(mtime%s), attachid, uuid, src, " |
| 1230 | " filename, user" |
| 1231 | " FROM attachment, blob" |
| 1232 | " WHERE target=(SELECT substr(tagname,5) FROM tag WHERE tagid=%d)" |
| 1233 | " AND blob.rid=attachid" |
| 1234 | " ORDER BY 1 DESC", |
| 1235 | timeline_utc(), tagid, timeline_utc(), tagid |
| 1236 | ); |
| 1237 | while( db_step(&q)==SQLITE_ROW ){ |
| 1238 | Manifest *pTicket; |
| 1239 | char zShort[12]; |
| 1240 | const char *zDate = db_column_text(&q, 0); |
| 1241 | int rid = db_column_int(&q, 1); |
| 1242 | const char *zChngUuid = db_column_text(&q, 2); |
| 1243 | const char *zFile = db_column_text(&q, 4); |
| 1244 | memcpy(zShort, zChngUuid, 10); |
| 1245 | zShort[10] = 0; |
| 1246 | if( zFile!=0 ){ |
| 1247 | const char *zSrc = db_column_text(&q, 3); |
| 1248 | const char *zUser = db_column_text(&q, 5); |
| 1249 | if( zSrc==0 || zSrc[0]==0 ){ |
| 1250 | fossil_print("Delete attachment %s\n", zFile); |
| 1251 | }else{ |
| 1252 | fossil_print("Add attachment %s\n", zFile); |
| 1253 | } |
| 1254 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -446,14 +446,14 @@ | |
| 446 | style_submenu_element("Attach", "Add An Attachment", |
| 447 | "%s/attachadd?tkt=%T&from=%s/tktview/%t", |
| 448 | g.zTop, zUuid, g.zTop, zUuid); |
| 449 | } |
| 450 | if( P("plaintext") ){ |
| 451 | style_submenu_element("Formatted", "Formatted", "%R/tktview/%s", zUuid); |
| 452 | }else{ |
| 453 | style_submenu_element("Plaintext", "Plaintext", |
| 454 | "%R/tktview/%s?plaintext", zUuid); |
| 455 | } |
| 456 | style_header("View Ticket"); |
| 457 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br />\n", -1); |
| 458 | ticket_init(); |
| 459 | initializeVariablesFromCGI(); |
| @@ -895,14 +895,14 @@ | |
| 895 | "%s/tkttimeline?name=%s&y=ci", g.zTop, zUuid); |
| 896 | style_submenu_element("Timeline", "Timeline", |
| 897 | "%s/tkttimeline?name=%s", g.zTop, zUuid); |
| 898 | if( P("plaintext")!=0 ){ |
| 899 | style_submenu_element("Formatted", "Formatted", |
| 900 | "%R/tkthistory/%s", zUuid); |
| 901 | }else{ |
| 902 | style_submenu_element("Plaintext", "Plaintext", |
| 903 | "%R/tkthistory/%s?plaintext", zUuid); |
| 904 | } |
| 905 | style_header(zTitle); |
| 906 | free(zTitle); |
| 907 | |
| 908 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); |
| @@ -924,17 +924,14 @@ | |
| 924 | " ORDER BY 1", |
| 925 | timeline_utc(), tagid, timeline_utc(), tagid |
| 926 | ); |
| 927 | while( db_step(&q)==SQLITE_ROW ){ |
| 928 | Manifest *pTicket; |
| 929 | const char *zDate = db_column_text(&q, 0); |
| 930 | int rid = db_column_int(&q, 1); |
| 931 | const char *zChngUuid = db_column_text(&q, 2); |
| 932 | const char *zFile = db_column_text(&q, 4); |
| 933 | if( nChng==0 ){ |
| 934 | @ <ol> |
| 935 | } |
| 936 | nChng++; |
| 937 | if( zFile!=0 ){ |
| @@ -944,22 +941,22 @@ | |
| 941 | @ |
| 942 | @ <li><p>Delete attachment "%h(zFile)" |
| 943 | }else{ |
| 944 | @ |
| 945 | @ <li><p>Add attachment |
| 946 | @ "%z(href("%R/artifact/%s",zSrc))%s(zFile)</a>" |
| 947 | } |
| 948 | @ [%z(href("%R/artifact/%s",zChngUuid))%.10s(zChngUuid)</a>] |
| 949 | @ (rid %d(rid)) by |
| 950 | hyperlink_to_user(zUser,zDate," on"); |
| 951 | hyperlink_to_date(zDate, ".</p>"); |
| 952 | }else{ |
| 953 | pTicket = manifest_get(rid, CFTYPE_TICKET, 0); |
| 954 | if( pTicket ){ |
| 955 | @ |
| 956 | @ <li><p>Ticket change |
| 957 | @ [%z(href("%R/artifact/%s",zChngUuid))%.10s(zChngUuid)</a>] |
| 958 | @ (rid %d(rid)) by |
| 959 | hyperlink_to_user(pTicket->zUser,zDate," on"); |
| 960 | hyperlink_to_date(zDate, ":"); |
| 961 | @ </p> |
| 962 | ticket_output_change_artifact(pTicket, "a"); |
| @@ -1219,35 +1216,31 @@ | |
| 1216 | zTktUuid); |
| 1217 | if( tagid==0 ){ |
| 1218 | fossil_fatal("no such ticket %h", zTktUuid); |
| 1219 | } |
| 1220 | db_prepare(&q, |
| 1221 | "SELECT datetime(mtime%s), objid, NULL, NULL, NULL" |
| 1222 | " FROM event, blob" |
| 1223 | " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)" |
| 1224 | " AND blob.rid=event.objid" |
| 1225 | " UNION " |
| 1226 | "SELECT datetime(mtime%s), attachid, filename, " |
| 1227 | " src, user" |
| 1228 | " FROM attachment, blob" |
| 1229 | " WHERE target=(SELECT substr(tagname,5) FROM tag WHERE tagid=%d)" |
| 1230 | " AND blob.rid=attachid" |
| 1231 | " ORDER BY 1 DESC", |
| 1232 | timeline_utc(), tagid, timeline_utc(), tagid |
| 1233 | ); |
| 1234 | while( db_step(&q)==SQLITE_ROW ){ |
| 1235 | Manifest *pTicket; |
| 1236 | const char *zDate = db_column_text(&q, 0); |
| 1237 | int rid = db_column_int(&q, 1); |
| 1238 | const char *zFile = db_column_text(&q, 2); |
| 1239 | if( zFile!=0 ){ |
| 1240 | const char *zSrc = db_column_text(&q, 3); |
| 1241 | const char *zUser = db_column_text(&q, 4); |
| 1242 | if( zSrc==0 || zSrc[0]==0 ){ |
| 1243 | fossil_print("Delete attachment %s\n", zFile); |
| 1244 | }else{ |
| 1245 | fossil_print("Add attachment %s\n", zFile); |
| 1246 | } |
| 1247 |
+10
| --- src/util.c | ||
| +++ src/util.c | ||
| @@ -312,5 +312,15 @@ | ||
| 312 | 312 | return 1; |
| 313 | 313 | #else |
| 314 | 314 | return fcntl(fd, F_GETFL)!=(-1) || errno!=EBADF; |
| 315 | 315 | #endif |
| 316 | 316 | } |
| 317 | + | |
| 318 | +/* | |
| 319 | +** Returns TRUE if zSym is exactly UUID_SIZE bytes long and contains | |
| 320 | +** only lower-case ASCII hexadecimal values. | |
| 321 | +*/ | |
| 322 | +int fossil_is_uuid(char const * zSym){ | |
| 323 | + return zSym | |
| 324 | + && (UUID_SIZE==strlen(zSym)) | |
| 325 | + && validate16(zSym, UUID_SIZE); | |
| 326 | +} | |
| 317 | 327 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -312,5 +312,15 @@ | |
| 312 | return 1; |
| 313 | #else |
| 314 | return fcntl(fd, F_GETFL)!=(-1) || errno!=EBADF; |
| 315 | #endif |
| 316 | } |
| 317 |
| --- src/util.c | |
| +++ src/util.c | |
| @@ -312,5 +312,15 @@ | |
| 312 | return 1; |
| 313 | #else |
| 314 | return fcntl(fd, F_GETFL)!=(-1) || errno!=EBADF; |
| 315 | #endif |
| 316 | } |
| 317 | |
| 318 | /* |
| 319 | ** Returns TRUE if zSym is exactly UUID_SIZE bytes long and contains |
| 320 | ** only lower-case ASCII hexadecimal values. |
| 321 | */ |
| 322 | int fossil_is_uuid(char const * zSym){ |
| 323 | return zSym |
| 324 | && (UUID_SIZE==strlen(zSym)) |
| 325 | && validate16(zSym, UUID_SIZE); |
| 326 | } |
| 327 |
+1
-1
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -241,11 +241,11 @@ | ||
| 241 | 241 | if( rid ){ |
| 242 | 242 | style_submenu_element("Diff", "Last change", |
| 243 | 243 | "%R/wdiff?name=%T&a=%d", zPageName, rid); |
| 244 | 244 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 245 | 245 | style_submenu_element("Details", "Details", |
| 246 | - "%R/info/%S", zUuid); | |
| 246 | + "%R/info/%s", zUuid); | |
| 247 | 247 | } |
| 248 | 248 | if( (rid && g.perm.WrWiki) || (!rid && g.perm.NewWiki) ){ |
| 249 | 249 | if( db_get_boolean("wysiwyg-wiki", 0) ){ |
| 250 | 250 | style_submenu_element("Edit", "Edit Wiki Page", |
| 251 | 251 | "%s/wikiedit?name=%T&wysiwyg=1", |
| 252 | 252 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -241,11 +241,11 @@ | |
| 241 | if( rid ){ |
| 242 | style_submenu_element("Diff", "Last change", |
| 243 | "%R/wdiff?name=%T&a=%d", zPageName, rid); |
| 244 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 245 | style_submenu_element("Details", "Details", |
| 246 | "%R/info/%S", zUuid); |
| 247 | } |
| 248 | if( (rid && g.perm.WrWiki) || (!rid && g.perm.NewWiki) ){ |
| 249 | if( db_get_boolean("wysiwyg-wiki", 0) ){ |
| 250 | style_submenu_element("Edit", "Edit Wiki Page", |
| 251 | "%s/wikiedit?name=%T&wysiwyg=1", |
| 252 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -241,11 +241,11 @@ | |
| 241 | if( rid ){ |
| 242 | style_submenu_element("Diff", "Last change", |
| 243 | "%R/wdiff?name=%T&a=%d", zPageName, rid); |
| 244 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 245 | style_submenu_element("Details", "Details", |
| 246 | "%R/info/%s", zUuid); |
| 247 | } |
| 248 | if( (rid && g.perm.WrWiki) || (!rid && g.perm.NewWiki) ){ |
| 249 | if( db_get_boolean("wysiwyg-wiki", 0) ){ |
| 250 | style_submenu_element("Edit", "Edit Wiki Page", |
| 251 | "%s/wikiedit?name=%T&wysiwyg=1", |
| 252 |
+20
| --- test/file1.test | ||
| +++ test/file1.test | ||
| @@ -24,10 +24,19 @@ | ||
| 24 | 24 | fossil test-simplify-name $path |
| 25 | 25 | test simplify-name-$testname.$i {$::RESULT=="\[$path\] -> \[$result\]"} |
| 26 | 26 | incr i |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | + | |
| 30 | +proc relative-name {testname args} { | |
| 31 | + set i 1 | |
| 32 | + foreach {subdir path result} $args { | |
| 33 | + fossil test-relative-name --chdir $subdir $path | |
| 34 | + test relative-name-$testname.$i {$::RESULT==$result} | |
| 35 | + incr i | |
| 36 | + } | |
| 37 | +} | |
| 29 | 38 | |
| 30 | 39 | simplify-name 100 . . .// . .. .. ..///// .. |
| 31 | 40 | simplify-name 101 {} {} / / ///////// / ././././ . |
| 32 | 41 | simplify-name 102 x x /x /x ///x //x |
| 33 | 42 | simplify-name 103 a/b a/b /a/b /a/b a///b a/b ///a///b///// //a/b |
| @@ -38,5 +47,16 @@ | ||
| 38 | 47 | |
| 39 | 48 | if {$::tcl_platform(os)=="Windows NT"} { |
| 40 | 49 | simplify-name 108 //?/a:/a/b a:/a/b //?/UNC/a/b //a/b //?/ {} |
| 41 | 50 | simplify-name 109 \\\\?\\a:\\a\\b a:/a/b \\\\?\\UNC\\a\\b //a/b \\\\?\\ {} |
| 42 | 51 | } |
| 52 | + | |
| 53 | +# Those directories are only needed for the testcase being able to "--chdir" to it. | |
| 54 | +file mkdir test1 | |
| 55 | +file mkdir test1/test2 | |
| 56 | + | |
| 57 | +relative-name 100 . . . test1 [pwd] .. test1 [pwd]/ .. test1 [pwd]/test ../test | |
| 58 | +relative-name 101 test1/test2 [pwd] ../.. test1/test2 [pwd]/ ../.. test1/test2 [pwd]/test ../../test | |
| 59 | +relative-name 102 test1 [pwd]/test ../test . [pwd]/file1 ./file1 . [pwd]/file1/file2 ./file1/file2 | |
| 60 | + | |
| 61 | +catch {file delete test1/test2} | |
| 62 | +catch {file delete test1} | |
| 43 | 63 |
| --- test/file1.test | |
| +++ test/file1.test | |
| @@ -24,10 +24,19 @@ | |
| 24 | fossil test-simplify-name $path |
| 25 | test simplify-name-$testname.$i {$::RESULT=="\[$path\] -> \[$result\]"} |
| 26 | incr i |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | simplify-name 100 . . .// . .. .. ..///// .. |
| 31 | simplify-name 101 {} {} / / ///////// / ././././ . |
| 32 | simplify-name 102 x x /x /x ///x //x |
| 33 | simplify-name 103 a/b a/b /a/b /a/b a///b a/b ///a///b///// //a/b |
| @@ -38,5 +47,16 @@ | |
| 38 | |
| 39 | if {$::tcl_platform(os)=="Windows NT"} { |
| 40 | simplify-name 108 //?/a:/a/b a:/a/b //?/UNC/a/b //a/b //?/ {} |
| 41 | simplify-name 109 \\\\?\\a:\\a\\b a:/a/b \\\\?\\UNC\\a\\b //a/b \\\\?\\ {} |
| 42 | } |
| 43 |
| --- test/file1.test | |
| +++ test/file1.test | |
| @@ -24,10 +24,19 @@ | |
| 24 | fossil test-simplify-name $path |
| 25 | test simplify-name-$testname.$i {$::RESULT=="\[$path\] -> \[$result\]"} |
| 26 | incr i |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | proc relative-name {testname args} { |
| 31 | set i 1 |
| 32 | foreach {subdir path result} $args { |
| 33 | fossil test-relative-name --chdir $subdir $path |
| 34 | test relative-name-$testname.$i {$::RESULT==$result} |
| 35 | incr i |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | simplify-name 100 . . .// . .. .. ..///// .. |
| 40 | simplify-name 101 {} {} / / ///////// / ././././ . |
| 41 | simplify-name 102 x x /x /x ///x //x |
| 42 | simplify-name 103 a/b a/b /a/b /a/b a///b a/b ///a///b///// //a/b |
| @@ -38,5 +47,16 @@ | |
| 47 | |
| 48 | if {$::tcl_platform(os)=="Windows NT"} { |
| 49 | simplify-name 108 //?/a:/a/b a:/a/b //?/UNC/a/b //a/b //?/ {} |
| 50 | simplify-name 109 \\\\?\\a:\\a\\b a:/a/b \\\\?\\UNC\\a\\b //a/b \\\\?\\ {} |
| 51 | } |
| 52 | |
| 53 | # Those directories are only needed for the testcase being able to "--chdir" to it. |
| 54 | file mkdir test1 |
| 55 | file mkdir test1/test2 |
| 56 | |
| 57 | relative-name 100 . . . test1 [pwd] .. test1 [pwd]/ .. test1 [pwd]/test ../test |
| 58 | relative-name 101 test1/test2 [pwd] ../.. test1/test2 [pwd]/ ../.. test1/test2 [pwd]/test ../../test |
| 59 | relative-name 102 test1 [pwd]/test ../test . [pwd]/file1 ./file1 . [pwd]/file1/file2 ./file1/file2 |
| 60 | |
| 61 | catch {file delete test1/test2} |
| 62 | catch {file delete test1} |
| 63 |
+2
-2
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -84,12 +84,12 @@ | ||
| 84 | 84 | #### The directories where the OpenSSL include and library files are located. |
| 85 | 85 | # The recommended usage here is to use the Sysinternals junction tool |
| 86 | 86 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 87 | 87 | # Fossil source code directory and the target OpenSSL source directory. |
| 88 | 88 | # |
| 89 | -OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1f/include | |
| 90 | -OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1f | |
| 89 | +OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1g/include | |
| 90 | +OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1g | |
| 91 | 91 | |
| 92 | 92 | #### Either the directory where the Tcl library is installed or the Tcl |
| 93 | 93 | # source code directory resides (depending on the value of the macro |
| 94 | 94 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 95 | 95 | # this directory must have "include" and "lib" sub-directories. If |
| 96 | 96 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -84,12 +84,12 @@ | |
| 84 | #### The directories where the OpenSSL include and library files are located. |
| 85 | # The recommended usage here is to use the Sysinternals junction tool |
| 86 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 87 | # Fossil source code directory and the target OpenSSL source directory. |
| 88 | # |
| 89 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1f/include |
| 90 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1f |
| 91 | |
| 92 | #### Either the directory where the Tcl library is installed or the Tcl |
| 93 | # source code directory resides (depending on the value of the macro |
| 94 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 95 | # this directory must have "include" and "lib" sub-directories. If |
| 96 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -84,12 +84,12 @@ | |
| 84 | #### The directories where the OpenSSL include and library files are located. |
| 85 | # The recommended usage here is to use the Sysinternals junction tool |
| 86 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 87 | # Fossil source code directory and the target OpenSSL source directory. |
| 88 | # |
| 89 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1g/include |
| 90 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1g |
| 91 | |
| 92 | #### Either the directory where the Tcl library is installed or the Tcl |
| 93 | # source code directory resides (depending on the value of the macro |
| 94 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 95 | # this directory must have "include" and "lib" sub-directories. If |
| 96 |
+2
-2
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -84,12 +84,12 @@ | ||
| 84 | 84 | #### The directories where the OpenSSL include and library files are located. |
| 85 | 85 | # The recommended usage here is to use the Sysinternals junction tool |
| 86 | 86 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 87 | 87 | # Fossil source code directory and the target OpenSSL source directory. |
| 88 | 88 | # |
| 89 | -OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1f/include | |
| 90 | -OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1f | |
| 89 | +OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1g/include | |
| 90 | +OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1g | |
| 91 | 91 | |
| 92 | 92 | #### Either the directory where the Tcl library is installed or the Tcl |
| 93 | 93 | # source code directory resides (depending on the value of the macro |
| 94 | 94 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 95 | 95 | # this directory must have "include" and "lib" sub-directories. If |
| 96 | 96 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -84,12 +84,12 @@ | |
| 84 | #### The directories where the OpenSSL include and library files are located. |
| 85 | # The recommended usage here is to use the Sysinternals junction tool |
| 86 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 87 | # Fossil source code directory and the target OpenSSL source directory. |
| 88 | # |
| 89 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1f/include |
| 90 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1f |
| 91 | |
| 92 | #### Either the directory where the Tcl library is installed or the Tcl |
| 93 | # source code directory resides (depending on the value of the macro |
| 94 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 95 | # this directory must have "include" and "lib" sub-directories. If |
| 96 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -84,12 +84,12 @@ | |
| 84 | #### The directories where the OpenSSL include and library files are located. |
| 85 | # The recommended usage here is to use the Sysinternals junction tool |
| 86 | # to create a hard link between an "openssl-1.x" sub-directory of the |
| 87 | # Fossil source code directory and the target OpenSSL source directory. |
| 88 | # |
| 89 | OPENSSLINCDIR = $(SRCDIR)/../compat/openssl-1.0.1g/include |
| 90 | OPENSSLLIBDIR = $(SRCDIR)/../compat/openssl-1.0.1g |
| 91 | |
| 92 | #### Either the directory where the Tcl library is installed or the Tcl |
| 93 | # source code directory resides (depending on the value of the macro |
| 94 | # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory, |
| 95 | # this directory must have "include" and "lib" sub-directories. If |
| 96 |
+2
-2
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -26,12 +26,12 @@ | ||
| 26 | 26 | |
| 27 | 27 | # Uncomment to enable Tcl support |
| 28 | 28 | # FOSSIL_ENABLE_TCL = 1 |
| 29 | 29 | |
| 30 | 30 | !ifdef FOSSIL_ENABLE_SSL |
| 31 | -SSLINCDIR = $(B)\compat\openssl-1.0.1f\include | |
| 32 | -SSLLIBDIR = $(B)\compat\openssl-1.0.1f\out32 | |
| 31 | +SSLINCDIR = $(B)\compat\openssl-1.0.1g\include | |
| 32 | +SSLLIBDIR = $(B)\compat\openssl-1.0.1g\out32 | |
| 33 | 33 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 34 | 34 | !endif |
| 35 | 35 | |
| 36 | 36 | !ifdef FOSSIL_ENABLE_TCL |
| 37 | 37 | TCLDIR = $(B)\compat\tcl-8.6 |
| 38 | 38 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -26,12 +26,12 @@ | |
| 26 | |
| 27 | # Uncomment to enable Tcl support |
| 28 | # FOSSIL_ENABLE_TCL = 1 |
| 29 | |
| 30 | !ifdef FOSSIL_ENABLE_SSL |
| 31 | SSLINCDIR = $(B)\compat\openssl-1.0.1f\include |
| 32 | SSLLIBDIR = $(B)\compat\openssl-1.0.1f\out32 |
| 33 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 34 | !endif |
| 35 | |
| 36 | !ifdef FOSSIL_ENABLE_TCL |
| 37 | TCLDIR = $(B)\compat\tcl-8.6 |
| 38 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -26,12 +26,12 @@ | |
| 26 | |
| 27 | # Uncomment to enable Tcl support |
| 28 | # FOSSIL_ENABLE_TCL = 1 |
| 29 | |
| 30 | !ifdef FOSSIL_ENABLE_SSL |
| 31 | SSLINCDIR = $(B)\compat\openssl-1.0.1g\include |
| 32 | SSLLIBDIR = $(B)\compat\openssl-1.0.1g\out32 |
| 33 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 34 | !endif |
| 35 | |
| 36 | !ifdef FOSSIL_ENABLE_TCL |
| 37 | TCLDIR = $(B)\compat\tcl-8.6 |
| 38 |