Fossil SCM

Use the "%S" formatting option for human-readable SHA1 hashes and "%!S" for SHA1 hashes in URLs. The length of these hashes are compile-time configurable using FOSSIL_SHA1_PREFIX_LEN and FOSSIL_SHA1_URLPREFIX_LEN, respectively. Defaults: 10 and 16.

drh 2015-02-11 11:09 trunk
Commit 1fee0377e4fb76b1140d0a3afe5881408f5d6a5a
+10 -10
--- src/attach.c
+++ src/attach.c
@@ -86,11 +86,11 @@
8686
zUrlTail = mprintf("tkt=%s&file=%t", zTarget, zFilename);
8787
}else{
8888
zUrlTail = mprintf("page=%t&file=%t", zTarget, zFilename);
8989
}
9090
@ <li><p>
91
- @ Attachment %z(href("%R/ainfo/%s",zUuid))%S(zUuid)</a>
91
+ @ Attachment %z(href("%R/ainfo/%!S",zUuid))%S(zUuid)</a>
9292
if( moderation_pending(attachid) ){
9393
@ <span class="modpending">*** Awaiting Moderator Approval ***</span>
9494
}
9595
@ <br><a href="%R/attachview?%s(zUrlTail)">%h(zFilename)</a>
9696
@ [<a href="%R/attachdownload/%t(zFilename)?%s(zUrlTail)">download</a>]<br />
@@ -103,14 +103,14 @@
103103
zSrc = "Deleted from";
104104
}else {
105105
zSrc = "Added to";
106106
}
107107
if( strlen(zTarget)==UUID_SIZE && validate16(zTarget, UUID_SIZE) ){
108
- @ %s(zSrc) ticket <a href="%s(g.zTop)/tktview?name=%s(zTarget)">
108
+ @ %s(zSrc) ticket <a href="%R/tktview?name=%s(zTarget)">
109109
@ %S(zTarget)</a>
110110
}else{
111
- @ %s(zSrc) wiki page <a href="%s(g.zTop)/wiki?name=%t(zTarget)">
111
+ @ %s(zSrc) wiki page <a href="%R/wiki?name=%t(zTarget)">
112112
@ %h(zTarget)</a>
113113
}
114114
}else{
115115
if( zSrc==0 || zSrc[0]==0 ){
116116
@ Deleted
@@ -248,22 +248,22 @@
248248
if( g.perm.ApndWiki==0 || g.perm.Attach==0 ) login_needed();
249249
if( !db_exists("SELECT 1 FROM tag WHERE tagname='wiki-%q'", zPage) ){
250250
fossil_redirect_home();
251251
}
252252
zTarget = zPage;
253
- zTargetType = mprintf("Wiki Page <a href=\"%s/wiki?name=%h\">%h</a>",
254
- g.zTop, zPage, zPage);
253
+ zTargetType = mprintf("Wiki Page <a href=\"%R/wiki?name=%h\">%h</a>",
254
+ zPage, zPage);
255255
}else{
256256
if( g.perm.ApndTkt==0 || g.perm.Attach==0 ) login_needed();
257257
if( !db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", zTkt) ){
258258
zTkt = db_text(0, "SELECT substr(tagname,5) FROM tag"
259259
" WHERE tagname GLOB 'tkt-%q*'", zTkt);
260260
if( zTkt==0 ) fossil_redirect_home();
261261
}
262262
zTarget = zTkt;
263
- zTargetType = mprintf("Ticket <a href=\"%s/tktview/%s\">%S</a>",
264
- g.zTop, zTkt, zTkt);
263
+ zTargetType = mprintf("Ticket <a href=\"%R/tktview/%s\">%S</a>",
264
+ zTkt, zTkt);
265265
}
266266
if( zFrom==0 ) zFrom = mprintf("%s/home", g.zTop);
267267
if( P("cancel") ){
268268
cgi_redirect(zFrom);
269269
}
@@ -477,11 +477,11 @@
477477
}
478478
479479
@ <div class="section">Overview</div>
480480
@ <p><table class="label-value">
481481
@ <tr><th>Artifact&nbsp;ID:</th>
482
- @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
482
+ @ <td>%z(href("%R/artifact/%!S",zUuid))%s(zUuid)</a>
483483
if( g.perm.Setup ){
484484
@ (%d(rid))
485485
}
486486
modPending = moderation_pending(rid);
487487
if( modPending ){
@@ -579,17 +579,17 @@
579579
if( cnt==0 ){
580580
@ %s(zHeader)
581581
}
582582
cnt++;
583583
@ <li>
584
- @ %z(href("%R/artifact/%s",zSrc))%h(zFile)</a>
584
+ @ %z(href("%R/artifact/%!S",zSrc))%h(zFile)</a>
585585
@ added by %h(zDispUser) on
586586
hyperlink_to_date(zDate, ".");
587
- @ [%z(href("%R/ainfo/%s",zUuid))details</a>]
587
+ @ [%z(href("%R/ainfo/%!S",zUuid))details</a>]
588588
@ </li>
589589
}
590590
if( cnt ){
591591
@ </ul>
592592
}
593593
db_finalize(&q);
594594
595595
}
596596
--- src/attach.c
+++ src/attach.c
@@ -86,11 +86,11 @@
86 zUrlTail = mprintf("tkt=%s&file=%t", zTarget, zFilename);
87 }else{
88 zUrlTail = mprintf("page=%t&file=%t", zTarget, zFilename);
89 }
90 @ <li><p>
91 @ Attachment %z(href("%R/ainfo/%s",zUuid))%S(zUuid)</a>
92 if( moderation_pending(attachid) ){
93 @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
94 }
95 @ <br><a href="%R/attachview?%s(zUrlTail)">%h(zFilename)</a>
96 @ [<a href="%R/attachdownload/%t(zFilename)?%s(zUrlTail)">download</a>]<br />
@@ -103,14 +103,14 @@
103 zSrc = "Deleted from";
104 }else {
105 zSrc = "Added to";
106 }
107 if( strlen(zTarget)==UUID_SIZE && validate16(zTarget, UUID_SIZE) ){
108 @ %s(zSrc) ticket <a href="%s(g.zTop)/tktview?name=%s(zTarget)">
109 @ %S(zTarget)</a>
110 }else{
111 @ %s(zSrc) wiki page <a href="%s(g.zTop)/wiki?name=%t(zTarget)">
112 @ %h(zTarget)</a>
113 }
114 }else{
115 if( zSrc==0 || zSrc[0]==0 ){
116 @ Deleted
@@ -248,22 +248,22 @@
248 if( g.perm.ApndWiki==0 || g.perm.Attach==0 ) login_needed();
249 if( !db_exists("SELECT 1 FROM tag WHERE tagname='wiki-%q'", zPage) ){
250 fossil_redirect_home();
251 }
252 zTarget = zPage;
253 zTargetType = mprintf("Wiki Page <a href=\"%s/wiki?name=%h\">%h</a>",
254 g.zTop, zPage, zPage);
255 }else{
256 if( g.perm.ApndTkt==0 || g.perm.Attach==0 ) login_needed();
257 if( !db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", zTkt) ){
258 zTkt = db_text(0, "SELECT substr(tagname,5) FROM tag"
259 " WHERE tagname GLOB 'tkt-%q*'", zTkt);
260 if( zTkt==0 ) fossil_redirect_home();
261 }
262 zTarget = zTkt;
263 zTargetType = mprintf("Ticket <a href=\"%s/tktview/%s\">%S</a>",
264 g.zTop, zTkt, zTkt);
265 }
266 if( zFrom==0 ) zFrom = mprintf("%s/home", g.zTop);
267 if( P("cancel") ){
268 cgi_redirect(zFrom);
269 }
@@ -477,11 +477,11 @@
477 }
478
479 @ <div class="section">Overview</div>
480 @ <p><table class="label-value">
481 @ <tr><th>Artifact&nbsp;ID:</th>
482 @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
483 if( g.perm.Setup ){
484 @ (%d(rid))
485 }
486 modPending = moderation_pending(rid);
487 if( modPending ){
@@ -579,17 +579,17 @@
579 if( cnt==0 ){
580 @ %s(zHeader)
581 }
582 cnt++;
583 @ <li>
584 @ %z(href("%R/artifact/%s",zSrc))%h(zFile)</a>
585 @ added by %h(zDispUser) on
586 hyperlink_to_date(zDate, ".");
587 @ [%z(href("%R/ainfo/%s",zUuid))details</a>]
588 @ </li>
589 }
590 if( cnt ){
591 @ </ul>
592 }
593 db_finalize(&q);
594
595 }
596
--- src/attach.c
+++ src/attach.c
@@ -86,11 +86,11 @@
86 zUrlTail = mprintf("tkt=%s&file=%t", zTarget, zFilename);
87 }else{
88 zUrlTail = mprintf("page=%t&file=%t", zTarget, zFilename);
89 }
90 @ <li><p>
91 @ Attachment %z(href("%R/ainfo/%!S",zUuid))%S(zUuid)</a>
92 if( moderation_pending(attachid) ){
93 @ <span class="modpending">*** Awaiting Moderator Approval ***</span>
94 }
95 @ <br><a href="%R/attachview?%s(zUrlTail)">%h(zFilename)</a>
96 @ [<a href="%R/attachdownload/%t(zFilename)?%s(zUrlTail)">download</a>]<br />
@@ -103,14 +103,14 @@
103 zSrc = "Deleted from";
104 }else {
105 zSrc = "Added to";
106 }
107 if( strlen(zTarget)==UUID_SIZE && validate16(zTarget, UUID_SIZE) ){
108 @ %s(zSrc) ticket <a href="%R/tktview?name=%s(zTarget)">
109 @ %S(zTarget)</a>
110 }else{
111 @ %s(zSrc) wiki page <a href="%R/wiki?name=%t(zTarget)">
112 @ %h(zTarget)</a>
113 }
114 }else{
115 if( zSrc==0 || zSrc[0]==0 ){
116 @ Deleted
@@ -248,22 +248,22 @@
248 if( g.perm.ApndWiki==0 || g.perm.Attach==0 ) login_needed();
249 if( !db_exists("SELECT 1 FROM tag WHERE tagname='wiki-%q'", zPage) ){
250 fossil_redirect_home();
251 }
252 zTarget = zPage;
253 zTargetType = mprintf("Wiki Page <a href=\"%R/wiki?name=%h\">%h</a>",
254 zPage, zPage);
255 }else{
256 if( g.perm.ApndTkt==0 || g.perm.Attach==0 ) login_needed();
257 if( !db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", zTkt) ){
258 zTkt = db_text(0, "SELECT substr(tagname,5) FROM tag"
259 " WHERE tagname GLOB 'tkt-%q*'", zTkt);
260 if( zTkt==0 ) fossil_redirect_home();
261 }
262 zTarget = zTkt;
263 zTargetType = mprintf("Ticket <a href=\"%R/tktview/%s\">%S</a>",
264 zTkt, zTkt);
265 }
266 if( zFrom==0 ) zFrom = mprintf("%s/home", g.zTop);
267 if( P("cancel") ){
268 cgi_redirect(zFrom);
269 }
@@ -477,11 +477,11 @@
477 }
478
479 @ <div class="section">Overview</div>
480 @ <p><table class="label-value">
481 @ <tr><th>Artifact&nbsp;ID:</th>
482 @ <td>%z(href("%R/artifact/%!S",zUuid))%s(zUuid)</a>
483 if( g.perm.Setup ){
484 @ (%d(rid))
485 }
486 modPending = moderation_pending(rid);
487 if( modPending ){
@@ -579,17 +579,17 @@
579 if( cnt==0 ){
580 @ %s(zHeader)
581 }
582 cnt++;
583 @ <li>
584 @ %z(href("%R/artifact/%!S",zSrc))%h(zFile)</a>
585 @ added by %h(zDispUser) on
586 hyperlink_to_date(zDate, ".");
587 @ [%z(href("%R/ainfo/%!S",zUuid))details</a>]
588 @ </li>
589 }
590 if( cnt ){
591 @ </ul>
592 }
593 db_finalize(&q);
594
595 }
596
+1 -1
--- src/branch.c
+++ src/branch.c
@@ -372,11 +372,11 @@
372372
@ <td>%d(nCkin)</td>
373373
fossil_free(zAge);
374374
@ <td>%s(isClosed?"closed":"")</td>
375375
if( zMergeTo ){
376376
@ <td>merged into
377
- @ %z(href("%R/timeline?f=%s",zLastCkin))%h(zMergeTo)</a></td>
377
+ @ %z(href("%R/timeline?f=%!S",zLastCkin))%h(zMergeTo)</a></td>
378378
}else{
379379
@ <td></td>
380380
}
381381
@ </tr>
382382
}
383383
--- src/branch.c
+++ src/branch.c
@@ -372,11 +372,11 @@
372 @ <td>%d(nCkin)</td>
373 fossil_free(zAge);
374 @ <td>%s(isClosed?"closed":"")</td>
375 if( zMergeTo ){
376 @ <td>merged into
377 @ %z(href("%R/timeline?f=%s",zLastCkin))%h(zMergeTo)</a></td>
378 }else{
379 @ <td></td>
380 }
381 @ </tr>
382 }
383
--- src/branch.c
+++ src/branch.c
@@ -372,11 +372,11 @@
372 @ <td>%d(nCkin)</td>
373 fossil_free(zAge);
374 @ <td>%s(isClosed?"closed":"")</td>
375 if( zMergeTo ){
376 @ <td>merged into
377 @ %z(href("%R/timeline?f=%!S",zLastCkin))%h(zMergeTo)</a></td>
378 }else{
379 @ <td></td>
380 }
381 @ </tr>
382 }
383
+12 -12
--- src/browse.c
+++ src/browse.c
@@ -85,11 +85,11 @@
8585
8686
for(i=0; zPath[i]; i=j){
8787
for(j=i; zPath[j] && zPath[j]!='/'; j++){}
8888
if( zPath[j] && g.perm.Hyperlink ){
8989
if( zCI ){
90
- char *zLink = href("%R/%s?name=%#T%s&ci=%s", zURI, j, zPath, zREx, zCI);
90
+ char *zLink = href("%R/%s?name=%#T%s&ci=%!S", zURI, j, zPath, zREx,zCI);
9191
blob_appendf(pOut, "%s%z%#h</a>",
9292
zSep, zLink, j-i, &zPath[i]);
9393
}else{
9494
char *zLink = href("%R/%s?name=%#T%s", zURI, j, zPath, zREx);
9595
blob_appendf(pOut, "%s%z%#h</a>",
@@ -179,11 +179,11 @@
179179
if( linkTip ){
180180
style_submenu_element("Tip", "Tip", "%s",
181181
url_render(&sURI, "ci", "tip", 0, 0));
182182
}
183183
if( zCI ){
184
- @ <h2>Files of check-in [%z(href("vinfo?name=%s",zUuid))%S(zUuid)</a>]
184
+ @ <h2>Files of check-in [%z(href("vinfo?name=%!S",zUuid))%S(zUuid)</a>]
185185
@ %s(blob_str(&dirname))</h2>
186186
zSubdirLink = mprintf("%R/dir?ci=%s&name=%T", zUuid, zPrefix);
187187
if( nD==0 ){
188188
style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s",
189189
zUuid);
@@ -281,11 +281,11 @@
281281
@ <li class="dir">%z(href("%s%T",zSubdirLink,zFN))%h(zFN)</a></li>
282282
}else{
283283
const char *zLink;
284284
if( zCI ){
285285
const char *zUuid = db_column_text(&q, 1);
286
- zLink = href("%R/artifact/%s",zUuid);
286
+ zLink = href("%R/artifact/%!S",zUuid);
287287
}else{
288288
zLink = href("%R/finfo?name=%T%T",zPrefix,zFN);
289289
}
290290
@ <li class="%z(fileext_class(zFN))">%z(zLink)%h(zFN)</a></li>
291291
}
@@ -693,11 +693,11 @@
693693
if( zCI ){
694694
@ <h2>%s(zObjType) from
695695
if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){
696696
@ "%h(zCI)"
697697
}
698
- @ [%z(href("vinfo?name=%s",zUuid))%S(zUuid)</a>] %s(blob_str(&dirname))
698
+ @ [%z(href("vinfo?name=%!S",zUuid))%S(zUuid)</a>] %s(blob_str(&dirname))
699699
}else{
700700
int n = db_int(0, "SELECT count(*) FROM plink");
701701
@ <h2>%s(zObjType) from all %d(n) check-ins %s(blob_str(&dirname))
702702
}
703703
if( useMtime ){
@@ -755,11 +755,11 @@
755755
nDir++;
756756
}else if( !showDirOnly ){
757757
const char *zFileClass = fileext_class(p->zName);
758758
char *zLink;
759759
if( zCI ){
760
- zLink = href("%R/artifact/%.16s",p->zUuid);
760
+ zLink = href("%R/artifact/%!S",p->zUuid);
761761
}else{
762762
zLink = href("%R/finfo?name=%T",p->zFullName);
763763
}
764764
@ <li class="%z(zFileClass)%s(zLastClass)"><div class="filetreeline">
765765
@ %z(zLink)%h(p->zName)</a>
@@ -1022,18 +1022,18 @@
10221022
zGlob = P("glob");
10231023
compute_fileage(rid,zGlob);
10241024
db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);");
10251025
10261026
@ <h2>Files in
1027
- @ %z(href("%R/info?name=%T",zUuid))[%S(zUuid)]</a>
1027
+ @ %z(href("%R/info/%!S",zUuid))[%S(zUuid)]</a>
10281028
if( zGlob && zGlob[0] ){
10291029
@ that match "%h(zGlob)" and
10301030
}
10311031
@ ordered by check-in time</h2>
10321032
@
10331033
@ <p>Times are relative to the checkin time for
1034
- @ %z(href("%R/ci/%s",zUuid))[%S(zUuid)]</a> which is
1034
+ @ %z(href("%R/ci/%!S",zUuid))[%S(zUuid)]</a> which is
10351035
@ %z(href("%R/timeline?c=%t",zNow))%s(zNow)</a>.</p>
10361036
@
10371037
@ <div class='fileage'><table>
10381038
@ <tr><th>Time</th><th>Files</th><th>Checkin</th></tr>
10391039
db_prepare(&q1,
@@ -1069,30 +1069,30 @@
10691069
while( db_step(&q2)==SQLITE_ROW ){
10701070
const char *zFUuid = db_column_text(&q2,0);
10711071
const char *zFile = db_column_text(&q2,1);
10721072
int fid = db_column_int(&q2,2);
10731073
if( showId ){
1074
- @ %z(href("%R/artifact/%s",zFUuid))%h(zFile)</a> (%d(fid))<br>
1074
+ @ %z(href("%R/artifact/%!S",zFUuid))%h(zFile)</a> (%d(fid))<br>
10751075
}else{
1076
- @ %z(href("%R/artifact/%s",zFUuid))%h(zFile)</a><br>
1076
+ @ %z(href("%R/artifact/%!S",zFUuid))%h(zFile)</a><br>
10771077
}
10781078
}
10791079
db_reset(&q2);
10801080
@ </td>
10811081
@ <td>
1082
- @ %z(href("%R/info/%s",zUuid))[%S(zUuid)]</a>
1082
+ @ %z(href("%R/info/%!S",zUuid))[%S(zUuid)]</a>
10831083
if( showId ){
10841084
@ (%d(mid))
10851085
}
10861086
@ %W(zComment) (user:
1087
- @ %z(href("%R/timeline?u=%t&c=%t&nd&n=200",zUser,zUuid))%h(zUser)</a>,
1087
+ @ %z(href("%R/timeline?u=%t&c=%!S&nd&n=200",zUser,zUuid))%h(zUser)</a>,
10881088
@ branch:
1089
- @ %z(href("%R/timeline?r=%t&c=%t&nd&n=200",zBranch,zUuid))%h(zBranch)</a>)
1089
+ @ %z(href("%R/timeline?r=%t&c=%!S&nd&n=200",zBranch,zUuid))%h(zBranch)</a>)
10901090
@ </td></tr>
10911091
@
10921092
fossil_free(zAge);
10931093
}
10941094
@ </table></div>
10951095
db_finalize(&q1);
10961096
db_finalize(&q2);
10971097
style_footer();
10981098
}
10991099
--- 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,11 +179,11 @@
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))%S(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);
@@ -281,11 +281,11 @@
281 @ <li class="dir">%z(href("%s%T",zSubdirLink,zFN))%h(zFN)</a></li>
282 }else{
283 const char *zLink;
284 if( zCI ){
285 const char *zUuid = db_column_text(&q, 1);
286 zLink = href("%R/artifact/%s",zUuid);
287 }else{
288 zLink = href("%R/finfo?name=%T%T",zPrefix,zFN);
289 }
290 @ <li class="%z(fileext_class(zFN))">%z(zLink)%h(zFN)</a></li>
291 }
@@ -693,11 +693,11 @@
693 if( zCI ){
694 @ <h2>%s(zObjType) from
695 if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){
696 @ "%h(zCI)"
697 }
698 @ [%z(href("vinfo?name=%s",zUuid))%S(zUuid)</a>] %s(blob_str(&dirname))
699 }else{
700 int n = db_int(0, "SELECT count(*) FROM plink");
701 @ <h2>%s(zObjType) from all %d(n) check-ins %s(blob_str(&dirname))
702 }
703 if( useMtime ){
@@ -755,11 +755,11 @@
755 nDir++;
756 }else if( !showDirOnly ){
757 const char *zFileClass = fileext_class(p->zName);
758 char *zLink;
759 if( zCI ){
760 zLink = href("%R/artifact/%.16s",p->zUuid);
761 }else{
762 zLink = href("%R/finfo?name=%T",p->zFullName);
763 }
764 @ <li class="%z(zFileClass)%s(zLastClass)"><div class="filetreeline">
765 @ %z(zLink)%h(p->zName)</a>
@@ -1022,18 +1022,18 @@
1022 zGlob = P("glob");
1023 compute_fileage(rid,zGlob);
1024 db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);");
1025
1026 @ <h2>Files in
1027 @ %z(href("%R/info?name=%T",zUuid))[%S(zUuid)]</a>
1028 if( zGlob && zGlob[0] ){
1029 @ that match "%h(zGlob)" and
1030 }
1031 @ ordered by check-in time</h2>
1032 @
1033 @ <p>Times are relative to the checkin time for
1034 @ %z(href("%R/ci/%s",zUuid))[%S(zUuid)]</a> which is
1035 @ %z(href("%R/timeline?c=%t",zNow))%s(zNow)</a>.</p>
1036 @
1037 @ <div class='fileage'><table>
1038 @ <tr><th>Time</th><th>Files</th><th>Checkin</th></tr>
1039 db_prepare(&q1,
@@ -1069,30 +1069,30 @@
1069 while( db_step(&q2)==SQLITE_ROW ){
1070 const char *zFUuid = db_column_text(&q2,0);
1071 const char *zFile = db_column_text(&q2,1);
1072 int fid = db_column_int(&q2,2);
1073 if( showId ){
1074 @ %z(href("%R/artifact/%s",zFUuid))%h(zFile)</a> (%d(fid))<br>
1075 }else{
1076 @ %z(href("%R/artifact/%s",zFUuid))%h(zFile)</a><br>
1077 }
1078 }
1079 db_reset(&q2);
1080 @ </td>
1081 @ <td>
1082 @ %z(href("%R/info/%s",zUuid))[%S(zUuid)]</a>
1083 if( showId ){
1084 @ (%d(mid))
1085 }
1086 @ %W(zComment) (user:
1087 @ %z(href("%R/timeline?u=%t&c=%t&nd&n=200",zUser,zUuid))%h(zUser)</a>,
1088 @ branch:
1089 @ %z(href("%R/timeline?r=%t&c=%t&nd&n=200",zBranch,zUuid))%h(zBranch)</a>)
1090 @ </td></tr>
1091 @
1092 fossil_free(zAge);
1093 }
1094 @ </table></div>
1095 db_finalize(&q1);
1096 db_finalize(&q2);
1097 style_footer();
1098 }
1099
--- 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,11 +179,11 @@
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))%S(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);
@@ -281,11 +281,11 @@
281 @ <li class="dir">%z(href("%s%T",zSubdirLink,zFN))%h(zFN)</a></li>
282 }else{
283 const char *zLink;
284 if( zCI ){
285 const char *zUuid = db_column_text(&q, 1);
286 zLink = href("%R/artifact/%!S",zUuid);
287 }else{
288 zLink = href("%R/finfo?name=%T%T",zPrefix,zFN);
289 }
290 @ <li class="%z(fileext_class(zFN))">%z(zLink)%h(zFN)</a></li>
291 }
@@ -693,11 +693,11 @@
693 if( zCI ){
694 @ <h2>%s(zObjType) from
695 if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){
696 @ "%h(zCI)"
697 }
698 @ [%z(href("vinfo?name=%!S",zUuid))%S(zUuid)</a>] %s(blob_str(&dirname))
699 }else{
700 int n = db_int(0, "SELECT count(*) FROM plink");
701 @ <h2>%s(zObjType) from all %d(n) check-ins %s(blob_str(&dirname))
702 }
703 if( useMtime ){
@@ -755,11 +755,11 @@
755 nDir++;
756 }else if( !showDirOnly ){
757 const char *zFileClass = fileext_class(p->zName);
758 char *zLink;
759 if( zCI ){
760 zLink = href("%R/artifact/%!S",p->zUuid);
761 }else{
762 zLink = href("%R/finfo?name=%T",p->zFullName);
763 }
764 @ <li class="%z(zFileClass)%s(zLastClass)"><div class="filetreeline">
765 @ %z(zLink)%h(p->zName)</a>
@@ -1022,18 +1022,18 @@
1022 zGlob = P("glob");
1023 compute_fileage(rid,zGlob);
1024 db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);");
1025
1026 @ <h2>Files in
1027 @ %z(href("%R/info/%!S",zUuid))[%S(zUuid)]</a>
1028 if( zGlob && zGlob[0] ){
1029 @ that match "%h(zGlob)" and
1030 }
1031 @ ordered by check-in time</h2>
1032 @
1033 @ <p>Times are relative to the checkin time for
1034 @ %z(href("%R/ci/%!S",zUuid))[%S(zUuid)]</a> which is
1035 @ %z(href("%R/timeline?c=%t",zNow))%s(zNow)</a>.</p>
1036 @
1037 @ <div class='fileage'><table>
1038 @ <tr><th>Time</th><th>Files</th><th>Checkin</th></tr>
1039 db_prepare(&q1,
@@ -1069,30 +1069,30 @@
1069 while( db_step(&q2)==SQLITE_ROW ){
1070 const char *zFUuid = db_column_text(&q2,0);
1071 const char *zFile = db_column_text(&q2,1);
1072 int fid = db_column_int(&q2,2);
1073 if( showId ){
1074 @ %z(href("%R/artifact/%!S",zFUuid))%h(zFile)</a> (%d(fid))<br>
1075 }else{
1076 @ %z(href("%R/artifact/%!S",zFUuid))%h(zFile)</a><br>
1077 }
1078 }
1079 db_reset(&q2);
1080 @ </td>
1081 @ <td>
1082 @ %z(href("%R/info/%!S",zUuid))[%S(zUuid)]</a>
1083 if( showId ){
1084 @ (%d(mid))
1085 }
1086 @ %W(zComment) (user:
1087 @ %z(href("%R/timeline?u=%t&c=%!S&nd&n=200",zUser,zUuid))%h(zUser)</a>,
1088 @ branch:
1089 @ %z(href("%R/timeline?r=%t&c=%!S&nd&n=200",zBranch,zUuid))%h(zBranch)</a>)
1090 @ </td></tr>
1091 @
1092 fossil_free(zAge);
1093 }
1094 @ </table></div>
1095 db_finalize(&q1);
1096 db_finalize(&q2);
1097 style_footer();
1098 }
1099
+9 -9
--- src/diff.c
+++ src/diff.c
@@ -2307,17 +2307,17 @@
23072307
clr = gradient_color(clr1, clr2, ann.nVers-1, i);
23082308
ann.aVers[i].zBgColor = mprintf("#%06x", clr);
23092309
}
23102310
23112311
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);
23132313
@ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2>
23142314
@ <ol>
23152315
for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
23162316
@ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate)
2317
- @ check-in %z(href("%R/info/%s",p->zMUuid))%S(p->zMUuid)</a>
2318
- @ artifact %z(href("%R/artifact/%s",p->zFUuid))%S(p->zFUuid)</a>
2317
+ @ check-in %z(href("%R/info/%!S",p->zMUuid))%S(p->zMUuid)</a>
2318
+ @ artifact %z(href("%R/artifact/%!S",p->zFUuid))%S(p->zFUuid)</a>
23192319
@ </span>
23202320
#if 0
23212321
if( i>0 ){
23222322
char *zLink = xhref("target='infowindow'",
23232323
"%R/fdiff?v1=%S&v2=%S&sbs=1",
@@ -2335,17 +2335,17 @@
23352335
@ </ol>
23362336
@ <hr>
23372337
}
23382338
if( !ann.bLimit ){
23392339
@ <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>
23422342
iLimit = ann.nVers+10;
23432343
}else{
23442344
@ <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>
23472347
}
23482348
@ <pre>
23492349
for(i=0; i<ann.nOrig; i++){
23502350
int iVers = ann.aOrig[i].iVers;
23512351
char *z = (char*)ann.aOrig[i].z;
@@ -2355,11 +2355,11 @@
23552355
if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1;
23562356
23572357
if( bBlame ){
23582358
if( iVers>=0 ){
23592359
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);
23612361
sqlite3_snprintf(sizeof(zPrefix), zPrefix,
23622362
"<span style='background-color:%s'>"
23632363
"%s%.10s</a> %s</span> %13.13s:",
23642364
p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser);
23652365
fossil_free(zLink);
@@ -2367,11 +2367,11 @@
23672367
sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s", "");
23682368
}
23692369
}else{
23702370
if( iVers>=0 ){
23712371
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);
23732373
sqlite3_snprintf(sizeof(zPrefix), zPrefix,
23742374
"<span style='background-color:%s'>"
23752375
"%s%.10s</a> %s</span> %4d:",
23762376
p->zBgColor, zLink, p->zMUuid, p->zDate, i+1);
23772377
fossil_free(zLink);
23782378
--- 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))%S(p->zMUuid)</a>
2318 @ artifact %z(href("%R/artifact/%s",p->zFUuid))%S(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))%S(p->zMUuid)</a>
2318 @ artifact %z(href("%R/artifact/%!S",p->zFUuid))%S(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
+1 -1
--- src/event.c
+++ src/event.c
@@ -160,11 +160,11 @@
160160
int i;
161161
const char *zClr = 0;
162162
Blob comment;
163163
164164
zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate);
165
- @ <p>Event [%z(href("%R/artifact/%s",zUuid))%S(zUuid)</a>] at
165
+ @ <p>Event [%z(href("%R/artifact/%!S",zUuid))%S(zUuid)</a>] at
166166
@ [%z(href("%R/timeline?c=%T",zETime))%s(zETime)</a>]
167167
@ entered by user <b>%h(pEvent->zUser)</b> on
168168
@ [%z(href("%R/timeline?c=%T",zATime))%s(zATime)</a>]:</p>
169169
@ <blockquote>
170170
for(i=0; i<pEvent->nTag; i++){
171171
--- src/event.c
+++ src/event.c
@@ -160,11 +160,11 @@
160 int i;
161 const char *zClr = 0;
162 Blob comment;
163
164 zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate);
165 @ <p>Event [%z(href("%R/artifact/%s",zUuid))%S(zUuid)</a>] at
166 @ [%z(href("%R/timeline?c=%T",zETime))%s(zETime)</a>]
167 @ entered by user <b>%h(pEvent->zUser)</b> on
168 @ [%z(href("%R/timeline?c=%T",zATime))%s(zATime)</a>]:</p>
169 @ <blockquote>
170 for(i=0; i<pEvent->nTag; i++){
171
--- src/event.c
+++ src/event.c
@@ -160,11 +160,11 @@
160 int i;
161 const char *zClr = 0;
162 Blob comment;
163
164 zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate);
165 @ <p>Event [%z(href("%R/artifact/%!S",zUuid))%S(zUuid)</a>] at
166 @ [%z(href("%R/timeline?c=%T",zETime))%s(zETime)</a>]
167 @ entered by user <b>%h(pEvent->zUser)</b> on
168 @ [%z(href("%R/timeline?c=%T",zATime))%s(zATime)</a>]:</p>
169 @ <blockquote>
170 for(i=0; i<pEvent->nTag; i++){
171
+7 -5
--- src/finfo.c
+++ src/finfo.c
@@ -383,11 +383,11 @@
383383
}
384384
blob_reset(&sql);
385385
blob_zero(&title);
386386
if( baseCheckin ){
387387
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
388
- char *zLink = href("%R/info/%s", zUuid);
388
+ char *zLink = href("%R/info/%!S", zUuid);
389389
blob_appendf(&title, "Ancestors of file ");
390390
hyperlinked_path(zFilename, &title, zUuid, "tree", "");
391391
if( fShowId ) blob_appendf(&title, " (%d)", fnid);
392392
blob_appendf(&title, " from check-in %z%S</a>", zLink, zUuid);
393393
if( fShowId ) blob_appendf(&title, " (%d)", baseCheckin);
@@ -469,11 +469,11 @@
469469
char *zPrevName = db_text(0, "SELECT name FROM filename WHERE fnid=%d",
470470
pfnid);
471471
@ <b>Renamed</b> from
472472
@ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a>
473473
}
474
- @ %z(href("%R/artifact/%s",zUuid))[%S(zUuid)]</a>
474
+ @ %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
475475
if( fShowId ){
476476
@ (%d(frid))
477477
}
478478
@ part of check-in
479479
}else{
@@ -503,25 +503,27 @@
503503
const char *z = zFilename;
504504
@ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
505505
@ [annotate]</a>
506506
@ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
507507
@ [blame]</a>
508
- @ %z(href("%R/timeline?n=200&uf=%s",zUuid))[checkins&nbsp;using]</a>
508
+ @ %z(href("%R/timeline?n=200&uf=%!S",zUuid))[checkins&nbsp;using]</a>
509509
if( fpid ){
510
- @ %z(href("%R/fdiff?sbs=1&v1=%s&v2=%s",zPUuid,zUuid))[diff]</a>
510
+ @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
511511
}
512512
}
513513
if( fDebug & FINFO_DEBUG_MLINK ){
514514
int ii;
515
+ char *zAncLink;
515516
@ <br>fid=%d(frid) pid=%d(fpid) mid=%d(fmid)
516517
if( nParent>0 ){
517518
@ parents=%d(aParent[0])
518519
for(ii=1; ii<nParent; ii++){
519520
@ %d(aParent[ii])
520521
}
521522
}
522
- @ %z(href("%R/finfo?name=%T&ci=%s&debug=1",zFilename,zCkin))[ancestry]</a>
523
+ zAncLink = href("%R/finfo?name=%T&ci=%!S&debug=1",zFilename,zCkin);
524
+ @ %z(zAncLink)[ancestry]</a>
523525
}
524526
tag_private_status(frid);
525527
@ </td></tr>
526528
}
527529
db_finalize(&q);
528530
--- src/finfo.c
+++ src/finfo.c
@@ -383,11 +383,11 @@
383 }
384 blob_reset(&sql);
385 blob_zero(&title);
386 if( baseCheckin ){
387 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
388 char *zLink = href("%R/info/%s", zUuid);
389 blob_appendf(&title, "Ancestors of file ");
390 hyperlinked_path(zFilename, &title, zUuid, "tree", "");
391 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
392 blob_appendf(&title, " from check-in %z%S</a>", zLink, zUuid);
393 if( fShowId ) blob_appendf(&title, " (%d)", baseCheckin);
@@ -469,11 +469,11 @@
469 char *zPrevName = db_text(0, "SELECT name FROM filename WHERE fnid=%d",
470 pfnid);
471 @ <b>Renamed</b> from
472 @ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a>
473 }
474 @ %z(href("%R/artifact/%s",zUuid))[%S(zUuid)]</a>
475 if( fShowId ){
476 @ (%d(frid))
477 }
478 @ part of check-in
479 }else{
@@ -503,25 +503,27 @@
503 const char *z = zFilename;
504 @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
505 @ [annotate]</a>
506 @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
507 @ [blame]</a>
508 @ %z(href("%R/timeline?n=200&uf=%s",zUuid))[checkins&nbsp;using]</a>
509 if( fpid ){
510 @ %z(href("%R/fdiff?sbs=1&v1=%s&v2=%s",zPUuid,zUuid))[diff]</a>
511 }
512 }
513 if( fDebug & FINFO_DEBUG_MLINK ){
514 int ii;
 
515 @ <br>fid=%d(frid) pid=%d(fpid) mid=%d(fmid)
516 if( nParent>0 ){
517 @ parents=%d(aParent[0])
518 for(ii=1; ii<nParent; ii++){
519 @ %d(aParent[ii])
520 }
521 }
522 @ %z(href("%R/finfo?name=%T&ci=%s&debug=1",zFilename,zCkin))[ancestry]</a>
 
523 }
524 tag_private_status(frid);
525 @ </td></tr>
526 }
527 db_finalize(&q);
528
--- src/finfo.c
+++ src/finfo.c
@@ -383,11 +383,11 @@
383 }
384 blob_reset(&sql);
385 blob_zero(&title);
386 if( baseCheckin ){
387 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
388 char *zLink = href("%R/info/%!S", zUuid);
389 blob_appendf(&title, "Ancestors of file ");
390 hyperlinked_path(zFilename, &title, zUuid, "tree", "");
391 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
392 blob_appendf(&title, " from check-in %z%S</a>", zLink, zUuid);
393 if( fShowId ) blob_appendf(&title, " (%d)", baseCheckin);
@@ -469,11 +469,11 @@
469 char *zPrevName = db_text(0, "SELECT name FROM filename WHERE fnid=%d",
470 pfnid);
471 @ <b>Renamed</b> from
472 @ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a>
473 }
474 @ %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
475 if( fShowId ){
476 @ (%d(frid))
477 }
478 @ part of check-in
479 }else{
@@ -503,25 +503,27 @@
503 const char *z = zFilename;
504 @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
505 @ [annotate]</a>
506 @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
507 @ [blame]</a>
508 @ %z(href("%R/timeline?n=200&uf=%!S",zUuid))[checkins&nbsp;using]</a>
509 if( fpid ){
510 @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
511 }
512 }
513 if( fDebug & FINFO_DEBUG_MLINK ){
514 int ii;
515 char *zAncLink;
516 @ <br>fid=%d(frid) pid=%d(fpid) mid=%d(fmid)
517 if( nParent>0 ){
518 @ parents=%d(aParent[0])
519 for(ii=1; ii<nParent; ii++){
520 @ %d(aParent[ii])
521 }
522 }
523 zAncLink = href("%R/finfo?name=%T&ci=%!S&debug=1",zFilename,zCkin);
524 @ %z(zAncLink)[ancestry]</a>
525 }
526 tag_private_status(frid);
527 @ </td></tr>
528 }
529 db_finalize(&q);
530
+30 -30
--- src/info.c
+++ src/info.c
@@ -403,32 +403,32 @@
403403
}
404404
}else{
405405
if( zOld && zNew ){
406406
if( fossil_strcmp(zOld, zNew)!=0 ){
407407
@ <p>Modified %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
408
- @ from %z(href("%R/artifact/%s",zOld))[%S(zOld)]</a>
409
- @ to %z(href("%R/artifact/%s",zNew))[%S(zNew)]</a>.
408
+ @ from %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>
409
+ @ to %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>.
410410
}else if( zOldName!=0 && fossil_strcmp(zName,zOldName)!=0 ){
411411
@ <p>Name change
412412
@ from %z(href("%R/finfo?name=%T",zOldName))%h(zOldName)</a>
413413
@ to %z(href("%R/finfo?name=%T",zName))%h(zName)</a>.
414414
}else{
415415
@ <p>Execute permission %s(( mperm==PERM_EXE )?"set":"cleared") for
416416
@ %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
417417
}
418418
}else if( zOld ){
419
- @ <p>Deleted %z(href("%s/finfo?name=%T",g.zTop,zName))%h(zName)</a>
420
- @ version %z(href("%R/artifact/%s",zOld))[%S(zOld)]</a>
419
+ @ <p>Deleted %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
420
+ @ version %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>
421421
}else{
422422
@ <p>Added %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
423
- @ version %z(href("%R/artifact/%s",zNew))[%S(zNew)]</a>
423
+ @ version %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>
424424
}
425425
if( diffFlags ){
426426
append_diff(zOld, zNew, diffFlags, pRe);
427427
}else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){
428428
@ &nbsp;&nbsp;
429
- @ %z(href("%R/fdiff?v1=%s&v2=%s&sbs=1",zOld,zNew))[diff]</a>
429
+ @ %z(href("%R/fdiff?v1=%!S&v2=%!S&sbs=1",zOld,zNew))[diff]</a>
430430
}
431431
}
432432
}
433433
434434
/*
@@ -635,19 +635,19 @@
635635
if( (zPJ[jj]>0 && zPJ[jj]<' ') || strchr("\"*/:<>?\\|", zPJ[jj]) ){
636636
zPJ[jj] = '_';
637637
}
638638
}
639639
@ <tr><th>Timelines:</th><td>
640
- @ %z(href("%R/timeline?f=%s&unhide",zUuid))family</a>
640
+ @ %z(href("%R/timeline?f=%!S&unhide",zUuid))family</a>
641641
if( zParent ){
642
- @ | %z(href("%R/timeline?p=%s&unhide",zUuid))ancestors</a>
642
+ @ | %z(href("%R/timeline?p=%!S&unhide",zUuid))ancestors</a>
643643
}
644644
if( !isLeaf ){
645
- @ | %z(href("%R/timeline?d=%s&unhide",zUuid))descendants</a>
645
+ @ | %z(href("%R/timeline?d=%!S&unhide",zUuid))descendants</a>
646646
}
647647
if( zParent && !isLeaf ){
648
- @ | %z(href("%R/timeline?dp=%s&unhide",zUuid))both</a>
648
+ @ | %z(href("%R/timeline?dp=%!S&unhide",zUuid))both</a>
649649
}
650650
db_prepare(&q2,"SELECT substr(tag.tagname,5) FROM tagxref, tag "
651651
" WHERE rid=%d AND tagtype>0 "
652652
" AND tag.tagid=tagxref.tagid "
653653
" AND +tag.tagname GLOB 'sym-*'", rid);
@@ -663,23 +663,23 @@
663663
char *zUrl = mprintf("%R/tarball/%t-%S.tar.gz?uuid=%s",
664664
zPJ, zUuid, zUuid);
665665
@ </td></tr>
666666
@ <tr><th>Downloads:</th><td>
667667
@ %z(href("%s",zUrl))Tarball</a>
668
- @ | %z(href("%R/zip/%t-%S.zip?uuid=%s",zPJ,zUuid,zUuid))
668
+ @ | %z(href("%R/zip/%t-%S.zip?uuid=%!S",zPJ,zUuid,zUuid))
669669
@ ZIP archive</a>
670670
fossil_free(zUrl);
671671
}
672672
@ </td></tr>
673673
@ <tr><th>Other&nbsp;Links:</th>
674674
@ <td>
675
- @ %z(href("%R/tree?ci=%S",zUuid))files</a>
676
- @ | %z(href("%R/fileage?name=%S",zUuid))file ages</a>
677
- @ | %z(href("%R/tree?nofiles&type=tree&ci=%S",zUuid))folders</a>
678
- @ | %z(href("%R/artifact/%S",zUuid))manifest</a>
675
+ @ %z(href("%R/tree?ci=%!S",zUuid))files</a>
676
+ @ | %z(href("%R/fileage?name=%!S",zUuid))file ages</a>
677
+ @ | %z(href("%R/tree?nofiles&type=tree&ci=%!S",zUuid))folders</a>
678
+ @ | %z(href("%R/artifact/%!S",zUuid))manifest</a>
679679
if( g.perm.Write ){
680
- @ | %z(href("%R/ci_edit?r=%S",zUuid))edit</a>
680
+ @ | %z(href("%R/ci_edit?r=%!S",zUuid))edit</a>
681681
}
682682
@ </td>
683683
@ </tr>
684684
blob_reset(&projName);
685685
}
@@ -723,11 +723,11 @@
723723
@ Show&nbsp;Unified&nbsp;Diffs</a>
724724
@ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName))
725725
@ Show&nbsp;Side-by-Side&nbsp;Diffs</a>
726726
}
727727
if( zParent ){
728
- @ %z(xhref("class='button'","%R/vpatch?from=%s&to=%s",zParent,zUuid))
728
+ @ %z(xhref("class='button'","%R/vpatch?from=%!S&to=%!S",zParent,zUuid))
729729
@ Patch</a>
730730
}
731731
@</div>
732732
if( pRe ){
733733
@ <p><b>Only differences that match regular expression "%h(zRe)"
@@ -813,11 +813,11 @@
813813
pWiki->zWikiTitle);
814814
login_anonymous_available();
815815
@ <div class="section">Overview</div>
816816
@ <p><table class="label-value">
817817
@ <tr><th>Artifact&nbsp;ID:</th>
818
- @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
818
+ @ <td>%z(href("%R/artifact/%!S",zUuid))%s(zUuid)</a>
819819
if( g.perm.Setup ){
820820
@ (%d(rid))
821821
}
822822
modPending = moderation_pending(rid);
823823
if( modPending ){
@@ -832,11 +832,11 @@
832832
if( pWiki->nParent>0 ){
833833
int i;
834834
@ <tr><th>Parent%s(pWiki->nParent==1?"":"s"):</th><td>
835835
for(i=0; i<pWiki->nParent; i++){
836836
char *zParent = pWiki->azParent[i];
837
- @ %z(href("info/%s",zParent))%s(zParent)</a>
837
+ @ %z(href("info/%!S",zParent))%s(zParent)</a>
838838
}
839839
@ </td></tr>
840840
}
841841
@ </table>
842842
@@ -1206,11 +1206,11 @@
12061206
int mPerm = db_column_int(&q, 5);
12071207
const char *zBr = db_column_text(&q, 6);
12081208
int sameFilename = prevName!=0 && fossil_strcmp(zName,prevName)==0;
12091209
if( sameFilename && !showDetail ){
12101210
if( cnt==1 ){
1211
- @ %z(href("%R/whatis/%s",zUuid))[more...]</a>
1211
+ @ %z(href("%R/whatis/%!S",zUuid))[more...]</a>
12121212
}
12131213
cnt++;
12141214
continue;
12151215
}
12161216
if( !sameFilename ){
@@ -1249,14 +1249,14 @@
12491249
@ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a>
12501250
}
12511251
@ &mdash; %!w(zCom) (user:
12521252
hyperlink_to_user(zUser,zDate,")");
12531253
if( g.perm.Hyperlink ){
1254
- @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a>
1255
- @ %z(href("%R/annotate?filename=%T&checkin=%s",zName,zVers))
1254
+ @ %z(href("%R/finfo?name=%T&ci=%!S",zName,zVers))[ancestry]</a>
1255
+ @ %z(href("%R/annotate?filename=%T&checkin=%!S",zName,zVers))
12561256
@ [annotate]</a>
1257
- @ %z(href("%R/blame?filename=%T&checkin=%s",zName,zVers))
1257
+ @ %z(href("%R/blame?filename=%T&checkin=%!S",zName,zVers))
12581258
@ [blame]</a>
12591259
}
12601260
cnt++;
12611261
if( pDownloadName && blob_size(pDownloadName)==0 ){
12621262
blob_append(pDownloadName, zName, -1);
@@ -1364,11 +1364,11 @@
13641364
@ Attachment "%h(zFilename)" to
13651365
}
13661366
objType |= OBJTYPE_ATTACHMENT;
13671367
if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
13681368
if( g.perm.Hyperlink && g.perm.RdTkt ){
1369
- @ ticket [%z(href("%R/tktview?name=%s",zTarget))%S(zTarget)</a>]
1369
+ @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
13701370
}else{
13711371
@ ticket [%S(zTarget)]
13721372
}
13731373
}else{
13741374
if( g.perm.Hyperlink && g.perm.RdWiki ){
@@ -1472,17 +1472,17 @@
14721472
g.zTop, P("v1"), P("v2"), zW);
14731473
}
14741474
14751475
if( P("smhdr")!=0 ){
14761476
@ <h2>Differences From Artifact
1477
- @ %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a> To
1478
- @ %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>.</h2>
1477
+ @ %z(href("%R/artifact/%!S",zV1))[%S(zV1)]</a> To
1478
+ @ %z(href("%R/artifact/%!S",zV2))[%S(zV2)]</a>.</h2>
14791479
}else{
14801480
@ <h2>Differences From
1481
- @ Artifact %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a>:</h2>
1481
+ @ Artifact %z(href("%R/artifact/%!S",zV1))[%S(zV1)]</a>:</h2>
14821482
object_description(v1, objdescFlags, 0);
1483
- @ <h2>To Artifact %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>:</h2>
1483
+ @ <h2>To Artifact %z(href("%R/artifact/%!S",zV2))[%S(zV2)]</a>:</h2>
14841484
object_description(v2, objdescFlags, 0);
14851485
}
14861486
if( pRe ){
14871487
@ <b>Only differences that match regular expression "%h(zRe)"
14881488
@ are shown.</b>
@@ -1959,11 +1959,11 @@
19591959
}
19601960
19611961
@ <div class="section">Overview</div>
19621962
@ <p><table class="label-value">
19631963
@ <tr><th>Artifact&nbsp;ID:</th>
1964
- @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
1964
+ @ <td>%z(href("%R/artifact/%!S",zUuid))%s(zUuid)</a>
19651965
if( g.perm.Setup ){
19661966
@ (%d(rid))
19671967
}
19681968
modPending = moderation_pending(rid);
19691969
if( modPending ){
@@ -2478,11 +2478,11 @@
24782478
@ </blockquote>
24792479
@ <hr />
24802480
blob_reset(&suffix);
24812481
}
24822482
@ <p>Make changes to attributes of check-in
2483
- @ [%z(href("%R/ci/%s",zUuid))%s(zUuid)</a>]:</p>
2483
+ @ [%z(href("%R/ci/%!S",zUuid))%s(zUuid)</a>]:</p>
24842484
form_begin(0, "%R/ci_edit");
24852485
login_insert_csrf_secret();
24862486
@ <div><input type="hidden" name="r" value="%s(zUuid)" />
24872487
@ <table border="0" cellspacing="10">
24882488
24892489
--- src/info.c
+++ src/info.c
@@ -403,32 +403,32 @@
403 }
404 }else{
405 if( zOld && zNew ){
406 if( fossil_strcmp(zOld, zNew)!=0 ){
407 @ <p>Modified %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
408 @ from %z(href("%R/artifact/%s",zOld))[%S(zOld)]</a>
409 @ to %z(href("%R/artifact/%s",zNew))[%S(zNew)]</a>.
410 }else if( zOldName!=0 && fossil_strcmp(zName,zOldName)!=0 ){
411 @ <p>Name change
412 @ from %z(href("%R/finfo?name=%T",zOldName))%h(zOldName)</a>
413 @ to %z(href("%R/finfo?name=%T",zName))%h(zName)</a>.
414 }else{
415 @ <p>Execute permission %s(( mperm==PERM_EXE )?"set":"cleared") for
416 @ %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
417 }
418 }else if( zOld ){
419 @ <p>Deleted %z(href("%s/finfo?name=%T",g.zTop,zName))%h(zName)</a>
420 @ version %z(href("%R/artifact/%s",zOld))[%S(zOld)]</a>
421 }else{
422 @ <p>Added %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
423 @ version %z(href("%R/artifact/%s",zNew))[%S(zNew)]</a>
424 }
425 if( diffFlags ){
426 append_diff(zOld, zNew, diffFlags, pRe);
427 }else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){
428 @ &nbsp;&nbsp;
429 @ %z(href("%R/fdiff?v1=%s&v2=%s&sbs=1",zOld,zNew))[diff]</a>
430 }
431 }
432 }
433
434 /*
@@ -635,19 +635,19 @@
635 if( (zPJ[jj]>0 && zPJ[jj]<' ') || strchr("\"*/:<>?\\|", zPJ[jj]) ){
636 zPJ[jj] = '_';
637 }
638 }
639 @ <tr><th>Timelines:</th><td>
640 @ %z(href("%R/timeline?f=%s&unhide",zUuid))family</a>
641 if( zParent ){
642 @ | %z(href("%R/timeline?p=%s&unhide",zUuid))ancestors</a>
643 }
644 if( !isLeaf ){
645 @ | %z(href("%R/timeline?d=%s&unhide",zUuid))descendants</a>
646 }
647 if( zParent && !isLeaf ){
648 @ | %z(href("%R/timeline?dp=%s&unhide",zUuid))both</a>
649 }
650 db_prepare(&q2,"SELECT substr(tag.tagname,5) FROM tagxref, tag "
651 " WHERE rid=%d AND tagtype>0 "
652 " AND tag.tagid=tagxref.tagid "
653 " AND +tag.tagname GLOB 'sym-*'", rid);
@@ -663,23 +663,23 @@
663 char *zUrl = mprintf("%R/tarball/%t-%S.tar.gz?uuid=%s",
664 zPJ, zUuid, zUuid);
665 @ </td></tr>
666 @ <tr><th>Downloads:</th><td>
667 @ %z(href("%s",zUrl))Tarball</a>
668 @ | %z(href("%R/zip/%t-%S.zip?uuid=%s",zPJ,zUuid,zUuid))
669 @ ZIP archive</a>
670 fossil_free(zUrl);
671 }
672 @ </td></tr>
673 @ <tr><th>Other&nbsp;Links:</th>
674 @ <td>
675 @ %z(href("%R/tree?ci=%S",zUuid))files</a>
676 @ | %z(href("%R/fileage?name=%S",zUuid))file ages</a>
677 @ | %z(href("%R/tree?nofiles&type=tree&ci=%S",zUuid))folders</a>
678 @ | %z(href("%R/artifact/%S",zUuid))manifest</a>
679 if( g.perm.Write ){
680 @ | %z(href("%R/ci_edit?r=%S",zUuid))edit</a>
681 }
682 @ </td>
683 @ </tr>
684 blob_reset(&projName);
685 }
@@ -723,11 +723,11 @@
723 @ Show&nbsp;Unified&nbsp;Diffs</a>
724 @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName))
725 @ Show&nbsp;Side-by-Side&nbsp;Diffs</a>
726 }
727 if( zParent ){
728 @ %z(xhref("class='button'","%R/vpatch?from=%s&to=%s",zParent,zUuid))
729 @ Patch</a>
730 }
731 @</div>
732 if( pRe ){
733 @ <p><b>Only differences that match regular expression "%h(zRe)"
@@ -813,11 +813,11 @@
813 pWiki->zWikiTitle);
814 login_anonymous_available();
815 @ <div class="section">Overview</div>
816 @ <p><table class="label-value">
817 @ <tr><th>Artifact&nbsp;ID:</th>
818 @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
819 if( g.perm.Setup ){
820 @ (%d(rid))
821 }
822 modPending = moderation_pending(rid);
823 if( modPending ){
@@ -832,11 +832,11 @@
832 if( pWiki->nParent>0 ){
833 int i;
834 @ <tr><th>Parent%s(pWiki->nParent==1?"":"s"):</th><td>
835 for(i=0; i<pWiki->nParent; i++){
836 char *zParent = pWiki->azParent[i];
837 @ %z(href("info/%s",zParent))%s(zParent)</a>
838 }
839 @ </td></tr>
840 }
841 @ </table>
842
@@ -1206,11 +1206,11 @@
1206 int mPerm = db_column_int(&q, 5);
1207 const char *zBr = db_column_text(&q, 6);
1208 int sameFilename = prevName!=0 && fossil_strcmp(zName,prevName)==0;
1209 if( sameFilename && !showDetail ){
1210 if( cnt==1 ){
1211 @ %z(href("%R/whatis/%s",zUuid))[more...]</a>
1212 }
1213 cnt++;
1214 continue;
1215 }
1216 if( !sameFilename ){
@@ -1249,14 +1249,14 @@
1249 @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a>
1250 }
1251 @ &mdash; %!w(zCom) (user:
1252 hyperlink_to_user(zUser,zDate,")");
1253 if( g.perm.Hyperlink ){
1254 @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a>
1255 @ %z(href("%R/annotate?filename=%T&checkin=%s",zName,zVers))
1256 @ [annotate]</a>
1257 @ %z(href("%R/blame?filename=%T&checkin=%s",zName,zVers))
1258 @ [blame]</a>
1259 }
1260 cnt++;
1261 if( pDownloadName && blob_size(pDownloadName)==0 ){
1262 blob_append(pDownloadName, zName, -1);
@@ -1364,11 +1364,11 @@
1364 @ Attachment "%h(zFilename)" to
1365 }
1366 objType |= OBJTYPE_ATTACHMENT;
1367 if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
1368 if( g.perm.Hyperlink && g.perm.RdTkt ){
1369 @ ticket [%z(href("%R/tktview?name=%s",zTarget))%S(zTarget)</a>]
1370 }else{
1371 @ ticket [%S(zTarget)]
1372 }
1373 }else{
1374 if( g.perm.Hyperlink && g.perm.RdWiki ){
@@ -1472,17 +1472,17 @@
1472 g.zTop, P("v1"), P("v2"), zW);
1473 }
1474
1475 if( P("smhdr")!=0 ){
1476 @ <h2>Differences From Artifact
1477 @ %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a> To
1478 @ %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>.</h2>
1479 }else{
1480 @ <h2>Differences From
1481 @ Artifact %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a>:</h2>
1482 object_description(v1, objdescFlags, 0);
1483 @ <h2>To Artifact %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>:</h2>
1484 object_description(v2, objdescFlags, 0);
1485 }
1486 if( pRe ){
1487 @ <b>Only differences that match regular expression "%h(zRe)"
1488 @ are shown.</b>
@@ -1959,11 +1959,11 @@
1959 }
1960
1961 @ <div class="section">Overview</div>
1962 @ <p><table class="label-value">
1963 @ <tr><th>Artifact&nbsp;ID:</th>
1964 @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a>
1965 if( g.perm.Setup ){
1966 @ (%d(rid))
1967 }
1968 modPending = moderation_pending(rid);
1969 if( modPending ){
@@ -2478,11 +2478,11 @@
2478 @ </blockquote>
2479 @ <hr />
2480 blob_reset(&suffix);
2481 }
2482 @ <p>Make changes to attributes of check-in
2483 @ [%z(href("%R/ci/%s",zUuid))%s(zUuid)</a>]:</p>
2484 form_begin(0, "%R/ci_edit");
2485 login_insert_csrf_secret();
2486 @ <div><input type="hidden" name="r" value="%s(zUuid)" />
2487 @ <table border="0" cellspacing="10">
2488
2489
--- src/info.c
+++ src/info.c
@@ -403,32 +403,32 @@
403 }
404 }else{
405 if( zOld && zNew ){
406 if( fossil_strcmp(zOld, zNew)!=0 ){
407 @ <p>Modified %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
408 @ from %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>
409 @ to %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>.
410 }else if( zOldName!=0 && fossil_strcmp(zName,zOldName)!=0 ){
411 @ <p>Name change
412 @ from %z(href("%R/finfo?name=%T",zOldName))%h(zOldName)</a>
413 @ to %z(href("%R/finfo?name=%T",zName))%h(zName)</a>.
414 }else{
415 @ <p>Execute permission %s(( mperm==PERM_EXE )?"set":"cleared") for
416 @ %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
417 }
418 }else if( zOld ){
419 @ <p>Deleted %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
420 @ version %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>
421 }else{
422 @ <p>Added %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
423 @ version %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>
424 }
425 if( diffFlags ){
426 append_diff(zOld, zNew, diffFlags, pRe);
427 }else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){
428 @ &nbsp;&nbsp;
429 @ %z(href("%R/fdiff?v1=%!S&v2=%!S&sbs=1",zOld,zNew))[diff]</a>
430 }
431 }
432 }
433
434 /*
@@ -635,19 +635,19 @@
635 if( (zPJ[jj]>0 && zPJ[jj]<' ') || strchr("\"*/:<>?\\|", zPJ[jj]) ){
636 zPJ[jj] = '_';
637 }
638 }
639 @ <tr><th>Timelines:</th><td>
640 @ %z(href("%R/timeline?f=%!S&unhide",zUuid))family</a>
641 if( zParent ){
642 @ | %z(href("%R/timeline?p=%!S&unhide",zUuid))ancestors</a>
643 }
644 if( !isLeaf ){
645 @ | %z(href("%R/timeline?d=%!S&unhide",zUuid))descendants</a>
646 }
647 if( zParent && !isLeaf ){
648 @ | %z(href("%R/timeline?dp=%!S&unhide",zUuid))both</a>
649 }
650 db_prepare(&q2,"SELECT substr(tag.tagname,5) FROM tagxref, tag "
651 " WHERE rid=%d AND tagtype>0 "
652 " AND tag.tagid=tagxref.tagid "
653 " AND +tag.tagname GLOB 'sym-*'", rid);
@@ -663,23 +663,23 @@
663 char *zUrl = mprintf("%R/tarball/%t-%S.tar.gz?uuid=%s",
664 zPJ, zUuid, zUuid);
665 @ </td></tr>
666 @ <tr><th>Downloads:</th><td>
667 @ %z(href("%s",zUrl))Tarball</a>
668 @ | %z(href("%R/zip/%t-%S.zip?uuid=%!S",zPJ,zUuid,zUuid))
669 @ ZIP archive</a>
670 fossil_free(zUrl);
671 }
672 @ </td></tr>
673 @ <tr><th>Other&nbsp;Links:</th>
674 @ <td>
675 @ %z(href("%R/tree?ci=%!S",zUuid))files</a>
676 @ | %z(href("%R/fileage?name=%!S",zUuid))file ages</a>
677 @ | %z(href("%R/tree?nofiles&type=tree&ci=%!S",zUuid))folders</a>
678 @ | %z(href("%R/artifact/%!S",zUuid))manifest</a>
679 if( g.perm.Write ){
680 @ | %z(href("%R/ci_edit?r=%!S",zUuid))edit</a>
681 }
682 @ </td>
683 @ </tr>
684 blob_reset(&projName);
685 }
@@ -723,11 +723,11 @@
723 @ Show&nbsp;Unified&nbsp;Diffs</a>
724 @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName))
725 @ Show&nbsp;Side-by-Side&nbsp;Diffs</a>
726 }
727 if( zParent ){
728 @ %z(xhref("class='button'","%R/vpatch?from=%!S&to=%!S",zParent,zUuid))
729 @ Patch</a>
730 }
731 @</div>
732 if( pRe ){
733 @ <p><b>Only differences that match regular expression "%h(zRe)"
@@ -813,11 +813,11 @@
813 pWiki->zWikiTitle);
814 login_anonymous_available();
815 @ <div class="section">Overview</div>
816 @ <p><table class="label-value">
817 @ <tr><th>Artifact&nbsp;ID:</th>
818 @ <td>%z(href("%R/artifact/%!S",zUuid))%s(zUuid)</a>
819 if( g.perm.Setup ){
820 @ (%d(rid))
821 }
822 modPending = moderation_pending(rid);
823 if( modPending ){
@@ -832,11 +832,11 @@
832 if( pWiki->nParent>0 ){
833 int i;
834 @ <tr><th>Parent%s(pWiki->nParent==1?"":"s"):</th><td>
835 for(i=0; i<pWiki->nParent; i++){
836 char *zParent = pWiki->azParent[i];
837 @ %z(href("info/%!S",zParent))%s(zParent)</a>
838 }
839 @ </td></tr>
840 }
841 @ </table>
842
@@ -1206,11 +1206,11 @@
1206 int mPerm = db_column_int(&q, 5);
1207 const char *zBr = db_column_text(&q, 6);
1208 int sameFilename = prevName!=0 && fossil_strcmp(zName,prevName)==0;
1209 if( sameFilename && !showDetail ){
1210 if( cnt==1 ){
1211 @ %z(href("%R/whatis/%!S",zUuid))[more...]</a>
1212 }
1213 cnt++;
1214 continue;
1215 }
1216 if( !sameFilename ){
@@ -1249,14 +1249,14 @@
1249 @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a>
1250 }
1251 @ &mdash; %!w(zCom) (user:
1252 hyperlink_to_user(zUser,zDate,")");
1253 if( g.perm.Hyperlink ){
1254 @ %z(href("%R/finfo?name=%T&ci=%!S",zName,zVers))[ancestry]</a>
1255 @ %z(href("%R/annotate?filename=%T&checkin=%!S",zName,zVers))
1256 @ [annotate]</a>
1257 @ %z(href("%R/blame?filename=%T&checkin=%!S",zName,zVers))
1258 @ [blame]</a>
1259 }
1260 cnt++;
1261 if( pDownloadName && blob_size(pDownloadName)==0 ){
1262 blob_append(pDownloadName, zName, -1);
@@ -1364,11 +1364,11 @@
1364 @ Attachment "%h(zFilename)" to
1365 }
1366 objType |= OBJTYPE_ATTACHMENT;
1367 if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){
1368 if( g.perm.Hyperlink && g.perm.RdTkt ){
1369 @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>]
1370 }else{
1371 @ ticket [%S(zTarget)]
1372 }
1373 }else{
1374 if( g.perm.Hyperlink && g.perm.RdWiki ){
@@ -1472,17 +1472,17 @@
1472 g.zTop, P("v1"), P("v2"), zW);
1473 }
1474
1475 if( P("smhdr")!=0 ){
1476 @ <h2>Differences From Artifact
1477 @ %z(href("%R/artifact/%!S",zV1))[%S(zV1)]</a> To
1478 @ %z(href("%R/artifact/%!S",zV2))[%S(zV2)]</a>.</h2>
1479 }else{
1480 @ <h2>Differences From
1481 @ Artifact %z(href("%R/artifact/%!S",zV1))[%S(zV1)]</a>:</h2>
1482 object_description(v1, objdescFlags, 0);
1483 @ <h2>To Artifact %z(href("%R/artifact/%!S",zV2))[%S(zV2)]</a>:</h2>
1484 object_description(v2, objdescFlags, 0);
1485 }
1486 if( pRe ){
1487 @ <b>Only differences that match regular expression "%h(zRe)"
1488 @ are shown.</b>
@@ -1959,11 +1959,11 @@
1959 }
1960
1961 @ <div class="section">Overview</div>
1962 @ <p><table class="label-value">
1963 @ <tr><th>Artifact&nbsp;ID:</th>
1964 @ <td>%z(href("%R/artifact/%!S",zUuid))%s(zUuid)</a>
1965 if( g.perm.Setup ){
1966 @ (%d(rid))
1967 }
1968 modPending = moderation_pending(rid);
1969 if( modPending ){
@@ -2478,11 +2478,11 @@
2478 @ </blockquote>
2479 @ <hr />
2480 blob_reset(&suffix);
2481 }
2482 @ <p>Make changes to attributes of check-in
2483 @ [%z(href("%R/ci/%!S",zUuid))%s(zUuid)</a>]:</p>
2484 form_begin(0, "%R/ci_edit");
2485 login_insert_csrf_secret();
2486 @ <div><input type="hidden" name="r" value="%s(zUuid)" />
2487 @ <table border="0" cellspacing="10">
2488
2489
+2 -2
--- src/login.c
+++ src/login.c
@@ -636,11 +636,11 @@
636636
@ "Login" button. Your user name will be stored in a browser cookie.
637637
@ You must configure your web browser to accept cookies in order for
638638
@ the login to take.</p>
639639
if( db_get_boolean("self-register", 0) ){
640640
@ <p>If you do not have an account, you can
641
- @ <a href="%s(g.zTop)/register?g=%T(P("G"))">create one</a>.
641
+ @ <a href="%R/register?g=%T(P("G"))">create one</a>.
642642
}
643643
if( zAnonPw ){
644644
unsigned int uSeed = captcha_seed();
645645
const char *zDecoded = captcha_decode(uSeed);
646646
int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
@@ -1225,11 +1225,11 @@
12251225
db_exists("SELECT 1 FROM user"
12261226
" WHERE login='anonymous'"
12271227
" AND cap LIKE '%%h%%'") ){
12281228
const char *zUrl = PD("REQUEST_URI", "index");
12291229
@ <p>Many <span class="disabled">hyperlinks are disabled.</span><br />
1230
- @ Use <a href="%s(g.zTop)/login?anon=1&amp;g=%T(zUrl)">anonymous login</a>
1230
+ @ Use <a href="%R/login?anon=1&amp;g=%T(zUrl)">anonymous login</a>
12311231
@ to enable hyperlinks.</p>
12321232
}
12331233
}
12341234
12351235
/*
12361236
--- src/login.c
+++ src/login.c
@@ -636,11 +636,11 @@
636 @ "Login" button. Your user name will be stored in a browser cookie.
637 @ You must configure your web browser to accept cookies in order for
638 @ the login to take.</p>
639 if( db_get_boolean("self-register", 0) ){
640 @ <p>If you do not have an account, you can
641 @ <a href="%s(g.zTop)/register?g=%T(P("G"))">create one</a>.
642 }
643 if( zAnonPw ){
644 unsigned int uSeed = captcha_seed();
645 const char *zDecoded = captcha_decode(uSeed);
646 int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
@@ -1225,11 +1225,11 @@
1225 db_exists("SELECT 1 FROM user"
1226 " WHERE login='anonymous'"
1227 " AND cap LIKE '%%h%%'") ){
1228 const char *zUrl = PD("REQUEST_URI", "index");
1229 @ <p>Many <span class="disabled">hyperlinks are disabled.</span><br />
1230 @ Use <a href="%s(g.zTop)/login?anon=1&amp;g=%T(zUrl)">anonymous login</a>
1231 @ to enable hyperlinks.</p>
1232 }
1233 }
1234
1235 /*
1236
--- src/login.c
+++ src/login.c
@@ -636,11 +636,11 @@
636 @ "Login" button. Your user name will be stored in a browser cookie.
637 @ You must configure your web browser to accept cookies in order for
638 @ the login to take.</p>
639 if( db_get_boolean("self-register", 0) ){
640 @ <p>If you do not have an account, you can
641 @ <a href="%R/register?g=%T(P("G"))">create one</a>.
642 }
643 if( zAnonPw ){
644 unsigned int uSeed = captcha_seed();
645 const char *zDecoded = captcha_decode(uSeed);
646 int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
@@ -1225,11 +1225,11 @@
1225 db_exists("SELECT 1 FROM user"
1226 " WHERE login='anonymous'"
1227 " AND cap LIKE '%%h%%'") ){
1228 const char *zUrl = PD("REQUEST_URI", "index");
1229 @ <p>Many <span class="disabled">hyperlinks are disabled.</span><br />
1230 @ Use <a href="%R/login?anon=1&amp;g=%T(zUrl)">anonymous login</a>
1231 @ to enable hyperlinks.</p>
1232 }
1233 }
1234
1235 /*
1236
+3 -3
--- src/main.c
+++ src/main.c
@@ -1173,11 +1173,11 @@
11731173
const char *z = aCommand[i].zName;
11741174
if( '/'==*z || strncmp(z,"test",4)==0 ) continue;
11751175
if( j==0 ){
11761176
@ <td valign="top"><ul>
11771177
}
1178
- @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li>
1178
+ @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
11791179
j++;
11801180
if( j>=n ){
11811181
@ </ul></td>
11821182
j = 0;
11831183
}
@@ -1201,11 +1201,11 @@
12011201
if( '/'!=*z ) continue;
12021202
if( j==0 ){
12031203
@ <td valign="top"><ul>
12041204
}
12051205
if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1206
- @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z+1)</a></li>
1206
+ @ <li><a href="%R/help?cmd=%s(z)">%s(z+1)</a></li>
12071207
}else{
12081208
@ <li>%s(z+1)</li>
12091209
}
12101210
j++;
12111211
if( j>=n ){
@@ -1231,11 +1231,11 @@
12311231
if( strncmp(z,"test",4)!=0 ) continue;
12321232
if( j==0 ){
12331233
@ <td valign="top"><ul>
12341234
}
12351235
if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1236
- @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li>
1236
+ @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
12371237
}else{
12381238
@ <li>%s(z)</li>
12391239
}
12401240
j++;
12411241
if( j>=n ){
12421242
--- src/main.c
+++ src/main.c
@@ -1173,11 +1173,11 @@
1173 const char *z = aCommand[i].zName;
1174 if( '/'==*z || strncmp(z,"test",4)==0 ) continue;
1175 if( j==0 ){
1176 @ <td valign="top"><ul>
1177 }
1178 @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li>
1179 j++;
1180 if( j>=n ){
1181 @ </ul></td>
1182 j = 0;
1183 }
@@ -1201,11 +1201,11 @@
1201 if( '/'!=*z ) continue;
1202 if( j==0 ){
1203 @ <td valign="top"><ul>
1204 }
1205 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1206 @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z+1)</a></li>
1207 }else{
1208 @ <li>%s(z+1)</li>
1209 }
1210 j++;
1211 if( j>=n ){
@@ -1231,11 +1231,11 @@
1231 if( strncmp(z,"test",4)!=0 ) continue;
1232 if( j==0 ){
1233 @ <td valign="top"><ul>
1234 }
1235 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1236 @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li>
1237 }else{
1238 @ <li>%s(z)</li>
1239 }
1240 j++;
1241 if( j>=n ){
1242
--- src/main.c
+++ src/main.c
@@ -1173,11 +1173,11 @@
1173 const char *z = aCommand[i].zName;
1174 if( '/'==*z || strncmp(z,"test",4)==0 ) continue;
1175 if( j==0 ){
1176 @ <td valign="top"><ul>
1177 }
1178 @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
1179 j++;
1180 if( j>=n ){
1181 @ </ul></td>
1182 j = 0;
1183 }
@@ -1201,11 +1201,11 @@
1201 if( '/'!=*z ) continue;
1202 if( j==0 ){
1203 @ <td valign="top"><ul>
1204 }
1205 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1206 @ <li><a href="%R/help?cmd=%s(z)">%s(z+1)</a></li>
1207 }else{
1208 @ <li>%s(z+1)</li>
1209 }
1210 j++;
1211 if( j>=n ){
@@ -1231,11 +1231,11 @@
1231 if( strncmp(z,"test",4)!=0 ) continue;
1232 if( j==0 ){
1233 @ <td valign="top"><ul>
1234 }
1235 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1236 @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
1237 }else{
1238 @ <li>%s(z)</li>
1239 }
1240 j++;
1241 if( j>=n ){
1242
+4 -4
--- src/name.c
+++ src/name.c
@@ -444,11 +444,11 @@
444444
canonical16(z, strlen(z));
445445
db_prepare(&q, "SELECT uuid, rid FROM blob WHERE uuid GLOB '%q*'", z);
446446
while( db_step(&q)==SQLITE_ROW ){
447447
const char *zUuid = db_column_text(&q, 0);
448448
int rid = db_column_int(&q, 1);
449
- @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)">
449
+ @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)">
450450
@ %s(zUuid)</a> -
451451
object_description(rid, 0, 0);
452452
@ </p></li>
453453
}
454454
db_finalize(&q);
@@ -461,11 +461,11 @@
461461
" ORDER BY tkt_ctime DESC", z);
462462
while( db_step(&q)==SQLITE_ROW ){
463463
int rid = db_column_int(&q, 0);
464464
const char *zUuid = db_column_text(&q, 1);
465465
const char *zTitle = db_column_text(&q, 2);
466
- @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)">
466
+ @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)">
467467
@ %s(zUuid)</a> -
468468
@ <ul></ul>
469469
@ Ticket
470470
hyperlink_to_uuid(zUuid);
471471
@ - %s(zTitle).
@@ -481,11 +481,11 @@
481481
" FROM tagxref, tag WHERE tagxref.tagid = tag.tagid"
482482
" AND tagname GLOB 'event-%q*') GROUP BY uuid", z);
483483
while( db_step(&q)==SQLITE_ROW ){
484484
int rid = db_column_int(&q, 0);
485485
const char* zUuid = db_column_text(&q, 1);
486
- @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)">
486
+ @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)">
487487
@ %s(zUuid)</a> -
488488
@ <ul><li>
489489
object_description(rid, 0, 0);
490490
@ </li></ul>
491491
@ </p></li>
@@ -1011,11 +1011,11 @@
10111011
int rid = db_column_int(&q,0);
10121012
const char *zUuid = db_column_text(&q, 1);
10131013
const char *zDesc = db_column_text(&q, 2);
10141014
int isPriv = db_column_int(&q,2);
10151015
@ <tr><td align="right">%d(rid)</td>
1016
- @ <td>&nbsp;%z(href("%R/info/%s",zUuid))%s(zUuid)</a>&nbsp;</td>
1016
+ @ <td>&nbsp;%z(href("%R/info/%!S",zUuid))%s(zUuid)</a>&nbsp;</td>
10171017
@ <td align="left">%h(zDesc)</td>
10181018
if( isPriv ){
10191019
@ <td>(unpublished)</td>
10201020
}
10211021
@ </tr>
10221022
--- src/name.c
+++ src/name.c
@@ -444,11 +444,11 @@
444 canonical16(z, strlen(z));
445 db_prepare(&q, "SELECT uuid, rid FROM blob WHERE uuid GLOB '%q*'", z);
446 while( db_step(&q)==SQLITE_ROW ){
447 const char *zUuid = db_column_text(&q, 0);
448 int rid = db_column_int(&q, 1);
449 @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)">
450 @ %s(zUuid)</a> -
451 object_description(rid, 0, 0);
452 @ </p></li>
453 }
454 db_finalize(&q);
@@ -461,11 +461,11 @@
461 " ORDER BY tkt_ctime DESC", z);
462 while( db_step(&q)==SQLITE_ROW ){
463 int rid = db_column_int(&q, 0);
464 const char *zUuid = db_column_text(&q, 1);
465 const char *zTitle = db_column_text(&q, 2);
466 @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)">
467 @ %s(zUuid)</a> -
468 @ <ul></ul>
469 @ Ticket
470 hyperlink_to_uuid(zUuid);
471 @ - %s(zTitle).
@@ -481,11 +481,11 @@
481 " FROM tagxref, tag WHERE tagxref.tagid = tag.tagid"
482 " AND tagname GLOB 'event-%q*') GROUP BY uuid", z);
483 while( db_step(&q)==SQLITE_ROW ){
484 int rid = db_column_int(&q, 0);
485 const char* zUuid = db_column_text(&q, 1);
486 @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)">
487 @ %s(zUuid)</a> -
488 @ <ul><li>
489 object_description(rid, 0, 0);
490 @ </li></ul>
491 @ </p></li>
@@ -1011,11 +1011,11 @@
1011 int rid = db_column_int(&q,0);
1012 const char *zUuid = db_column_text(&q, 1);
1013 const char *zDesc = db_column_text(&q, 2);
1014 int isPriv = db_column_int(&q,2);
1015 @ <tr><td align="right">%d(rid)</td>
1016 @ <td>&nbsp;%z(href("%R/info/%s",zUuid))%s(zUuid)</a>&nbsp;</td>
1017 @ <td align="left">%h(zDesc)</td>
1018 if( isPriv ){
1019 @ <td>(unpublished)</td>
1020 }
1021 @ </tr>
1022
--- src/name.c
+++ src/name.c
@@ -444,11 +444,11 @@
444 canonical16(z, strlen(z));
445 db_prepare(&q, "SELECT uuid, rid FROM blob WHERE uuid GLOB '%q*'", z);
446 while( db_step(&q)==SQLITE_ROW ){
447 const char *zUuid = db_column_text(&q, 0);
448 int rid = db_column_int(&q, 1);
449 @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)">
450 @ %s(zUuid)</a> -
451 object_description(rid, 0, 0);
452 @ </p></li>
453 }
454 db_finalize(&q);
@@ -461,11 +461,11 @@
461 " ORDER BY tkt_ctime DESC", z);
462 while( db_step(&q)==SQLITE_ROW ){
463 int rid = db_column_int(&q, 0);
464 const char *zUuid = db_column_text(&q, 1);
465 const char *zTitle = db_column_text(&q, 2);
466 @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)">
467 @ %s(zUuid)</a> -
468 @ <ul></ul>
469 @ Ticket
470 hyperlink_to_uuid(zUuid);
471 @ - %s(zTitle).
@@ -481,11 +481,11 @@
481 " FROM tagxref, tag WHERE tagxref.tagid = tag.tagid"
482 " AND tagname GLOB 'event-%q*') GROUP BY uuid", z);
483 while( db_step(&q)==SQLITE_ROW ){
484 int rid = db_column_int(&q, 0);
485 const char* zUuid = db_column_text(&q, 1);
486 @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)">
487 @ %s(zUuid)</a> -
488 @ <ul><li>
489 object_description(rid, 0, 0);
490 @ </li></ul>
491 @ </p></li>
@@ -1011,11 +1011,11 @@
1011 int rid = db_column_int(&q,0);
1012 const char *zUuid = db_column_text(&q, 1);
1013 const char *zDesc = db_column_text(&q, 2);
1014 int isPriv = db_column_int(&q,2);
1015 @ <tr><td align="right">%d(rid)</td>
1016 @ <td>&nbsp;%z(href("%R/info/%!S",zUuid))%s(zUuid)</a>&nbsp;</td>
1017 @ <td align="left">%h(zDesc)</td>
1018 if( isPriv ){
1019 @ <td>(unpublished)</td>
1020 }
1021 @ </tr>
1022
+1 -1
--- src/path.c
+++ src/path.c
@@ -561,11 +561,11 @@
561561
const char *zUuid = db_column_text(&q, 3);
562562
@ <tr>
563563
@ <td>%z(href("%R/timeline?c=%t",zDate))%s(zDate)</a></td>
564564
@ <td>%z(href("%R/finfo?name=%t",zOld))%h(zOld)</a></td>
565565
@ <td>%z(href("%R/finfo?name=%t",zNew))%h(zNew)</a></td>
566
- @ <td>%z(href("%R/info/%s",zUuid))%S(zUuid)</a></td></tr>
566
+ @ <td>%z(href("%R/info/%!S",zUuid))%S(zUuid)</a></td></tr>
567567
}
568568
@ </table>
569569
db_finalize(&q);
570570
style_footer();
571571
}
572572
--- src/path.c
+++ src/path.c
@@ -561,11 +561,11 @@
561 const char *zUuid = db_column_text(&q, 3);
562 @ <tr>
563 @ <td>%z(href("%R/timeline?c=%t",zDate))%s(zDate)</a></td>
564 @ <td>%z(href("%R/finfo?name=%t",zOld))%h(zOld)</a></td>
565 @ <td>%z(href("%R/finfo?name=%t",zNew))%h(zNew)</a></td>
566 @ <td>%z(href("%R/info/%s",zUuid))%S(zUuid)</a></td></tr>
567 }
568 @ </table>
569 db_finalize(&q);
570 style_footer();
571 }
572
--- src/path.c
+++ src/path.c
@@ -561,11 +561,11 @@
561 const char *zUuid = db_column_text(&q, 3);
562 @ <tr>
563 @ <td>%z(href("%R/timeline?c=%t",zDate))%s(zDate)</a></td>
564 @ <td>%z(href("%R/finfo?name=%t",zOld))%h(zOld)</a></td>
565 @ <td>%z(href("%R/finfo?name=%t",zNew))%h(zNew)</a></td>
566 @ <td>%z(href("%R/info/%!S",zUuid))%S(zUuid)</a></td></tr>
567 }
568 @ </table>
569 db_finalize(&q);
570 style_footer();
571 }
572
+16 -6
--- src/printf.c
+++ src/printf.c
@@ -24,10 +24,24 @@
2424
# include <io.h>
2525
# include <fcntl.h>
2626
#endif
2727
#include <time.h>
2828
29
+/* Two custom conversions are used to show a prefix of SHA1 hashes:
30
+**
31
+** %!S Prefix of a length appropriate for URLs
32
+** %S Prefix of a length appropriate for human display
33
+**
34
+** The following macros determine those lengths.
35
+*/
36
+#ifndef FOSSIL_SHA1_PREFIX_LEN
37
+# define FOSSIL_SHA1_PREFIX_LEN 10 /* For %S (human display) */
38
+#endif
39
+#ifndef FOSSIL_SHA1_URLPREFIX_LEN
40
+# define FOSSIL_SHA1_URLPREFIX_LEN 16 /* For %!S (embedded in URLs) */
41
+#endif
42
+
2943
/*
3044
** Conversion types fall into various categories as defined by the
3145
** following enumeration.
3246
*/
3347
#define etRADIX 1 /* Integer types. %d, %x, %o, and so forth */
@@ -620,16 +634,12 @@
620634
if( bufpt==0 ){
621635
bufpt = "";
622636
}else if( xtype==etDYNSTRING ){
623637
zExtra = bufpt;
624638
}else if( xtype==etSTRINGID ){
625
- precision = 0;
626
- while( bufpt[precision]>='0' && bufpt[precision]<='9' ){
627
- precision++;
628
- }
629
- if( bufpt[precision]!=0 ) precision++;
630
- if( precision<10 ) precision=10;
639
+ precision = flag_altform2 ? FOSSIL_SHA1_URLPREFIX_LEN :
640
+ FOSSIL_SHA1_PREFIX_LEN;
631641
}
632642
length = StrNLen32(bufpt, limit);
633643
if( precision>=0 && precision<length ) length = precision;
634644
break;
635645
}
636646
--- src/printf.c
+++ src/printf.c
@@ -24,10 +24,24 @@
24 # include <io.h>
25 # include <fcntl.h>
26 #endif
27 #include <time.h>
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29 /*
30 ** Conversion types fall into various categories as defined by the
31 ** following enumeration.
32 */
33 #define etRADIX 1 /* Integer types. %d, %x, %o, and so forth */
@@ -620,16 +634,12 @@
620 if( bufpt==0 ){
621 bufpt = "";
622 }else if( xtype==etDYNSTRING ){
623 zExtra = bufpt;
624 }else if( xtype==etSTRINGID ){
625 precision = 0;
626 while( bufpt[precision]>='0' && bufpt[precision]<='9' ){
627 precision++;
628 }
629 if( bufpt[precision]!=0 ) precision++;
630 if( precision<10 ) precision=10;
631 }
632 length = StrNLen32(bufpt, limit);
633 if( precision>=0 && precision<length ) length = precision;
634 break;
635 }
636
--- src/printf.c
+++ src/printf.c
@@ -24,10 +24,24 @@
24 # include <io.h>
25 # include <fcntl.h>
26 #endif
27 #include <time.h>
28
29 /* Two custom conversions are used to show a prefix of SHA1 hashes:
30 **
31 ** %!S Prefix of a length appropriate for URLs
32 ** %S Prefix of a length appropriate for human display
33 **
34 ** The following macros determine those lengths.
35 */
36 #ifndef FOSSIL_SHA1_PREFIX_LEN
37 # define FOSSIL_SHA1_PREFIX_LEN 10 /* For %S (human display) */
38 #endif
39 #ifndef FOSSIL_SHA1_URLPREFIX_LEN
40 # define FOSSIL_SHA1_URLPREFIX_LEN 16 /* For %!S (embedded in URLs) */
41 #endif
42
43 /*
44 ** Conversion types fall into various categories as defined by the
45 ** following enumeration.
46 */
47 #define etRADIX 1 /* Integer types. %d, %x, %o, and so forth */
@@ -620,16 +634,12 @@
634 if( bufpt==0 ){
635 bufpt = "";
636 }else if( xtype==etDYNSTRING ){
637 zExtra = bufpt;
638 }else if( xtype==etSTRINGID ){
639 precision = flag_altform2 ? FOSSIL_SHA1_URLPREFIX_LEN :
640 FOSSIL_SHA1_PREFIX_LEN;
 
 
 
 
641 }
642 length = StrNLen32(bufpt, limit);
643 if( precision>=0 && precision<length ) length = precision;
644 break;
645 }
646
+6 -6
--- src/setup.c
+++ src/setup.c
@@ -1018,25 +1018,25 @@
10181018
@ <hr />
10191019
onoff_attribute("Require password for local access",
10201020
"localauth", "localauth", 0, 0);
10211021
@ <p>When enabled, the password sign-in is always required for
10221022
@ web access. When disabled, unrestricted web access from 127.0.0.1
1023
- @ is allowed for the <a href="%s(g.zTop)/help/ui">fossil ui</a> command or
1024
- @ from the <a href="%s(g.zTop)/help/server">fossil server</a>,
1025
- @ <a href="%s(g.zTop)/help/http">fossil http</a> commands when the
1023
+ @ is allowed for the <a href="%R/help/ui">fossil ui</a> command or
1024
+ @ from the <a href="%R/help/server">fossil server</a>,
1025
+ @ <a href="%R/help/http">fossil http</a> commands when the
10261026
@ "--localauth" command line options is used, or from the
1027
- @ <a href="%s(g.zTop)/help/cgi">fossil cgi</a> if a line containing
1027
+ @ <a href="%R/help/cgi">fossil cgi</a> if a line containing
10281028
@ the word "localauth" appears in the CGI script.
10291029
@
10301030
@ <p>A password is always required if any one or more
10311031
@ of the following are true:
10321032
@ <ol>
10331033
@ <li> This button is checked
10341034
@ <li> The inbound TCP/IP connection is not from 127.0.0.1
10351035
@ <li> The server is started using either of the
1036
- @ <a href="%s(g.zTop)/help/server">fossil server</a> or
1037
- @ <a href="%s(g.zTop)/help/server">fossil http</a> commands
1036
+ @ <a href="%R/help/server">fossil server</a> or
1037
+ @ <a href="%R/help/server">fossil http</a> commands
10381038
@ without the "--localauth" option.
10391039
@ <li> The server is started from CGI without the "localauth" keyword
10401040
@ in the CGI script.
10411041
@ </ol>
10421042
@
10431043
--- src/setup.c
+++ src/setup.c
@@ -1018,25 +1018,25 @@
1018 @ <hr />
1019 onoff_attribute("Require password for local access",
1020 "localauth", "localauth", 0, 0);
1021 @ <p>When enabled, the password sign-in is always required for
1022 @ web access. When disabled, unrestricted web access from 127.0.0.1
1023 @ is allowed for the <a href="%s(g.zTop)/help/ui">fossil ui</a> command or
1024 @ from the <a href="%s(g.zTop)/help/server">fossil server</a>,
1025 @ <a href="%s(g.zTop)/help/http">fossil http</a> commands when the
1026 @ "--localauth" command line options is used, or from the
1027 @ <a href="%s(g.zTop)/help/cgi">fossil cgi</a> if a line containing
1028 @ the word "localauth" appears in the CGI script.
1029 @
1030 @ <p>A password is always required if any one or more
1031 @ of the following are true:
1032 @ <ol>
1033 @ <li> This button is checked
1034 @ <li> The inbound TCP/IP connection is not from 127.0.0.1
1035 @ <li> The server is started using either of the
1036 @ <a href="%s(g.zTop)/help/server">fossil server</a> or
1037 @ <a href="%s(g.zTop)/help/server">fossil http</a> commands
1038 @ without the "--localauth" option.
1039 @ <li> The server is started from CGI without the "localauth" keyword
1040 @ in the CGI script.
1041 @ </ol>
1042 @
1043
--- src/setup.c
+++ src/setup.c
@@ -1018,25 +1018,25 @@
1018 @ <hr />
1019 onoff_attribute("Require password for local access",
1020 "localauth", "localauth", 0, 0);
1021 @ <p>When enabled, the password sign-in is always required for
1022 @ web access. When disabled, unrestricted web access from 127.0.0.1
1023 @ is allowed for the <a href="%R/help/ui">fossil ui</a> command or
1024 @ from the <a href="%R/help/server">fossil server</a>,
1025 @ <a href="%R/help/http">fossil http</a> commands when the
1026 @ "--localauth" command line options is used, or from the
1027 @ <a href="%R/help/cgi">fossil cgi</a> if a line containing
1028 @ the word "localauth" appears in the CGI script.
1029 @
1030 @ <p>A password is always required if any one or more
1031 @ of the following are true:
1032 @ <ol>
1033 @ <li> This button is checked
1034 @ <li> The inbound TCP/IP connection is not from 127.0.0.1
1035 @ <li> The server is started using either of the
1036 @ <a href="%R/help/server">fossil server</a> or
1037 @ <a href="%R/help/server">fossil http</a> commands
1038 @ without the "--localauth" option.
1039 @ <li> The server is started from CGI without the "localauth" keyword
1040 @ in the CGI script.
1041 @ </ol>
1042 @
1043
+4 -4
--- src/shun.c
+++ src/shun.c
@@ -108,11 +108,11 @@
108108
p += UUID_SIZE+1;
109109
}
110110
if( allExist ){
111111
@ <p class="noMoreShun">Artifact(s)<br />
112112
for( p = zUuid ; *p ; p += UUID_SIZE+1 ){
113
- @ <a href="%s(g.zTop)/artifact/%s(p)">%s(p)</a><br />
113
+ @ <a href="%R/artifact/%s(p)">%s(p)</a><br />
114114
}
115115
@ are no longer being shunned.</p>
116116
}else{
117117
@ <p class="noMoreShun">Artifact(s)<br />
118118
for( p = zUuid ; *p ; p += UUID_SIZE+1 ){
@@ -146,11 +146,11 @@
146146
admin_log("Shunned %Q", p);
147147
p += UUID_SIZE+1;
148148
}
149149
@ <p class="shunned">Artifact(s)<br />
150150
for( p = zUuid ; *p ; p += UUID_SIZE+1 ){
151
- @ <a href="%s(g.zTop)/artifact/%s(p)">%s(p)</a><br />
151
+ @ <a href="%R/artifact/%s(p)">%s(p)</a><br />
152152
}
153153
@ have been shunned. They will no longer be pushed.
154154
@ They will be removed from the repository the next time the repository
155155
@ is rebuilt using the <b>fossil rebuild</b> command-line</p>
156156
}
@@ -248,11 +248,11 @@
248248
while( db_step(&q)==SQLITE_ROW ){
249249
const char *zUuid = db_column_text(&q, 0);
250250
int stillExists = db_column_int(&q, 1);
251251
cnt++;
252252
if( stillExists ){
253
- @ <b><a href="%s(g.zTop)/artifact/%s(zUuid)">%s(zUuid)</a></b><br />
253
+ @ <b><a href="%R/artifact/%s(zUuid)">%s(zUuid)</a></b><br />
254254
}else{
255255
@ <b>%s(zUuid)</b><br />
256256
}
257257
}
258258
if( cnt==0 ){
@@ -436,13 +436,13 @@
436436
while( db_step(&q)==SQLITE_ROW ){
437437
const char *zUuid = db_column_text(&q, 1);
438438
int size = db_column_int(&q, 2);
439439
const char *zDesc = db_column_text(&q, 3);
440440
if( zDesc==0 ) zDesc = "";
441
- @ <a href="%s(g.zTop)/info/%s(zUuid)">%s(zUuid)</a>
441
+ @ <a href="%R/info/%s(zUuid)">%s(zUuid)</a>
442442
@ %h(zDesc) (size: %d(size))<br />
443443
}
444444
@ </td></tr>
445445
@ </table>
446446
db_finalize(&q);
447447
style_footer();
448448
}
449449
--- src/shun.c
+++ src/shun.c
@@ -108,11 +108,11 @@
108 p += UUID_SIZE+1;
109 }
110 if( allExist ){
111 @ <p class="noMoreShun">Artifact(s)<br />
112 for( p = zUuid ; *p ; p += UUID_SIZE+1 ){
113 @ <a href="%s(g.zTop)/artifact/%s(p)">%s(p)</a><br />
114 }
115 @ are no longer being shunned.</p>
116 }else{
117 @ <p class="noMoreShun">Artifact(s)<br />
118 for( p = zUuid ; *p ; p += UUID_SIZE+1 ){
@@ -146,11 +146,11 @@
146 admin_log("Shunned %Q", p);
147 p += UUID_SIZE+1;
148 }
149 @ <p class="shunned">Artifact(s)<br />
150 for( p = zUuid ; *p ; p += UUID_SIZE+1 ){
151 @ <a href="%s(g.zTop)/artifact/%s(p)">%s(p)</a><br />
152 }
153 @ have been shunned. They will no longer be pushed.
154 @ They will be removed from the repository the next time the repository
155 @ is rebuilt using the <b>fossil rebuild</b> command-line</p>
156 }
@@ -248,11 +248,11 @@
248 while( db_step(&q)==SQLITE_ROW ){
249 const char *zUuid = db_column_text(&q, 0);
250 int stillExists = db_column_int(&q, 1);
251 cnt++;
252 if( stillExists ){
253 @ <b><a href="%s(g.zTop)/artifact/%s(zUuid)">%s(zUuid)</a></b><br />
254 }else{
255 @ <b>%s(zUuid)</b><br />
256 }
257 }
258 if( cnt==0 ){
@@ -436,13 +436,13 @@
436 while( db_step(&q)==SQLITE_ROW ){
437 const char *zUuid = db_column_text(&q, 1);
438 int size = db_column_int(&q, 2);
439 const char *zDesc = db_column_text(&q, 3);
440 if( zDesc==0 ) zDesc = "";
441 @ <a href="%s(g.zTop)/info/%s(zUuid)">%s(zUuid)</a>
442 @ %h(zDesc) (size: %d(size))<br />
443 }
444 @ </td></tr>
445 @ </table>
446 db_finalize(&q);
447 style_footer();
448 }
449
--- src/shun.c
+++ src/shun.c
@@ -108,11 +108,11 @@
108 p += UUID_SIZE+1;
109 }
110 if( allExist ){
111 @ <p class="noMoreShun">Artifact(s)<br />
112 for( p = zUuid ; *p ; p += UUID_SIZE+1 ){
113 @ <a href="%R/artifact/%s(p)">%s(p)</a><br />
114 }
115 @ are no longer being shunned.</p>
116 }else{
117 @ <p class="noMoreShun">Artifact(s)<br />
118 for( p = zUuid ; *p ; p += UUID_SIZE+1 ){
@@ -146,11 +146,11 @@
146 admin_log("Shunned %Q", p);
147 p += UUID_SIZE+1;
148 }
149 @ <p class="shunned">Artifact(s)<br />
150 for( p = zUuid ; *p ; p += UUID_SIZE+1 ){
151 @ <a href="%R/artifact/%s(p)">%s(p)</a><br />
152 }
153 @ have been shunned. They will no longer be pushed.
154 @ They will be removed from the repository the next time the repository
155 @ is rebuilt using the <b>fossil rebuild</b> command-line</p>
156 }
@@ -248,11 +248,11 @@
248 while( db_step(&q)==SQLITE_ROW ){
249 const char *zUuid = db_column_text(&q, 0);
250 int stillExists = db_column_int(&q, 1);
251 cnt++;
252 if( stillExists ){
253 @ <b><a href="%R/artifact/%s(zUuid)">%s(zUuid)</a></b><br />
254 }else{
255 @ <b>%s(zUuid)</b><br />
256 }
257 }
258 if( cnt==0 ){
@@ -436,13 +436,13 @@
436 while( db_step(&q)==SQLITE_ROW ){
437 const char *zUuid = db_column_text(&q, 1);
438 int size = db_column_int(&q, 2);
439 const char *zDesc = db_column_text(&q, 3);
440 if( zDesc==0 ) zDesc = "";
441 @ <a href="%R/info/%s(zUuid)">%s(zUuid)</a>
442 @ %h(zDesc) (size: %d(size))<br />
443 }
444 @ </td></tr>
445 @ </table>
446 db_finalize(&q);
447 style_footer();
448 }
449
+6 -6
--- src/statrep.c
+++ src/statrep.c
@@ -216,13 +216,13 @@
216216
strlen(zTimeframe),
217217
zTimeframe);
218218
while( SQLITE_ROW == db_step(&stWeek) ){
219219
const char *zWeek = db_column_text(&stWeek,0);
220220
const int nCount = db_column_int(&stWeek,1);
221
- cgi_printf("<a href='%s/timeline?"
221
+ cgi_printf("<a href='%R/timeline?"
222222
"yw=%t-%t&n=%d&y=%s'>%s</a>",
223
- g.zTop, yearPart, zWeek,
223
+ yearPart, zWeek,
224224
nCount, statsReportTimelineYFlag, zWeek);
225225
}
226226
db_finalize(&stWeek);
227227
}
228228
@@ -328,13 +328,13 @@
328328
nEventTotal += nCount;
329329
nEventsPerYear += nCount;
330330
@<tr class='row%d(rowClass)'>
331331
@ <td>
332332
if(includeMonth){
333
- cgi_printf("<a href='%s/timeline?"
333
+ cgi_printf("<a href='%R/timeline?"
334334
"ym=%t&n=%d&y=%s",
335
- g.zTop, zTimeframe, nCount,
335
+ zTimeframe, nCount,
336336
statsReportTimelineYFlag );
337337
/* Reminder: n=nCount is not actually correct for bymonth unless
338338
that was the only user who caused events.
339339
*/
340340
if( zUserName && *zUserName ){
@@ -672,12 +672,12 @@
672672
? (int)(100 * nCount / nMaxEvents)
673673
: 0;
674674
if(!nSize) nSize = 1;
675675
total += nCount;
676676
cgi_printf("<tr class='row%d'>", ++rowCount % 2 );
677
- cgi_printf("<td><a href='%s/timeline?yw=%t-%s&n=%d&y=%s",
678
- g.zTop, zYear, zWeek, nCount,
677
+ cgi_printf("<td><a href='%R/timeline?yw=%t-%s&n=%d&y=%s",
678
+ zYear, zWeek, nCount,
679679
statsReportTimelineYFlag);
680680
if(zUserName && *zUserName){
681681
cgi_printf("&u=%t",zUserName);
682682
}
683683
cgi_printf("'>%s</a></td>",zWeek);
684684
--- src/statrep.c
+++ src/statrep.c
@@ -216,13 +216,13 @@
216 strlen(zTimeframe),
217 zTimeframe);
218 while( SQLITE_ROW == db_step(&stWeek) ){
219 const char *zWeek = db_column_text(&stWeek,0);
220 const int nCount = db_column_int(&stWeek,1);
221 cgi_printf("<a href='%s/timeline?"
222 "yw=%t-%t&n=%d&y=%s'>%s</a>",
223 g.zTop, yearPart, zWeek,
224 nCount, statsReportTimelineYFlag, zWeek);
225 }
226 db_finalize(&stWeek);
227 }
228
@@ -328,13 +328,13 @@
328 nEventTotal += nCount;
329 nEventsPerYear += nCount;
330 @<tr class='row%d(rowClass)'>
331 @ <td>
332 if(includeMonth){
333 cgi_printf("<a href='%s/timeline?"
334 "ym=%t&n=%d&y=%s",
335 g.zTop, zTimeframe, nCount,
336 statsReportTimelineYFlag );
337 /* Reminder: n=nCount is not actually correct for bymonth unless
338 that was the only user who caused events.
339 */
340 if( zUserName && *zUserName ){
@@ -672,12 +672,12 @@
672 ? (int)(100 * nCount / nMaxEvents)
673 : 0;
674 if(!nSize) nSize = 1;
675 total += nCount;
676 cgi_printf("<tr class='row%d'>", ++rowCount % 2 );
677 cgi_printf("<td><a href='%s/timeline?yw=%t-%s&n=%d&y=%s",
678 g.zTop, zYear, zWeek, nCount,
679 statsReportTimelineYFlag);
680 if(zUserName && *zUserName){
681 cgi_printf("&u=%t",zUserName);
682 }
683 cgi_printf("'>%s</a></td>",zWeek);
684
--- src/statrep.c
+++ src/statrep.c
@@ -216,13 +216,13 @@
216 strlen(zTimeframe),
217 zTimeframe);
218 while( SQLITE_ROW == db_step(&stWeek) ){
219 const char *zWeek = db_column_text(&stWeek,0);
220 const int nCount = db_column_int(&stWeek,1);
221 cgi_printf("<a href='%R/timeline?"
222 "yw=%t-%t&n=%d&y=%s'>%s</a>",
223 yearPart, zWeek,
224 nCount, statsReportTimelineYFlag, zWeek);
225 }
226 db_finalize(&stWeek);
227 }
228
@@ -328,13 +328,13 @@
328 nEventTotal += nCount;
329 nEventsPerYear += nCount;
330 @<tr class='row%d(rowClass)'>
331 @ <td>
332 if(includeMonth){
333 cgi_printf("<a href='%R/timeline?"
334 "ym=%t&n=%d&y=%s",
335 zTimeframe, nCount,
336 statsReportTimelineYFlag );
337 /* Reminder: n=nCount is not actually correct for bymonth unless
338 that was the only user who caused events.
339 */
340 if( zUserName && *zUserName ){
@@ -672,12 +672,12 @@
672 ? (int)(100 * nCount / nMaxEvents)
673 : 0;
674 if(!nSize) nSize = 1;
675 total += nCount;
676 cgi_printf("<tr class='row%d'>", ++rowCount % 2 );
677 cgi_printf("<td><a href='%R/timeline?yw=%t-%s&n=%d&y=%s",
678 zYear, zWeek, nCount,
679 statsReportTimelineYFlag);
680 if(zUserName && *zUserName){
681 cgi_printf("&u=%t",zUserName);
682 }
683 cgi_printf("'>%s</a></td>",zWeek);
684
+10 -10
--- src/timeline.c
+++ src/timeline.c
@@ -41,11 +41,11 @@
4141
/*
4242
** Generate a hyperlink to a version.
4343
*/
4444
void hyperlink_to_uuid(const char *zUuid){
4545
if( g.perm.Hyperlink ){
46
- @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%S(zUuid)]</a>
46
+ @ %z(xhref("class='timelineHistLink'","%R/info/%!S",zUuid))[%S(zUuid)]</a>
4747
}else{
4848
@ <span class="timelineHistDsp">[%S(zUuid)]</span>
4949
}
5050
}
5151
@@ -453,11 +453,11 @@
453453
@ (user: %h(zDispUser)%s(zTagList?",":"\051")
454454
}
455455
456456
/* Generate a "detail" link for tags. */
457457
if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){
458
- @ [%z(href("%R/info/%s",zUuid))details</a>]
458
+ @ [%z(href("%R/info/%!S",zUuid))details</a>]
459459
}
460460
461461
/* Generate the "tags: TAGLIST" at the end of the comment, together
462462
** with hyperlinks to the tag list.
463463
*/
@@ -540,29 +540,29 @@
540540
if( !isNew && !isDel && zOldName!=0 ){
541541
@ <li> %h(zOldName) &rarr; %h(zFilename)%s(zId)
542542
}
543543
continue;
544544
}
545
- zA = href("%R/artifact/%S",fid?zNew:zOld);
545
+ zA = href("%R/artifact/%!S",fid?zNew:zOld);
546546
if( content_is_private(fid) ){
547547
zUnpub = UNPUB_TAG;
548548
}
549549
if( isNew ){
550550
@ <li> %s(zA)%h(zFilename)</a>%s(zId) %s(zUnpub) (new file) &nbsp;
551
- @ %z(href("%R/artifact/%s",zNew))[view]</a></li>
551
+ @ %z(href("%R/artifact/%!S",zNew))[view]</a></li>
552552
}else if( isDel ){
553553
@ <li> %s(zA)%h(zFilename)</a> (deleted)</li>
554554
}else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){
555555
@ <li> %h(zOldName) &rarr; %s(zA)%h(zFilename)</a>%s(zId)
556
- @ %s(zUnpub) %z(href("%R/artifact/%s",zNew))[view]</a></li>
556
+ @ %s(zUnpub) %z(href("%R/artifact/%!S",zNew))[view]</a></li>
557557
}else{
558558
if( zOldName!=0 ){
559559
@ <li>%h(zOldName) &rarr; %s(zA)%h(zFilename)%s(zId)</a> %s(zUnpub)
560560
}else{
561561
@ <li>%s(zA)%h(zFilename)</a>%s(zId) &nbsp; %s(zUnpub)
562562
}
563
- @ %z(href("%R/fdiff?sbs=1&v1=%s&v2=%s",zOld,zNew))[diff]</a></li>
563
+ @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zOld,zNew))[diff]</a></li>
564564
}
565565
fossil_free(zA);
566566
}
567567
db_reset(&fchngQuery);
568568
if( inUl ){
@@ -1321,11 +1321,11 @@
13211321
db_multi_exec("%s", blob_sql_text(&sql));
13221322
}
13231323
if( useDividers ) selectedRid = p_rid;
13241324
}
13251325
blob_appendf(&desc, " of %z[%S]</a>",
1326
- href("%R/info/%s", zUuid), zUuid);
1326
+ href("%R/info/%!S", zUuid), zUuid);
13271327
if( d_rid ){
13281328
if( p_rid ){
13291329
/* If both p= and d= are set, we don't have the uuid of d yet. */
13301330
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid);
13311331
}
@@ -1347,11 +1347,11 @@
13471347
blob_append_sql(&sql, " AND event.objid IN ok");
13481348
db_multi_exec("%s", blob_sql_text(&sql));
13491349
if( useDividers ) selectedRid = f_rid;
13501350
blob_appendf(&desc, "Parents and children of check-in ");
13511351
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
1352
- blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid);
1352
+ blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid);
13531353
tmFlags |= TIMELINE_DISJOINT;
13541354
style_submenu_binary("v","With Files","Without Files",
13551355
zType[0]!='a' && zType[0]!='c');
13561356
if( (tmFlags & TIMELINE_UNHIDE)==0 ){
13571357
timeline_submenu(&url, "Unhide", "unhide", "", 0);
@@ -1526,11 +1526,11 @@
15261526
blob_appendf(&desc, "%d %ss", n, zEType);
15271527
}
15281528
if( zUses ){
15291529
char *zFilenames = names_of_file(zUses);
15301530
blob_appendf(&desc, " using file %s version %z%S</a>", zFilenames,
1531
- href("%R/artifact/%s",zUses), zUses);
1531
+ href("%R/artifact/%!S",zUses), zUses);
15321532
tmFlags |= TIMELINE_DISJOINT;
15331533
}
15341534
if( renameOnly ){
15351535
blob_appendf(&desc, " that contain filename changes");
15361536
tmFlags |= TIMELINE_DISJOINT|TIMELINE_FRENAMES;
@@ -2080,10 +2080,10 @@
20802080
" AND blob.rid=c.cid"
20812081
);
20822082
while( db_step(&q)==SQLITE_ROW ){
20832083
const char *zUuid = db_column_text(&q, 0);
20842084
@ <li>
2085
- @ <a href="%s(g.zTop)/timeline?dp=%s(zUuid)&amp;unhide">%S(zUuid)</a>
2085
+ @ <a href="%R/timeline?dp=%!S(zUuid)&amp;unhide">%S(zUuid)</a>
20862086
}
20872087
db_finalize(&q);
20882088
style_footer();
20892089
}
20902090
--- src/timeline.c
+++ src/timeline.c
@@ -41,11 +41,11 @@
41 /*
42 ** Generate a hyperlink to a version.
43 */
44 void hyperlink_to_uuid(const char *zUuid){
45 if( g.perm.Hyperlink ){
46 @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%S(zUuid)]</a>
47 }else{
48 @ <span class="timelineHistDsp">[%S(zUuid)]</span>
49 }
50 }
51
@@ -453,11 +453,11 @@
453 @ (user: %h(zDispUser)%s(zTagList?",":"\051")
454 }
455
456 /* Generate a "detail" link for tags. */
457 if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){
458 @ [%z(href("%R/info/%s",zUuid))details</a>]
459 }
460
461 /* Generate the "tags: TAGLIST" at the end of the comment, together
462 ** with hyperlinks to the tag list.
463 */
@@ -540,29 +540,29 @@
540 if( !isNew && !isDel && zOldName!=0 ){
541 @ <li> %h(zOldName) &rarr; %h(zFilename)%s(zId)
542 }
543 continue;
544 }
545 zA = href("%R/artifact/%S",fid?zNew:zOld);
546 if( content_is_private(fid) ){
547 zUnpub = UNPUB_TAG;
548 }
549 if( isNew ){
550 @ <li> %s(zA)%h(zFilename)</a>%s(zId) %s(zUnpub) (new file) &nbsp;
551 @ %z(href("%R/artifact/%s",zNew))[view]</a></li>
552 }else if( isDel ){
553 @ <li> %s(zA)%h(zFilename)</a> (deleted)</li>
554 }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){
555 @ <li> %h(zOldName) &rarr; %s(zA)%h(zFilename)</a>%s(zId)
556 @ %s(zUnpub) %z(href("%R/artifact/%s",zNew))[view]</a></li>
557 }else{
558 if( zOldName!=0 ){
559 @ <li>%h(zOldName) &rarr; %s(zA)%h(zFilename)%s(zId)</a> %s(zUnpub)
560 }else{
561 @ <li>%s(zA)%h(zFilename)</a>%s(zId) &nbsp; %s(zUnpub)
562 }
563 @ %z(href("%R/fdiff?sbs=1&v1=%s&v2=%s",zOld,zNew))[diff]</a></li>
564 }
565 fossil_free(zA);
566 }
567 db_reset(&fchngQuery);
568 if( inUl ){
@@ -1321,11 +1321,11 @@
1321 db_multi_exec("%s", blob_sql_text(&sql));
1322 }
1323 if( useDividers ) selectedRid = p_rid;
1324 }
1325 blob_appendf(&desc, " of %z[%S]</a>",
1326 href("%R/info/%s", zUuid), zUuid);
1327 if( d_rid ){
1328 if( p_rid ){
1329 /* If both p= and d= are set, we don't have the uuid of d yet. */
1330 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid);
1331 }
@@ -1347,11 +1347,11 @@
1347 blob_append_sql(&sql, " AND event.objid IN ok");
1348 db_multi_exec("%s", blob_sql_text(&sql));
1349 if( useDividers ) selectedRid = f_rid;
1350 blob_appendf(&desc, "Parents and children of check-in ");
1351 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
1352 blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid);
1353 tmFlags |= TIMELINE_DISJOINT;
1354 style_submenu_binary("v","With Files","Without Files",
1355 zType[0]!='a' && zType[0]!='c');
1356 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1357 timeline_submenu(&url, "Unhide", "unhide", "", 0);
@@ -1526,11 +1526,11 @@
1526 blob_appendf(&desc, "%d %ss", n, zEType);
1527 }
1528 if( zUses ){
1529 char *zFilenames = names_of_file(zUses);
1530 blob_appendf(&desc, " using file %s version %z%S</a>", zFilenames,
1531 href("%R/artifact/%s",zUses), zUses);
1532 tmFlags |= TIMELINE_DISJOINT;
1533 }
1534 if( renameOnly ){
1535 blob_appendf(&desc, " that contain filename changes");
1536 tmFlags |= TIMELINE_DISJOINT|TIMELINE_FRENAMES;
@@ -2080,10 +2080,10 @@
2080 " AND blob.rid=c.cid"
2081 );
2082 while( db_step(&q)==SQLITE_ROW ){
2083 const char *zUuid = db_column_text(&q, 0);
2084 @ <li>
2085 @ <a href="%s(g.zTop)/timeline?dp=%s(zUuid)&amp;unhide">%S(zUuid)</a>
2086 }
2087 db_finalize(&q);
2088 style_footer();
2089 }
2090
--- src/timeline.c
+++ src/timeline.c
@@ -41,11 +41,11 @@
41 /*
42 ** Generate a hyperlink to a version.
43 */
44 void hyperlink_to_uuid(const char *zUuid){
45 if( g.perm.Hyperlink ){
46 @ %z(xhref("class='timelineHistLink'","%R/info/%!S",zUuid))[%S(zUuid)]</a>
47 }else{
48 @ <span class="timelineHistDsp">[%S(zUuid)]</span>
49 }
50 }
51
@@ -453,11 +453,11 @@
453 @ (user: %h(zDispUser)%s(zTagList?",":"\051")
454 }
455
456 /* Generate a "detail" link for tags. */
457 if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){
458 @ [%z(href("%R/info/%!S",zUuid))details</a>]
459 }
460
461 /* Generate the "tags: TAGLIST" at the end of the comment, together
462 ** with hyperlinks to the tag list.
463 */
@@ -540,29 +540,29 @@
540 if( !isNew && !isDel && zOldName!=0 ){
541 @ <li> %h(zOldName) &rarr; %h(zFilename)%s(zId)
542 }
543 continue;
544 }
545 zA = href("%R/artifact/%!S",fid?zNew:zOld);
546 if( content_is_private(fid) ){
547 zUnpub = UNPUB_TAG;
548 }
549 if( isNew ){
550 @ <li> %s(zA)%h(zFilename)</a>%s(zId) %s(zUnpub) (new file) &nbsp;
551 @ %z(href("%R/artifact/%!S",zNew))[view]</a></li>
552 }else if( isDel ){
553 @ <li> %s(zA)%h(zFilename)</a> (deleted)</li>
554 }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){
555 @ <li> %h(zOldName) &rarr; %s(zA)%h(zFilename)</a>%s(zId)
556 @ %s(zUnpub) %z(href("%R/artifact/%!S",zNew))[view]</a></li>
557 }else{
558 if( zOldName!=0 ){
559 @ <li>%h(zOldName) &rarr; %s(zA)%h(zFilename)%s(zId)</a> %s(zUnpub)
560 }else{
561 @ <li>%s(zA)%h(zFilename)</a>%s(zId) &nbsp; %s(zUnpub)
562 }
563 @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zOld,zNew))[diff]</a></li>
564 }
565 fossil_free(zA);
566 }
567 db_reset(&fchngQuery);
568 if( inUl ){
@@ -1321,11 +1321,11 @@
1321 db_multi_exec("%s", blob_sql_text(&sql));
1322 }
1323 if( useDividers ) selectedRid = p_rid;
1324 }
1325 blob_appendf(&desc, " of %z[%S]</a>",
1326 href("%R/info/%!S", zUuid), zUuid);
1327 if( d_rid ){
1328 if( p_rid ){
1329 /* If both p= and d= are set, we don't have the uuid of d yet. */
1330 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid);
1331 }
@@ -1347,11 +1347,11 @@
1347 blob_append_sql(&sql, " AND event.objid IN ok");
1348 db_multi_exec("%s", blob_sql_text(&sql));
1349 if( useDividers ) selectedRid = f_rid;
1350 blob_appendf(&desc, "Parents and children of check-in ");
1351 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
1352 blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid);
1353 tmFlags |= TIMELINE_DISJOINT;
1354 style_submenu_binary("v","With Files","Without Files",
1355 zType[0]!='a' && zType[0]!='c');
1356 if( (tmFlags & TIMELINE_UNHIDE)==0 ){
1357 timeline_submenu(&url, "Unhide", "unhide", "", 0);
@@ -1526,11 +1526,11 @@
1526 blob_appendf(&desc, "%d %ss", n, zEType);
1527 }
1528 if( zUses ){
1529 char *zFilenames = names_of_file(zUses);
1530 blob_appendf(&desc, " using file %s version %z%S</a>", zFilenames,
1531 href("%R/artifact/%!S",zUses), zUses);
1532 tmFlags |= TIMELINE_DISJOINT;
1533 }
1534 if( renameOnly ){
1535 blob_appendf(&desc, " that contain filename changes");
1536 tmFlags |= TIMELINE_DISJOINT|TIMELINE_FRENAMES;
@@ -2080,10 +2080,10 @@
2080 " AND blob.rid=c.cid"
2081 );
2082 while( db_step(&q)==SQLITE_ROW ){
2083 const char *zUuid = db_column_text(&q, 0);
2084 @ <li>
2085 @ <a href="%R/timeline?dp=%!S(zUuid)&amp;unhide">%S(zUuid)</a>
2086 }
2087 db_finalize(&q);
2088 style_footer();
2089 }
2090
+3 -3
--- src/tkt.c
+++ src/tkt.c
@@ -968,22 +968,22 @@
968968
@
969969
@ <li><p>Delete attachment "%h(zFile)"
970970
}else{
971971
@
972972
@ <li><p>Add attachment
973
- @ "%z(href("%R/artifact/%s",zSrc))%s(zFile)</a>"
973
+ @ "%z(href("%R/artifact/%!S",zSrc))%s(zFile)</a>"
974974
}
975
- @ [%z(href("%R/artifact/%s",zChngUuid))%S(zChngUuid)</a>]
975
+ @ [%z(href("%R/artifact/%!S",zChngUuid))%S(zChngUuid)</a>]
976976
@ (rid %d(rid)) by
977977
hyperlink_to_user(zUser,zDate," on");
978978
hyperlink_to_date(zDate, ".</p>");
979979
}else{
980980
pTicket = manifest_get(rid, CFTYPE_TICKET, 0);
981981
if( pTicket ){
982982
@
983983
@ <li><p>Ticket change
984
- @ [%z(href("%R/artifact/%s",zChngUuid))%S(zChngUuid)</a>]
984
+ @ [%z(href("%R/artifact/%!S",zChngUuid))%S(zChngUuid)</a>]
985985
@ (rid %d(rid)) by
986986
hyperlink_to_user(pTicket->zUser,zDate," on");
987987
hyperlink_to_date(zDate, ":");
988988
@ </p>
989989
ticket_output_change_artifact(pTicket, "a");
990990
--- src/tkt.c
+++ src/tkt.c
@@ -968,22 +968,22 @@
968 @
969 @ <li><p>Delete attachment "%h(zFile)"
970 }else{
971 @
972 @ <li><p>Add attachment
973 @ "%z(href("%R/artifact/%s",zSrc))%s(zFile)</a>"
974 }
975 @ [%z(href("%R/artifact/%s",zChngUuid))%S(zChngUuid)</a>]
976 @ (rid %d(rid)) by
977 hyperlink_to_user(zUser,zDate," on");
978 hyperlink_to_date(zDate, ".</p>");
979 }else{
980 pTicket = manifest_get(rid, CFTYPE_TICKET, 0);
981 if( pTicket ){
982 @
983 @ <li><p>Ticket change
984 @ [%z(href("%R/artifact/%s",zChngUuid))%S(zChngUuid)</a>]
985 @ (rid %d(rid)) by
986 hyperlink_to_user(pTicket->zUser,zDate," on");
987 hyperlink_to_date(zDate, ":");
988 @ </p>
989 ticket_output_change_artifact(pTicket, "a");
990
--- src/tkt.c
+++ src/tkt.c
@@ -968,22 +968,22 @@
968 @
969 @ <li><p>Delete attachment "%h(zFile)"
970 }else{
971 @
972 @ <li><p>Add attachment
973 @ "%z(href("%R/artifact/%!S",zSrc))%s(zFile)</a>"
974 }
975 @ [%z(href("%R/artifact/%!S",zChngUuid))%S(zChngUuid)</a>]
976 @ (rid %d(rid)) by
977 hyperlink_to_user(zUser,zDate," on");
978 hyperlink_to_date(zDate, ".</p>");
979 }else{
980 pTicket = manifest_get(rid, CFTYPE_TICKET, 0);
981 if( pTicket ){
982 @
983 @ <li><p>Ticket change
984 @ [%z(href("%R/artifact/%!S",zChngUuid))%S(zChngUuid)</a>]
985 @ (rid %d(rid)) by
986 hyperlink_to_user(pTicket->zUser,zDate," on");
987 hyperlink_to_date(zDate, ":");
988 @ </p>
989 ticket_output_change_artifact(pTicket, "a");
990
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1206,11 +1206,11 @@
12061206
|| strncmp(zTarget, "ftp:", 4)==0
12071207
|| strncmp(zTarget, "mailto:", 7)==0
12081208
){
12091209
blob_appendf(p->pOut, "<a href=\"%s\">", zTarget);
12101210
}else if( zTarget[0]=='/' ){
1211
- blob_appendf(p->pOut, "<a href=\"%s%h\">", g.zTop, zTarget);
1211
+ blob_appendf(p->pOut, "<a href=\"%R%h\">", zTarget);
12121212
}else if( zTarget[0]=='.'
12131213
&& (zTarget[1]=='/' || (zTarget[1]=='.' && zTarget[2]=='/'))
12141214
&& (p->state & WIKI_LINKSONLY)==0 ){
12151215
blob_appendf(p->pOut, "<a href=\"%h\">", zTarget);
12161216
}else if( zTarget[0]=='#' ){
12171217
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1206,11 +1206,11 @@
1206 || strncmp(zTarget, "ftp:", 4)==0
1207 || strncmp(zTarget, "mailto:", 7)==0
1208 ){
1209 blob_appendf(p->pOut, "<a href=\"%s\">", zTarget);
1210 }else if( zTarget[0]=='/' ){
1211 blob_appendf(p->pOut, "<a href=\"%s%h\">", g.zTop, zTarget);
1212 }else if( zTarget[0]=='.'
1213 && (zTarget[1]=='/' || (zTarget[1]=='.' && zTarget[2]=='/'))
1214 && (p->state & WIKI_LINKSONLY)==0 ){
1215 blob_appendf(p->pOut, "<a href=\"%h\">", zTarget);
1216 }else if( zTarget[0]=='#' ){
1217
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -1206,11 +1206,11 @@
1206 || strncmp(zTarget, "ftp:", 4)==0
1207 || strncmp(zTarget, "mailto:", 7)==0
1208 ){
1209 blob_appendf(p->pOut, "<a href=\"%s\">", zTarget);
1210 }else if( zTarget[0]=='/' ){
1211 blob_appendf(p->pOut, "<a href=\"%R%h\">", zTarget);
1212 }else if( zTarget[0]=='.'
1213 && (zTarget[1]=='/' || (zTarget[1]=='.' && zTarget[2]=='/'))
1214 && (p->state & WIKI_LINKSONLY)==0 ){
1215 blob_appendf(p->pOut, "<a href=\"%h\">", zTarget);
1216 }else if( zTarget[0]=='#' ){
1217

Keyboard Shortcuts

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