Fossil SCM

merge trunk

jan.nijtmans 2012-11-08 15:47 convert_before_commit merge
Commit 4b9243f6a04bed4f43b68475d4708a31c1600dbb
+10
--- src/add.c
+++ src/add.c
@@ -500,10 +500,20 @@
500500
** Rename a single file.
501501
**
502502
** The original name of the file is zOrig. The new filename is zNew.
503503
*/
504504
static void mv_one_file(int vid, const char *zOrig, const char *zNew){
505
+ int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q", zNew);
506
+ if( x>=0 ){
507
+ if( x==0 ){
508
+ fossil_fatal("cannot rename '%s' to '%s' since another file named '%s'"
509
+ " is currently under management", zOrig, zNew, zNew);
510
+ }else{
511
+ fossil_fatal("cannot rename '%s' to '%s' since the delete of '%s' has "
512
+ "not yet been committed", zOrig, zNew, zNew);
513
+ }
514
+ }
505515
fossil_print("RENAME %s %s\n", zOrig, zNew);
506516
db_multi_exec(
507517
"UPDATE vfile SET pathname='%q' WHERE pathname='%q' AND vid=%d",
508518
zNew, zOrig, vid
509519
);
510520
--- src/add.c
+++ src/add.c
@@ -500,10 +500,20 @@
500 ** Rename a single file.
501 **
502 ** The original name of the file is zOrig. The new filename is zNew.
503 */
504 static void mv_one_file(int vid, const char *zOrig, const char *zNew){
 
 
 
 
 
 
 
 
 
 
505 fossil_print("RENAME %s %s\n", zOrig, zNew);
506 db_multi_exec(
507 "UPDATE vfile SET pathname='%q' WHERE pathname='%q' AND vid=%d",
508 zNew, zOrig, vid
509 );
510
--- src/add.c
+++ src/add.c
@@ -500,10 +500,20 @@
500 ** Rename a single file.
501 **
502 ** The original name of the file is zOrig. The new filename is zNew.
503 */
504 static void mv_one_file(int vid, const char *zOrig, const char *zNew){
505 int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q", zNew);
506 if( x>=0 ){
507 if( x==0 ){
508 fossil_fatal("cannot rename '%s' to '%s' since another file named '%s'"
509 " is currently under management", zOrig, zNew, zNew);
510 }else{
511 fossil_fatal("cannot rename '%s' to '%s' since the delete of '%s' has "
512 "not yet been committed", zOrig, zNew, zNew);
513 }
514 }
515 fossil_print("RENAME %s %s\n", zOrig, zNew);
516 db_multi_exec(
517 "UPDATE vfile SET pathname='%q' WHERE pathname='%q' AND vid=%d",
518 zNew, zOrig, vid
519 );
520
+1 -1
--- src/info.c
+++ src/info.c
@@ -1723,14 +1723,14 @@
17231723
}
17241724
@ <tr><th>Ticket:</th>
17251725
@ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a></td></tr>
17261726
@ <tr><th>Date:</th><td>
17271727
hyperlink_to_date(zDate, "</td></tr>");
1728
- free(zDate);
17291728
@ <tr><th>User:</th><td>
17301729
hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>");
17311730
@ </table>
1731
+ free(zDate);
17321732
17331733
if( g.perm.ModTkt && modPending ){
17341734
@ <div class="section">Moderation</div>
17351735
@ <blockquote>
17361736
@ <form method="POST" action="%R/tinfo/%s(zUuid)">
17371737
--- src/info.c
+++ src/info.c
@@ -1723,14 +1723,14 @@
1723 }
1724 @ <tr><th>Ticket:</th>
1725 @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a></td></tr>
1726 @ <tr><th>Date:</th><td>
1727 hyperlink_to_date(zDate, "</td></tr>");
1728 free(zDate);
1729 @ <tr><th>User:</th><td>
1730 hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>");
1731 @ </table>
 
1732
1733 if( g.perm.ModTkt && modPending ){
1734 @ <div class="section">Moderation</div>
1735 @ <blockquote>
1736 @ <form method="POST" action="%R/tinfo/%s(zUuid)">
1737
--- src/info.c
+++ src/info.c
@@ -1723,14 +1723,14 @@
1723 }
1724 @ <tr><th>Ticket:</th>
1725 @ <td>%z(href("%R/tktview/%s",zTktName))%s(zTktName)</a></td></tr>
1726 @ <tr><th>Date:</th><td>
1727 hyperlink_to_date(zDate, "</td></tr>");
 
1728 @ <tr><th>User:</th><td>
1729 hyperlink_to_user(pTktChng->zUser, zDate, "</td></tr>");
1730 @ </table>
1731 free(zDate);
1732
1733 if( g.perm.ModTkt && modPending ){
1734 @ <div class="section">Moderation</div>
1735 @ <blockquote>
1736 @ <form method="POST" action="%R/tinfo/%s(zUuid)">
1737
+1 -1
--- src/login.c
+++ src/login.c
@@ -1145,11 +1145,11 @@
11451145
db_exists("SELECT 1 FROM user"
11461146
" WHERE login='anonymous'"
11471147
" AND cap LIKE '%%h%%'") ){
11481148
const char *zUrl = PD("REQUEST_URI", "index");
11491149
@ <p>Many <span class="disabled">hyperlinks are disabled.</span><br />
1150
- @ Use <a href="%s(g.zTop)/login?anon=1&g=%T(zUrl)">anonymous login</a>
1150
+ @ Use <a href="%s(g.zTop)/login?anon=1&amp;g=%T(zUrl)">anonymous login</a>
11511151
@ to enable hyperlinks.</p>
11521152
}
11531153
}
11541154
11551155
/*
11561156
--- src/login.c
+++ src/login.c
@@ -1145,11 +1145,11 @@
1145 db_exists("SELECT 1 FROM user"
1146 " WHERE login='anonymous'"
1147 " AND cap LIKE '%%h%%'") ){
1148 const char *zUrl = PD("REQUEST_URI", "index");
1149 @ <p>Many <span class="disabled">hyperlinks are disabled.</span><br />
1150 @ Use <a href="%s(g.zTop)/login?anon=1&g=%T(zUrl)">anonymous login</a>
1151 @ to enable hyperlinks.</p>
1152 }
1153 }
1154
1155 /*
1156
--- src/login.c
+++ src/login.c
@@ -1145,11 +1145,11 @@
1145 db_exists("SELECT 1 FROM user"
1146 " WHERE login='anonymous'"
1147 " AND cap LIKE '%%h%%'") ){
1148 const char *zUrl = PD("REQUEST_URI", "index");
1149 @ <p>Many <span class="disabled">hyperlinks are disabled.</span><br />
1150 @ Use <a href="%s(g.zTop)/login?anon=1&amp;g=%T(zUrl)">anonymous login</a>
1151 @ to enable hyperlinks.</p>
1152 }
1153 }
1154
1155 /*
1156
+1 -1
--- src/report.c
+++ src/report.c
@@ -60,11 +60,11 @@
6060
} else {
6161
blob_appendf(&ril, "%z%h</a>", href("%R/rptview?rn=%d", rn), zTitle);
6262
}
6363
blob_appendf(&ril, "&nbsp;&nbsp;&nbsp;");
6464
if( g.perm.Write && zOwner && zOwner[0] ){
65
- blob_appendf(&ril, "(by <i>%h</i></i>) ", zOwner);
65
+ blob_appendf(&ril, "(by <i>%h</i>) ", zOwner);
6666
}
6767
if( g.perm.TktFmt ){
6868
blob_appendf(&ril, "[%zcopy</a>] ",
6969
href("%R/rptedit?rn=%d&copy=1", rn));
7070
}
7171
--- src/report.c
+++ src/report.c
@@ -60,11 +60,11 @@
60 } else {
61 blob_appendf(&ril, "%z%h</a>", href("%R/rptview?rn=%d", rn), zTitle);
62 }
63 blob_appendf(&ril, "&nbsp;&nbsp;&nbsp;");
64 if( g.perm.Write && zOwner && zOwner[0] ){
65 blob_appendf(&ril, "(by <i>%h</i></i>) ", zOwner);
66 }
67 if( g.perm.TktFmt ){
68 blob_appendf(&ril, "[%zcopy</a>] ",
69 href("%R/rptedit?rn=%d&copy=1", rn));
70 }
71
--- src/report.c
+++ src/report.c
@@ -60,11 +60,11 @@
60 } else {
61 blob_appendf(&ril, "%z%h</a>", href("%R/rptview?rn=%d", rn), zTitle);
62 }
63 blob_appendf(&ril, "&nbsp;&nbsp;&nbsp;");
64 if( g.perm.Write && zOwner && zOwner[0] ){
65 blob_appendf(&ril, "(by <i>%h</i>) ", zOwner);
66 }
67 if( g.perm.TktFmt ){
68 blob_appendf(&ril, "[%zcopy</a>] ",
69 href("%R/rptedit?rn=%d&copy=1", rn));
70 }
71
+2 -2
--- src/setup.c
+++ src/setup.c
@@ -62,11 +62,11 @@
6262
6363
/* Make sure the header contains <base href="...">. Issue a warning
6464
** if it does not. */
6565
if( !cgi_header_contains("<base href=") ){
6666
@ <p class="generalError"><b>Configuration Error:</b> Please add
67
- @ <tt>&lt;base href="$baseurl/$current_page"&gt</tt> after
67
+ @ <tt>&lt;base href="$baseurl/$current_page"&gt;</tt> after
6868
@ <tt>&lt;head&gt;</tt> in the <a href="setup_header">HTML header</a>!</p>
6969
}
7070
7171
@ <table border="0" cellspacing="7">
7272
setup_menu_entry("Users", "setup_ulist",
@@ -1352,11 +1352,11 @@
13521352
13531353
/* Make sure the header contains <base href="...">. Issue a warning
13541354
** if it does not. */
13551355
if( !cgi_header_contains("<base href=") ){
13561356
@ <p class="generalError">Please add
1357
- @ <tt>&lt;base href="$baseurl/$current_page"&gt</tt> after
1357
+ @ <tt>&lt;base href="$baseurl/$current_page"&gt;</tt> after
13581358
@ <tt>&lt;head&gt;</tt> in the header!
13591359
@ <input type="submit" name="fixbase" value="Add &lt;base&gt; Now"></p>
13601360
}
13611361
13621362
login_insert_csrf_secret();
13631363
--- src/setup.c
+++ src/setup.c
@@ -62,11 +62,11 @@
62
63 /* Make sure the header contains <base href="...">. Issue a warning
64 ** if it does not. */
65 if( !cgi_header_contains("<base href=") ){
66 @ <p class="generalError"><b>Configuration Error:</b> Please add
67 @ <tt>&lt;base href="$baseurl/$current_page"&gt</tt> after
68 @ <tt>&lt;head&gt;</tt> in the <a href="setup_header">HTML header</a>!</p>
69 }
70
71 @ <table border="0" cellspacing="7">
72 setup_menu_entry("Users", "setup_ulist",
@@ -1352,11 +1352,11 @@
1352
1353 /* Make sure the header contains <base href="...">. Issue a warning
1354 ** if it does not. */
1355 if( !cgi_header_contains("<base href=") ){
1356 @ <p class="generalError">Please add
1357 @ <tt>&lt;base href="$baseurl/$current_page"&gt</tt> after
1358 @ <tt>&lt;head&gt;</tt> in the header!
1359 @ <input type="submit" name="fixbase" value="Add &lt;base&gt; Now"></p>
1360 }
1361
1362 login_insert_csrf_secret();
1363
--- src/setup.c
+++ src/setup.c
@@ -62,11 +62,11 @@
62
63 /* Make sure the header contains <base href="...">. Issue a warning
64 ** if it does not. */
65 if( !cgi_header_contains("<base href=") ){
66 @ <p class="generalError"><b>Configuration Error:</b> Please add
67 @ <tt>&lt;base href="$baseurl/$current_page"&gt;</tt> after
68 @ <tt>&lt;head&gt;</tt> in the <a href="setup_header">HTML header</a>!</p>
69 }
70
71 @ <table border="0" cellspacing="7">
72 setup_menu_entry("Users", "setup_ulist",
@@ -1352,11 +1352,11 @@
1352
1353 /* Make sure the header contains <base href="...">. Issue a warning
1354 ** if it does not. */
1355 if( !cgi_header_contains("<base href=") ){
1356 @ <p class="generalError">Please add
1357 @ <tt>&lt;base href="$baseurl/$current_page"&gt;</tt> after
1358 @ <tt>&lt;head&gt;</tt> in the header!
1359 @ <input type="submit" name="fixbase" value="Add &lt;base&gt; Now"></p>
1360 }
1361
1362 login_insert_csrf_secret();
1363
+1 -1
--- src/skins.c
+++ src/skins.c
@@ -1218,11 +1218,11 @@
12181218
@ set fossilUrl http://www.fossil-scm.org
12191219
@ </th1>
12201220
@ <a href="$fossilUrl/">Fossil</a>
12211221
@ version $release_version $tclVersion
12221222
@ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a>
1223
-@ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&y=ci">$manifest_date</a>
1223
+@ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&amp;y=ci">$manifest_date</a>
12241224
@ </div>
12251225
@ </body></html>
12261226
@ ');
12271227
;
12281228
12291229
--- src/skins.c
+++ src/skins.c
@@ -1218,11 +1218,11 @@
1218 @ set fossilUrl http://www.fossil-scm.org
1219 @ </th1>
1220 @ <a href="$fossilUrl/">Fossil</a>
1221 @ version $release_version $tclVersion
1222 @ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a>
1223 @ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&y=ci">$manifest_date</a>
1224 @ </div>
1225 @ </body></html>
1226 @ ');
1227 ;
1228
1229
--- src/skins.c
+++ src/skins.c
@@ -1218,11 +1218,11 @@
1218 @ set fossilUrl http://www.fossil-scm.org
1219 @ </th1>
1220 @ <a href="$fossilUrl/">Fossil</a>
1221 @ version $release_version $tclVersion
1222 @ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a>
1223 @ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&amp;y=ci">$manifest_date</a>
1224 @ </div>
1225 @ </body></html>
1226 @ ');
1227 ;
1228
1229
+7 -3
--- src/style.c
+++ src/style.c
@@ -90,11 +90,13 @@
9090
va_list ap;
9191
va_start(ap, zFormat);
9292
zUrl = vmprintf(zFormat, ap);
9393
va_end(ap);
9494
if( g.perm.Hyperlink && !g.javascriptHyperlink ){
95
- return mprintf("<a %s href=\"%z\">", zExtra, zUrl);
95
+ char *zHUrl = mprintf("<a %s href=\"%h\">", zExtra, zUrl);
96
+ fossil_free(zUrl);
97
+ return zHUrl;
9698
}
9799
if( nHref>=nHrefAlloc ){
98100
nHrefAlloc = nHrefAlloc*2 + 10;
99101
aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0]));
100102
}
@@ -106,11 +108,13 @@
106108
va_list ap;
107109
va_start(ap, zFormat);
108110
zUrl = vmprintf(zFormat, ap);
109111
va_end(ap);
110112
if( g.perm.Hyperlink && !g.javascriptHyperlink ){
111
- return mprintf("<a href=\"%z\">", zUrl);
113
+ char *zHUrl = mprintf("<a href=\"%h\">", zUrl);
114
+ fossil_free(zUrl);
115
+ return zHUrl;
112116
}
113117
if( nHref>=nHrefAlloc ){
114118
nHrefAlloc = nHrefAlloc*2 + 10;
115119
aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0]));
116120
}
@@ -278,11 +282,11 @@
278282
for(i=0; i<nSubmenu; i++){
279283
struct Submenu *p = &aSubmenu[i];
280284
if( p->zLink==0 ){
281285
@ <span class="label">%h(p->zLabel)</span>
282286
}else{
283
- @ <a class="label" href="%s(p->zLink)">%h(p->zLabel)</a>
287
+ @ <a class="label" href="%h(p->zLink)">%h(p->zLabel)</a>
284288
}
285289
}
286290
@ </div>
287291
}
288292
style_ad_unit();
289293
--- src/style.c
+++ src/style.c
@@ -90,11 +90,13 @@
90 va_list ap;
91 va_start(ap, zFormat);
92 zUrl = vmprintf(zFormat, ap);
93 va_end(ap);
94 if( g.perm.Hyperlink && !g.javascriptHyperlink ){
95 return mprintf("<a %s href=\"%z\">", zExtra, zUrl);
 
 
96 }
97 if( nHref>=nHrefAlloc ){
98 nHrefAlloc = nHrefAlloc*2 + 10;
99 aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0]));
100 }
@@ -106,11 +108,13 @@
106 va_list ap;
107 va_start(ap, zFormat);
108 zUrl = vmprintf(zFormat, ap);
109 va_end(ap);
110 if( g.perm.Hyperlink && !g.javascriptHyperlink ){
111 return mprintf("<a href=\"%z\">", zUrl);
 
 
112 }
113 if( nHref>=nHrefAlloc ){
114 nHrefAlloc = nHrefAlloc*2 + 10;
115 aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0]));
116 }
@@ -278,11 +282,11 @@
278 for(i=0; i<nSubmenu; i++){
279 struct Submenu *p = &aSubmenu[i];
280 if( p->zLink==0 ){
281 @ <span class="label">%h(p->zLabel)</span>
282 }else{
283 @ <a class="label" href="%s(p->zLink)">%h(p->zLabel)</a>
284 }
285 }
286 @ </div>
287 }
288 style_ad_unit();
289
--- src/style.c
+++ src/style.c
@@ -90,11 +90,13 @@
90 va_list ap;
91 va_start(ap, zFormat);
92 zUrl = vmprintf(zFormat, ap);
93 va_end(ap);
94 if( g.perm.Hyperlink && !g.javascriptHyperlink ){
95 char *zHUrl = mprintf("<a %s href=\"%h\">", zExtra, zUrl);
96 fossil_free(zUrl);
97 return zHUrl;
98 }
99 if( nHref>=nHrefAlloc ){
100 nHrefAlloc = nHrefAlloc*2 + 10;
101 aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0]));
102 }
@@ -106,11 +108,13 @@
108 va_list ap;
109 va_start(ap, zFormat);
110 zUrl = vmprintf(zFormat, ap);
111 va_end(ap);
112 if( g.perm.Hyperlink && !g.javascriptHyperlink ){
113 char *zHUrl = mprintf("<a href=\"%h\">", zUrl);
114 fossil_free(zUrl);
115 return zHUrl;
116 }
117 if( nHref>=nHrefAlloc ){
118 nHrefAlloc = nHrefAlloc*2 + 10;
119 aHref = fossil_realloc(aHref, nHrefAlloc*sizeof(aHref[0]));
120 }
@@ -278,11 +282,11 @@
282 for(i=0; i<nSubmenu; i++){
283 struct Submenu *p = &aSubmenu[i];
284 if( p->zLink==0 ){
285 @ <span class="label">%h(p->zLabel)</span>
286 }else{
287 @ <a class="label" href="%h(p->zLink)">%h(p->zLabel)</a>
288 }
289 }
290 @ </div>
291 }
292 style_ad_unit();
293
+3 -3
--- src/timeline.c
+++ src/timeline.c
@@ -373,11 +373,11 @@
373373
/* Generate the "user: USERNAME" at the end of the comment, together
374374
** with a hyperlink to another timeline for that user.
375375
*/
376376
if( zTagList && zTagList[0]==0 ) zTagList = 0;
377377
if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){
378
- char *zLink = mprintf("%R/timeline?u=%h&amp;c=%t&amp;nd", zUser, zDate);
378
+ char *zLink = mprintf("%R/timeline?u=%h&c=%t&amp;nd", zUser, zDate);
379379
@ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051")
380380
}else{
381381
@ (user: %h(zUser)%s(zTagList?",":"\051")
382382
}
383383
@@ -398,11 +398,11 @@
398398
while( z && z[0] ){
399399
for(i=0; z[i] && (z[i]!=',' || z[i+1]!=' '); i++){}
400400
if( zThisTag==0 || memcmp(z, zThisTag, i)!=0 || zThisTag[i]!=0 ){
401401
blob_appendf(&links,
402402
"%z%#h</a>%.2s",
403
- href("%R/timeline?r=%#t&amp;nd&amp;c=%t",i,z,zDate), i,z, &z[i]
403
+ href("%R/timeline?r=%#t&nd&c=%t",i,z,zDate), i,z, &z[i]
404404
);
405405
}else{
406406
blob_appendf(&links, "%#h", i+2, z);
407407
}
408408
if( z[i]==0 ) break;
@@ -1662,10 +1662,10 @@
16621662
" AND blob.rid=c.cid"
16631663
);
16641664
while( db_step(&q)==SQLITE_ROW ){
16651665
const char *zUuid = db_column_text(&q, 0);
16661666
@ <li>
1667
- @ <a href="%s(g.zTop)/timeline?p=%S(zUuid)&d=%S(zUuid)">%S(zUuid)</a>
1667
+ @ <a href="%s(g.zTop)/timeline?p=%S(zUuid)&amp;d=%S(zUuid)">%S(zUuid)</a>
16681668
}
16691669
db_finalize(&q);
16701670
style_footer();
16711671
}
16721672
--- src/timeline.c
+++ src/timeline.c
@@ -373,11 +373,11 @@
373 /* Generate the "user: USERNAME" at the end of the comment, together
374 ** with a hyperlink to another timeline for that user.
375 */
376 if( zTagList && zTagList[0]==0 ) zTagList = 0;
377 if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){
378 char *zLink = mprintf("%R/timeline?u=%h&amp;c=%t&amp;nd", zUser, zDate);
379 @ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051")
380 }else{
381 @ (user: %h(zUser)%s(zTagList?",":"\051")
382 }
383
@@ -398,11 +398,11 @@
398 while( z && z[0] ){
399 for(i=0; z[i] && (z[i]!=',' || z[i+1]!=' '); i++){}
400 if( zThisTag==0 || memcmp(z, zThisTag, i)!=0 || zThisTag[i]!=0 ){
401 blob_appendf(&links,
402 "%z%#h</a>%.2s",
403 href("%R/timeline?r=%#t&amp;nd&amp;c=%t",i,z,zDate), i,z, &z[i]
404 );
405 }else{
406 blob_appendf(&links, "%#h", i+2, z);
407 }
408 if( z[i]==0 ) break;
@@ -1662,10 +1662,10 @@
1662 " AND blob.rid=c.cid"
1663 );
1664 while( db_step(&q)==SQLITE_ROW ){
1665 const char *zUuid = db_column_text(&q, 0);
1666 @ <li>
1667 @ <a href="%s(g.zTop)/timeline?p=%S(zUuid)&d=%S(zUuid)">%S(zUuid)</a>
1668 }
1669 db_finalize(&q);
1670 style_footer();
1671 }
1672
--- src/timeline.c
+++ src/timeline.c
@@ -373,11 +373,11 @@
373 /* Generate the "user: USERNAME" at the end of the comment, together
374 ** with a hyperlink to another timeline for that user.
375 */
376 if( zTagList && zTagList[0]==0 ) zTagList = 0;
377 if( g.perm.Hyperlink && fossil_strcmp(zUser, zThisUser)!=0 ){
378 char *zLink = mprintf("%R/timeline?u=%h&c=%t&amp;nd", zUser, zDate);
379 @ (user: %z(href("%z",zLink))%h(zUser)</a>%s(zTagList?",":"\051")
380 }else{
381 @ (user: %h(zUser)%s(zTagList?",":"\051")
382 }
383
@@ -398,11 +398,11 @@
398 while( z && z[0] ){
399 for(i=0; z[i] && (z[i]!=',' || z[i+1]!=' '); i++){}
400 if( zThisTag==0 || memcmp(z, zThisTag, i)!=0 || zThisTag[i]!=0 ){
401 blob_appendf(&links,
402 "%z%#h</a>%.2s",
403 href("%R/timeline?r=%#t&nd&c=%t",i,z,zDate), i,z, &z[i]
404 );
405 }else{
406 blob_appendf(&links, "%#h", i+2, z);
407 }
408 if( z[i]==0 ) break;
@@ -1662,10 +1662,10 @@
1662 " AND blob.rid=c.cid"
1663 );
1664 while( db_step(&q)==SQLITE_ROW ){
1665 const char *zUuid = db_column_text(&q, 0);
1666 @ <li>
1667 @ <a href="%s(g.zTop)/timeline?p=%S(zUuid)&amp;d=%S(zUuid)">%S(zUuid)</a>
1668 }
1669 db_finalize(&q);
1670 style_footer();
1671 }
1672
+1 -1
--- src/url.c
+++ src/url.c
@@ -352,11 +352,11 @@
352352
z = zValue2;
353353
if( z==0 ) continue;
354354
}
355355
blob_appendf(&p->url, "%s%s", zSep, p->azName[i]);
356356
if( z && z[0] ) blob_appendf(&p->url, "=%T", z);
357
- zSep = "&amp;";
357
+ zSep = "&";
358358
}
359359
if( zName1 && zValue1 ){
360360
blob_appendf(&p->url, "%s%s", zSep, zName1);
361361
if( zValue1[0] ) blob_appendf(&p->url, "=%T", zValue1);
362362
}
363363
364364
ADDED test/valgrind-www.tcl
--- src/url.c
+++ src/url.c
@@ -352,11 +352,11 @@
352 z = zValue2;
353 if( z==0 ) continue;
354 }
355 blob_appendf(&p->url, "%s%s", zSep, p->azName[i]);
356 if( z && z[0] ) blob_appendf(&p->url, "=%T", z);
357 zSep = "&amp;";
358 }
359 if( zName1 && zValue1 ){
360 blob_appendf(&p->url, "%s%s", zSep, zName1);
361 if( zValue1[0] ) blob_appendf(&p->url, "=%T", zValue1);
362 }
363
364 DDED test/valgrind-www.tcl
--- src/url.c
+++ src/url.c
@@ -352,11 +352,11 @@
352 z = zValue2;
353 if( z==0 ) continue;
354 }
355 blob_appendf(&p->url, "%s%s", zSep, p->azName[i]);
356 if( z && z[0] ) blob_appendf(&p->url, "=%T", z);
357 zSep = "&";
358 }
359 if( zName1 && zValue1 ){
360 blob_appendf(&p->url, "%s%s", zSep, zName1);
361 if( zValue1[0] ) blob_appendf(&p->url, "=%T", zValue1);
362 }
363
364 DDED test/valgrind-www.tcl
--- a/test/valgrind-www.tcl
+++ b/test/valgrind-www.tcl
@@ -0,0 +1,33 @@
1
+#!/usr/bin/tclsh
2
+#
3
+# Run this script in an open Fossil checkout at the top-level with a
4
+# fresh build of Fossil itself. This script will run fossil on hundreds
5
+# of different web-pages looking for memory allocation problems using y allocation problems using
6
+# valgrind. Valgrind output appears on stderr. Suggested test scenario:
7
+#
8
+# make
9
+# tclsh valgrind-www.tcl 2>&1 | tee valgrind-out.txt
10
+#
11
+# Then examine the valgrind-out.txt file for issues.
12
+#
13
+proc run_query {url} {
14
+ set fd [open q.txt w]
15
+ puts $fd "GET $url HTTreturn [url HTTP/1.0\r\n\r"
16
+ c]/fossil test-http <q.txt 2>@ stderr} msg
17
+ return $msg
18
+}
19
+set todo {}
20
+foreach url {
21
+ /home
22
+ /timeli/tclsh
23
+#
24
+# Run this scrip#!/usr/bin/tclsh
25
+#
26
+# Run this script in an open Fossil checkout at the top-lding>0 && $i<$limit} {incr i} {
27
+ set url [get_pending]
28
+ puts "====== ([expr {$i+1}]) $url ======"
29
+ set x [run_query $url]
30
+ while {[regexp {<[aA] .*?href="(/[a-z].*?)".*?>(.*)$} $x all url tail]} {
31
+ set u2 [string map {&lt; < &gt; > &quot; \" &amp; &} $url]
32
+ if {![info exists seen($u2)]} {
33
+ set pendlappend tod
--- a/test/valgrind-www.tcl
+++ b/test/valgrind-www.tcl
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/test/valgrind-www.tcl
+++ b/test/valgrind-www.tcl
@@ -0,0 +1,33 @@
1 #!/usr/bin/tclsh
2 #
3 # Run this script in an open Fossil checkout at the top-level with a
4 # fresh build of Fossil itself. This script will run fossil on hundreds
5 # of different web-pages looking for memory allocation problems using y allocation problems using
6 # valgrind. Valgrind output appears on stderr. Suggested test scenario:
7 #
8 # make
9 # tclsh valgrind-www.tcl 2>&1 | tee valgrind-out.txt
10 #
11 # Then examine the valgrind-out.txt file for issues.
12 #
13 proc run_query {url} {
14 set fd [open q.txt w]
15 puts $fd "GET $url HTTreturn [url HTTP/1.0\r\n\r"
16 c]/fossil test-http <q.txt 2>@ stderr} msg
17 return $msg
18 }
19 set todo {}
20 foreach url {
21 /home
22 /timeli/tclsh
23 #
24 # Run this scrip#!/usr/bin/tclsh
25 #
26 # Run this script in an open Fossil checkout at the top-lding>0 && $i<$limit} {incr i} {
27 set url [get_pending]
28 puts "====== ([expr {$i+1}]) $url ======"
29 set x [run_query $url]
30 while {[regexp {<[aA] .*?href="(/[a-z].*?)".*?>(.*)$} $x all url tail]} {
31 set u2 [string map {&lt; < &gt; > &quot; \" &amp; &} $url]
32 if {![info exists seen($u2)]} {
33 set pendlappend tod

Keyboard Shortcuts

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