Fossil SCM

Rename the /tarlist page to /download. Rename the suggested-tarlist property to suggested-downloads.

drh 2025-10-18 13:17 timeline-enhance-2025
Commit 717fbdc297f72b30ec637b6f9ac5f3b80373de85c5a4e798d70977c0c9f4ec33
4 files changed +8 -10 +7 -8 +2 -2 +30 -13
+8 -10
--- src/robot.c
+++ src/robot.c
@@ -263,22 +263,20 @@
263263
** The VALUE of this setting is a list of GLOB patterns that match
264264
** pages for which complex HTTP requests from unauthenticated clients
265265
** should be disallowed. "Unauthenticated" means the user is "nobody".
266266
** The recommended value for this setting is:
267267
**
268
-** timelineX,diff,annotate,fileage,file,finfo,reports,tree,ziplink,hexdump
268
+** timelineX,diff,annotate,fileage,file,finfo,reports,tree,download,hexdump
269269
**
270270
** The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
271271
** /vpatch. The "annotate" tag also covers /blame and /praise. "zip"
272
-** also covers /tarball and /sqlar. The special "ziplink" tag covers any
273
-** page that contains a lot of hyperlinks to a "zip" page. If a tag has
274
-** an "X" character appended then it only applies if query parameters are
275
-** such that the page is particularly difficult to compute. In all other
276
-** case, the tag should exactly match the page name. Useful "X" tags
277
-** include "timelineX" and "zipX". See the [[robot-zip-leaf]] and
278
-** [[robot-zip-tag]] settings for additional controls associated with
279
-** the "zipX" restriction.
272
+** also covers /tarball and /sqlar. If a tag has an "X" character appended
273
+** then it only applies if query parameters are such that the page is
274
+** particularly difficult to compute. In all other case, the tag should
275
+** exactly match the page name. Useful "X" tags include "timelineX" and
276
+** "zipX". See the [[robot-zip-leaf]] and [[robot-zip-tag]] settings
277
+** for additional controls associated with the "zipX" restriction.
280278
**
281279
** Change this setting "off" to disable all robot restrictions.
282280
*/
283281
/*
284282
** SETTING: robot-exception width=40 block-text
@@ -320,11 +318,11 @@
320318
/*
321319
** Return the default restriction GLOB
322320
*/
323321
const char *robot_restrict_default(void){
324322
return "timelineX,diff,annotate,fileage,file,finfo,reports,"
325
- "tree,hexdump,ziplink";
323
+ "tree,hexdump,download";
326324
}
327325
328326
/*
329327
** Return true if zTag matches one of the tags in the robot-restrict
330328
** setting.
331329
--- src/robot.c
+++ src/robot.c
@@ -263,22 +263,20 @@
263 ** The VALUE of this setting is a list of GLOB patterns that match
264 ** pages for which complex HTTP requests from unauthenticated clients
265 ** should be disallowed. "Unauthenticated" means the user is "nobody".
266 ** The recommended value for this setting is:
267 **
268 ** timelineX,diff,annotate,fileage,file,finfo,reports,tree,ziplink,hexdump
269 **
270 ** The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
271 ** /vpatch. The "annotate" tag also covers /blame and /praise. "zip"
272 ** also covers /tarball and /sqlar. The special "ziplink" tag covers any
273 ** page that contains a lot of hyperlinks to a "zip" page. If a tag has
274 ** an "X" character appended then it only applies if query parameters are
275 ** such that the page is particularly difficult to compute. In all other
276 ** case, the tag should exactly match the page name. Useful "X" tags
277 ** include "timelineX" and "zipX". See the [[robot-zip-leaf]] and
278 ** [[robot-zip-tag]] settings for additional controls associated with
279 ** the "zipX" restriction.
280 **
281 ** Change this setting "off" to disable all robot restrictions.
282 */
283 /*
284 ** SETTING: robot-exception width=40 block-text
@@ -320,11 +318,11 @@
320 /*
321 ** Return the default restriction GLOB
322 */
323 const char *robot_restrict_default(void){
324 return "timelineX,diff,annotate,fileage,file,finfo,reports,"
325 "tree,hexdump,ziplink";
326 }
327
328 /*
329 ** Return true if zTag matches one of the tags in the robot-restrict
330 ** setting.
331
--- src/robot.c
+++ src/robot.c
@@ -263,22 +263,20 @@
263 ** The VALUE of this setting is a list of GLOB patterns that match
264 ** pages for which complex HTTP requests from unauthenticated clients
265 ** should be disallowed. "Unauthenticated" means the user is "nobody".
266 ** The recommended value for this setting is:
267 **
268 ** timelineX,diff,annotate,fileage,file,finfo,reports,tree,download,hexdump
269 **
270 ** The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
271 ** /vpatch. The "annotate" tag also covers /blame and /praise. "zip"
272 ** also covers /tarball and /sqlar. If a tag has an "X" character appended
273 ** then it only applies if query parameters are such that the page is
274 ** particularly difficult to compute. In all other case, the tag should
275 ** exactly match the page name. Useful "X" tags include "timelineX" and
276 ** "zipX". See the [[robot-zip-leaf]] and [[robot-zip-tag]] settings
277 ** for additional controls associated with the "zipX" restriction.
 
 
278 **
279 ** Change this setting "off" to disable all robot restrictions.
280 */
281 /*
282 ** SETTING: robot-exception width=40 block-text
@@ -320,11 +318,11 @@
318 /*
319 ** Return the default restriction GLOB
320 */
321 const char *robot_restrict_default(void){
322 return "timelineX,diff,annotate,fileage,file,finfo,reports,"
323 "tree,hexdump,download";
324 }
325
326 /*
327 ** Return true if zTag matches one of the tags in the robot-restrict
328 ** setting.
329
+7 -8
--- src/setup.c
+++ src/setup.c
@@ -488,12 +488,11 @@
488488
@ <p>
489489
@ &emsp;&emsp;&emsp;<tt>%h(robot_restrict_default())</tt>
490490
@ <p>
491491
@ The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
492492
@ /vpatch. The "annotate" tag covers /annotate and also /blame and
493
- @ /praise. The "zip" covers itself and also /tarball and /sqlar. The
494
- @ "ziplink" page means any page that contains hyperlinks to a "zip" page.
493
+ @ /praise. The "zip" covers itself and also /tarball and /sqlar.
495494
@ If a tag has an "X" character appended (ex: "timelineX") then it only
496495
@ applies if query parameters are such that the page is expensive
497496
@ and/or unusual. In all other case, the tag should exactly match
498497
@ the page name.
499498
@
@@ -1428,30 +1427,30 @@
14281427
@ (Property: sitemap-extra)
14291428
@ <p>
14301429
textarea_attribute("Custom Sitemap Entries", 8, 80,
14311430
"sitemap-extra", "smextra", "", 0);
14321431
@ <hr>
1433
- @ <p>Configuration for the <a href="%R/tarlist">/tarlist</a> page.
1432
+ @ <p>Configuration for the <a href="%R/download">/download</a> page.
14341433
@ The value is a TCL list divided into pairs.
14351434
@ <ol>
14361435
@ <li> The first term of each pair is an integer (N).
14371436
@ <li> The second term of each pair is a glob pattern (PATTERN).
14381437
@ </ol>
14391438
@ For each pair, the most recent N check-ins that have a tag that
1440
- @ matches PATTERN are included in on the /tarlist page. The special
1439
+ @ matches PATTERN are included in on the /download page. The special
14411440
@ pattern of "OPEN-LEAF" matches all open leaf check-ins. Example:
14421441
@ <blockquote><tt>1 trunk 3 release 5 OPEN-LEAF</tt></blockquote>
14431442
@ The example pattern above shows the union of the most recent trunk
14441443
@ check-in, the 5 most recent open leaf check-ins, and the 3 most
14451444
@ recent check-ins tagged with "release".
14461445
@ <p>
1447
- @ The /tarlist page is omitted from the <a href="%R/sitemap">/sitemap</a>
1446
+ @ The /download page is omitted from the <a href="%R/sitemap">/sitemap</a>
14481447
@ if the first token is "0" or "off" or "no". The default value is "off".
1449
- @ (Property: suggested-tarlist)
1448
+ @ (Property: <a href="%R/help/suggested-downloads">suggested-downloads</a>)
14501449
@ <p>
1451
- textarea_attribute("Check-ins To Show On /tarlist", 2, 80,
1452
- "suggested-tarlist", "sgtrlst", "off", 0);
1450
+ textarea_attribute("Suggested Downloads", 2, 80,
1451
+ "suggested-downloads", "sgtrlst", "off", 0);
14531452
@ <hr>
14541453
@ <p><input type="submit" name="submit" value="Apply Changes"></p>
14551454
@ </div></form>
14561455
db_end_transaction(0);
14571456
style_finish_page();
14581457
--- src/setup.c
+++ src/setup.c
@@ -488,12 +488,11 @@
488 @ <p>
489 @ &emsp;&emsp;&emsp;<tt>%h(robot_restrict_default())</tt>
490 @ <p>
491 @ The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
492 @ /vpatch. The "annotate" tag covers /annotate and also /blame and
493 @ /praise. The "zip" covers itself and also /tarball and /sqlar. The
494 @ "ziplink" page means any page that contains hyperlinks to a "zip" page.
495 @ If a tag has an "X" character appended (ex: "timelineX") then it only
496 @ applies if query parameters are such that the page is expensive
497 @ and/or unusual. In all other case, the tag should exactly match
498 @ the page name.
499 @
@@ -1428,30 +1427,30 @@
1428 @ (Property: sitemap-extra)
1429 @ <p>
1430 textarea_attribute("Custom Sitemap Entries", 8, 80,
1431 "sitemap-extra", "smextra", "", 0);
1432 @ <hr>
1433 @ <p>Configuration for the <a href="%R/tarlist">/tarlist</a> page.
1434 @ The value is a TCL list divided into pairs.
1435 @ <ol>
1436 @ <li> The first term of each pair is an integer (N).
1437 @ <li> The second term of each pair is a glob pattern (PATTERN).
1438 @ </ol>
1439 @ For each pair, the most recent N check-ins that have a tag that
1440 @ matches PATTERN are included in on the /tarlist page. The special
1441 @ pattern of "OPEN-LEAF" matches all open leaf check-ins. Example:
1442 @ <blockquote><tt>1 trunk 3 release 5 OPEN-LEAF</tt></blockquote>
1443 @ The example pattern above shows the union of the most recent trunk
1444 @ check-in, the 5 most recent open leaf check-ins, and the 3 most
1445 @ recent check-ins tagged with "release".
1446 @ <p>
1447 @ The /tarlist page is omitted from the <a href="%R/sitemap">/sitemap</a>
1448 @ if the first token is "0" or "off" or "no". The default value is "off".
1449 @ (Property: suggested-tarlist)
1450 @ <p>
1451 textarea_attribute("Check-ins To Show On /tarlist", 2, 80,
1452 "suggested-tarlist", "sgtrlst", "off", 0);
1453 @ <hr>
1454 @ <p><input type="submit" name="submit" value="Apply Changes"></p>
1455 @ </div></form>
1456 db_end_transaction(0);
1457 style_finish_page();
1458
--- src/setup.c
+++ src/setup.c
@@ -488,12 +488,11 @@
488 @ <p>
489 @ &emsp;&emsp;&emsp;<tt>%h(robot_restrict_default())</tt>
490 @ <p>
491 @ The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
492 @ /vpatch. The "annotate" tag covers /annotate and also /blame and
493 @ /praise. The "zip" covers itself and also /tarball and /sqlar.
 
494 @ If a tag has an "X" character appended (ex: "timelineX") then it only
495 @ applies if query parameters are such that the page is expensive
496 @ and/or unusual. In all other case, the tag should exactly match
497 @ the page name.
498 @
@@ -1428,30 +1427,30 @@
1427 @ (Property: sitemap-extra)
1428 @ <p>
1429 textarea_attribute("Custom Sitemap Entries", 8, 80,
1430 "sitemap-extra", "smextra", "", 0);
1431 @ <hr>
1432 @ <p>Configuration for the <a href="%R/download">/download</a> page.
1433 @ The value is a TCL list divided into pairs.
1434 @ <ol>
1435 @ <li> The first term of each pair is an integer (N).
1436 @ <li> The second term of each pair is a glob pattern (PATTERN).
1437 @ </ol>
1438 @ For each pair, the most recent N check-ins that have a tag that
1439 @ matches PATTERN are included in on the /download page. The special
1440 @ pattern of "OPEN-LEAF" matches all open leaf check-ins. Example:
1441 @ <blockquote><tt>1 trunk 3 release 5 OPEN-LEAF</tt></blockquote>
1442 @ The example pattern above shows the union of the most recent trunk
1443 @ check-in, the 5 most recent open leaf check-ins, and the 3 most
1444 @ recent check-ins tagged with "release".
1445 @ <p>
1446 @ The /download page is omitted from the <a href="%R/sitemap">/sitemap</a>
1447 @ if the first token is "0" or "off" or "no". The default value is "off".
1448 @ (Property: <a href="%R/help/suggested-downloads">suggested-downloads</a>)
1449 @ <p>
1450 textarea_attribute("Suggested Downloads", 2, 80,
1451 "suggested-downloads", "sgtrlst", "off", 0);
1452 @ <hr>
1453 @ <p><input type="submit" name="submit" value="Apply Changes"></p>
1454 @ </div></form>
1455 db_end_transaction(0);
1456 style_finish_page();
1457
+2 -2
--- src/sitemap.c
+++ src/sitemap.c
@@ -133,12 +133,12 @@
133133
if( g.perm.Write && zEditGlob[0]!=0 ){
134134
@ <li>%z(href("%R/fileedit"))On-line File Editor</li>
135135
}
136136
@ </ul>
137137
}
138
- if( g.perm.Zip && db_get_boolean("suggested-tarlist",0)!=0 ){
139
- @ <li>%z(href("%R/tarlist"))Tarballs and ZIPs</a>
138
+ if( g.perm.Zip && db_get_boolean("suggested-downloads",0)!=0 ){
139
+ @ <li>%z(href("%R/download"))Tarballs and ZIPs</a>
140140
}
141141
if( g.perm.Read ){
142142
@ <li>%z(href("%R/timeline"))Project Timeline</a>
143143
@ <ul>
144144
@ <li>%z(href("%R/reports"))Activity Reports</a></li>
145145
--- src/sitemap.c
+++ src/sitemap.c
@@ -133,12 +133,12 @@
133 if( g.perm.Write && zEditGlob[0]!=0 ){
134 @ <li>%z(href("%R/fileedit"))On-line File Editor</li>
135 }
136 @ </ul>
137 }
138 if( g.perm.Zip && db_get_boolean("suggested-tarlist",0)!=0 ){
139 @ <li>%z(href("%R/tarlist"))Tarballs and ZIPs</a>
140 }
141 if( g.perm.Read ){
142 @ <li>%z(href("%R/timeline"))Project Timeline</a>
143 @ <ul>
144 @ <li>%z(href("%R/reports"))Activity Reports</a></li>
145
--- src/sitemap.c
+++ src/sitemap.c
@@ -133,12 +133,12 @@
133 if( g.perm.Write && zEditGlob[0]!=0 ){
134 @ <li>%z(href("%R/fileedit"))On-line File Editor</li>
135 }
136 @ </ul>
137 }
138 if( g.perm.Zip && db_get_boolean("suggested-downloads",0)!=0 ){
139 @ <li>%z(href("%R/download"))Tarballs and ZIPs</a>
140 }
141 if( g.perm.Read ){
142 @ <li>%z(href("%R/timeline"))Project Timeline</a>
143 @ <ul>
144 @ <li>%z(href("%R/reports"))Activity Reports</a></li>
145
+30 -13
--- src/tar.c
+++ src/tar.c
@@ -964,14 +964,14 @@
964964
cgi_set_content(&tarball);
965965
cgi_set_content_type("application/x-compressed");
966966
}
967967
968968
/*
969
-** This routine is called for each check-in on the /tarlist page to
969
+** This routine is called for each check-in on the /download page to
970970
** construct the "extra" information after the description.
971971
*/
972
-void tarlist_extra(
972
+void download_extra(
973973
Stmt *pQuery, /* Current row of the timeline query */
974974
int tmFlags, /* Flags to www_print_timeline() */
975975
const char *zThisUser, /* Suppress links to this user */
976976
const char *zThisTag /* Suppress links to this tag */
977977
){
@@ -1012,14 +1012,14 @@
10121012
fossil_free(zNm);
10131013
}
10141014
}
10151015
10161016
/*
1017
-** SETTING: suggested-tarlist width=70 block-text
1017
+** SETTING: suggested-downloads width=70 block-text
10181018
**
10191019
** This setting controls the suggested tarball/ZIP downloads on the
1020
-** [[/tarlist]] page. The value is a TCL list. Each pair of items
1020
+** [[/download]] page. The value is a TCL list. Each pair of items
10211021
** defines a set of check-ins to be added to the suggestion list.
10221022
** The first item of each pair is an integer count (N) and second
10231023
** item is a tag GLOB pattern (PATTERN). For each pair, the most
10241024
** recent N check-ins that have a tag matching PATTERN are added
10251025
** to the list. The special pattern "OPEN-LEAF" matches any open
@@ -1027,22 +1027,22 @@
10271027
**
10281028
** Example:
10291029
**
10301030
** 3 OPEN-LEAF 3 release 1 trunk
10311031
**
1032
-** The value causes the /tarlist page to show the union of the 3
1032
+** The value causes the /download page to show the union of the 3
10331033
** most recent open leaves, the three most recent check-ins marked
10341034
** "release", and the single most recent trunk check-in.
10351035
*/
10361036
10371037
/*
1038
-** WEBPAGE: /tarlist
1038
+** WEBPAGE: /download
10391039
**
10401040
** Show a special no-graph timeline of recent important check-ins with
10411041
** an opportunity to pull tarballs and ZIPs.
10421042
*/
1043
-void tarlist_page(void){
1043
+void download_page(void){
10441044
Stmt q; /* The actual timeline query */
10451045
const char *zTarlistCfg; /* Configuration string */
10461046
char **azItem; /* Decomposed elements of zTarlistCfg */
10471047
int *anItem; /* Bytes in each term of azItem[] */
10481048
int nItem; /* Number of terms in azItem[] */
@@ -1050,16 +1050,15 @@
10501050
int tmFlags; /* Timeline display flags */
10511051
int n; /* Number of suggested downloads */
10521052
10531053
login_check_credentials();
10541054
if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
1055
- robot_restrict("ziplink");
10561055
10571056
style_set_current_feature("timeline");
1058
- style_header("Suggested Tarballs And ZIP Archives");
1057
+ style_header("Suggested Downloads");
10591058
1060
- zTarlistCfg = db_get("suggested-tarlist","off");
1059
+ zTarlistCfg = db_get("suggested-downloads","off");
10611060
db_multi_exec(
10621061
"CREATE TEMP TABLE tarlist(rid INTEGER PRIMARY KEY);"
10631062
);
10641063
if( !g.interp ) Th_FossilInit(0);
10651064
Th_SplitList(g.interp, zTarlistCfg, (int)strlen(zTarlistCfg),
@@ -1105,21 +1104,39 @@
11051104
11061105
n = db_int(0, "SELECT count(*) FROM tarlist");
11071106
if( n==0 ){
11081107
@ <h2>No tarball/ZIP suggestions are available at this time</h2>
11091108
}else{
1110
- @ <h2>%d(n) Tarball/ZIP Download Suggestions:</h2>
1109
+ @ <h2>%d(n) Tarball/ZIP Download Suggestion%s(n>1?"s":""):</h2>
11111110
db_prepare(&q,
11121111
"%s AND blob.rid IN tarlist ORDER BY event.mtime DESC",
11131112
timeline_query_for_www()
11141113
);
11151114
11161115
tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL | TIMELINE_COLUMNAR
11171116
| TIMELINE_BRCOLOR;
1118
- www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, tarlist_extra);
1117
+ www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, download_extra);
11191118
db_finalize(&q);
11201119
}
1120
+ if( g.perm.Clone ){
1121
+ const char *zNm = db_get("short-project-name","clone");
1122
+ @ <hr>
1123
+ @ <h2>You Can Clone This Repository</h2>
1124
+ @ <p>A clone gives you local access to all historical content.
1125
+ @ Cloning is a bandwidth- and CPU-efficient alternative to extracting
1126
+ @ multiple tarballs and ZIP archives for users who need access to many
1127
+ @ different check-ins.
1128
+ @
1129
+ @ <p>Clone this repository by running a command like the following:
1130
+ @ <blockquote><pre>
1131
+ @ fossil clone %s(g.zBaseURL) %h(zNm).fossil
1132
+ @ </pre></blockquote>
1133
+ @ <p>Do a web search for "fossil clone" or similar to find additional
1134
+ @ information about using a cloned Fossil repository. Or ask your
1135
+ @ favorite AI how to extract content from a Fossil clone.
1136
+ }
1137
+
11211138
style_finish_page();
11221139
}
11231140
11241141
/*
11251142
** WEBPAGE: rchvdwnld
@@ -1140,11 +1157,11 @@
11401157
int nUuid;
11411158
int rid;
11421159
login_check_credentials();
11431160
if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
11441161
robot_restrict("zip");
1145
- robot_restrict("ziplink");
1162
+ robot_restrict("download");
11461163
11471164
zUuid = P("name");
11481165
if( zUuid==0
11491166
|| (nUuid = (int)strlen(zUuid))<6
11501167
|| !validate16(zUuid,-1)
11511168
--- src/tar.c
+++ src/tar.c
@@ -964,14 +964,14 @@
964 cgi_set_content(&tarball);
965 cgi_set_content_type("application/x-compressed");
966 }
967
968 /*
969 ** This routine is called for each check-in on the /tarlist page to
970 ** construct the "extra" information after the description.
971 */
972 void tarlist_extra(
973 Stmt *pQuery, /* Current row of the timeline query */
974 int tmFlags, /* Flags to www_print_timeline() */
975 const char *zThisUser, /* Suppress links to this user */
976 const char *zThisTag /* Suppress links to this tag */
977 ){
@@ -1012,14 +1012,14 @@
1012 fossil_free(zNm);
1013 }
1014 }
1015
1016 /*
1017 ** SETTING: suggested-tarlist width=70 block-text
1018 **
1019 ** This setting controls the suggested tarball/ZIP downloads on the
1020 ** [[/tarlist]] page. The value is a TCL list. Each pair of items
1021 ** defines a set of check-ins to be added to the suggestion list.
1022 ** The first item of each pair is an integer count (N) and second
1023 ** item is a tag GLOB pattern (PATTERN). For each pair, the most
1024 ** recent N check-ins that have a tag matching PATTERN are added
1025 ** to the list. The special pattern "OPEN-LEAF" matches any open
@@ -1027,22 +1027,22 @@
1027 **
1028 ** Example:
1029 **
1030 ** 3 OPEN-LEAF 3 release 1 trunk
1031 **
1032 ** The value causes the /tarlist page to show the union of the 3
1033 ** most recent open leaves, the three most recent check-ins marked
1034 ** "release", and the single most recent trunk check-in.
1035 */
1036
1037 /*
1038 ** WEBPAGE: /tarlist
1039 **
1040 ** Show a special no-graph timeline of recent important check-ins with
1041 ** an opportunity to pull tarballs and ZIPs.
1042 */
1043 void tarlist_page(void){
1044 Stmt q; /* The actual timeline query */
1045 const char *zTarlistCfg; /* Configuration string */
1046 char **azItem; /* Decomposed elements of zTarlistCfg */
1047 int *anItem; /* Bytes in each term of azItem[] */
1048 int nItem; /* Number of terms in azItem[] */
@@ -1050,16 +1050,15 @@
1050 int tmFlags; /* Timeline display flags */
1051 int n; /* Number of suggested downloads */
1052
1053 login_check_credentials();
1054 if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
1055 robot_restrict("ziplink");
1056
1057 style_set_current_feature("timeline");
1058 style_header("Suggested Tarballs And ZIP Archives");
1059
1060 zTarlistCfg = db_get("suggested-tarlist","off");
1061 db_multi_exec(
1062 "CREATE TEMP TABLE tarlist(rid INTEGER PRIMARY KEY);"
1063 );
1064 if( !g.interp ) Th_FossilInit(0);
1065 Th_SplitList(g.interp, zTarlistCfg, (int)strlen(zTarlistCfg),
@@ -1105,21 +1104,39 @@
1105
1106 n = db_int(0, "SELECT count(*) FROM tarlist");
1107 if( n==0 ){
1108 @ <h2>No tarball/ZIP suggestions are available at this time</h2>
1109 }else{
1110 @ <h2>%d(n) Tarball/ZIP Download Suggestions:</h2>
1111 db_prepare(&q,
1112 "%s AND blob.rid IN tarlist ORDER BY event.mtime DESC",
1113 timeline_query_for_www()
1114 );
1115
1116 tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL | TIMELINE_COLUMNAR
1117 | TIMELINE_BRCOLOR;
1118 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, tarlist_extra);
1119 db_finalize(&q);
1120 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1121 style_finish_page();
1122 }
1123
1124 /*
1125 ** WEBPAGE: rchvdwnld
@@ -1140,11 +1157,11 @@
1140 int nUuid;
1141 int rid;
1142 login_check_credentials();
1143 if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
1144 robot_restrict("zip");
1145 robot_restrict("ziplink");
1146
1147 zUuid = P("name");
1148 if( zUuid==0
1149 || (nUuid = (int)strlen(zUuid))<6
1150 || !validate16(zUuid,-1)
1151
--- src/tar.c
+++ src/tar.c
@@ -964,14 +964,14 @@
964 cgi_set_content(&tarball);
965 cgi_set_content_type("application/x-compressed");
966 }
967
968 /*
969 ** This routine is called for each check-in on the /download page to
970 ** construct the "extra" information after the description.
971 */
972 void download_extra(
973 Stmt *pQuery, /* Current row of the timeline query */
974 int tmFlags, /* Flags to www_print_timeline() */
975 const char *zThisUser, /* Suppress links to this user */
976 const char *zThisTag /* Suppress links to this tag */
977 ){
@@ -1012,14 +1012,14 @@
1012 fossil_free(zNm);
1013 }
1014 }
1015
1016 /*
1017 ** SETTING: suggested-downloads width=70 block-text
1018 **
1019 ** This setting controls the suggested tarball/ZIP downloads on the
1020 ** [[/download]] page. The value is a TCL list. Each pair of items
1021 ** defines a set of check-ins to be added to the suggestion list.
1022 ** The first item of each pair is an integer count (N) and second
1023 ** item is a tag GLOB pattern (PATTERN). For each pair, the most
1024 ** recent N check-ins that have a tag matching PATTERN are added
1025 ** to the list. The special pattern "OPEN-LEAF" matches any open
@@ -1027,22 +1027,22 @@
1027 **
1028 ** Example:
1029 **
1030 ** 3 OPEN-LEAF 3 release 1 trunk
1031 **
1032 ** The value causes the /download page to show the union of the 3
1033 ** most recent open leaves, the three most recent check-ins marked
1034 ** "release", and the single most recent trunk check-in.
1035 */
1036
1037 /*
1038 ** WEBPAGE: /download
1039 **
1040 ** Show a special no-graph timeline of recent important check-ins with
1041 ** an opportunity to pull tarballs and ZIPs.
1042 */
1043 void download_page(void){
1044 Stmt q; /* The actual timeline query */
1045 const char *zTarlistCfg; /* Configuration string */
1046 char **azItem; /* Decomposed elements of zTarlistCfg */
1047 int *anItem; /* Bytes in each term of azItem[] */
1048 int nItem; /* Number of terms in azItem[] */
@@ -1050,16 +1050,15 @@
1050 int tmFlags; /* Timeline display flags */
1051 int n; /* Number of suggested downloads */
1052
1053 login_check_credentials();
1054 if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
 
1055
1056 style_set_current_feature("timeline");
1057 style_header("Suggested Downloads");
1058
1059 zTarlistCfg = db_get("suggested-downloads","off");
1060 db_multi_exec(
1061 "CREATE TEMP TABLE tarlist(rid INTEGER PRIMARY KEY);"
1062 );
1063 if( !g.interp ) Th_FossilInit(0);
1064 Th_SplitList(g.interp, zTarlistCfg, (int)strlen(zTarlistCfg),
@@ -1105,21 +1104,39 @@
1104
1105 n = db_int(0, "SELECT count(*) FROM tarlist");
1106 if( n==0 ){
1107 @ <h2>No tarball/ZIP suggestions are available at this time</h2>
1108 }else{
1109 @ <h2>%d(n) Tarball/ZIP Download Suggestion%s(n>1?"s":""):</h2>
1110 db_prepare(&q,
1111 "%s AND blob.rid IN tarlist ORDER BY event.mtime DESC",
1112 timeline_query_for_www()
1113 );
1114
1115 tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL | TIMELINE_COLUMNAR
1116 | TIMELINE_BRCOLOR;
1117 www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, download_extra);
1118 db_finalize(&q);
1119 }
1120 if( g.perm.Clone ){
1121 const char *zNm = db_get("short-project-name","clone");
1122 @ <hr>
1123 @ <h2>You Can Clone This Repository</h2>
1124 @ <p>A clone gives you local access to all historical content.
1125 @ Cloning is a bandwidth- and CPU-efficient alternative to extracting
1126 @ multiple tarballs and ZIP archives for users who need access to many
1127 @ different check-ins.
1128 @
1129 @ <p>Clone this repository by running a command like the following:
1130 @ <blockquote><pre>
1131 @ fossil clone %s(g.zBaseURL) %h(zNm).fossil
1132 @ </pre></blockquote>
1133 @ <p>Do a web search for "fossil clone" or similar to find additional
1134 @ information about using a cloned Fossil repository. Or ask your
1135 @ favorite AI how to extract content from a Fossil clone.
1136 }
1137
1138 style_finish_page();
1139 }
1140
1141 /*
1142 ** WEBPAGE: rchvdwnld
@@ -1140,11 +1157,11 @@
1157 int nUuid;
1158 int rid;
1159 login_check_credentials();
1160 if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
1161 robot_restrict("zip");
1162 robot_restrict("download");
1163
1164 zUuid = P("name");
1165 if( zUuid==0
1166 || (nUuid = (int)strlen(zUuid))<6
1167 || !validate16(zUuid,-1)
1168

Keyboard Shortcuts

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