Fossil SCM
Remove the (unlinked and forgotten) /download page. Convert it into a new page named /howtoclone which simply provides guidance for the correct command-line used to clone the repository.
Commit
7d8e30dd46a614c7aad7e19d804f574b1d66389d1aeef9329f4c18a58ed46f94
Parent
3d63613a7e7afac…
1 file changed
+7
-27
+7
-27
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -405,40 +405,18 @@ | ||
| 405 | 405 | db_protect_pop(); |
| 406 | 406 | } |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | /* |
| 410 | -** WEBPAGE: download | |
| 410 | +** WEBPAGE: howtoclone | |
| 411 | 411 | ** |
| 412 | -** Provide a simple page that enables newbies to download the latest tarball or | |
| 413 | -** ZIP archive, and provides instructions on how to clone. | |
| 412 | +** Provide instructions on how to clone this repository. | |
| 414 | 413 | */ |
| 415 | -void download_page(void){ | |
| 414 | +void howtoclone_page(void){ | |
| 416 | 415 | login_check_credentials(); |
| 417 | 416 | cgi_check_for_malice(); |
| 418 | - style_header("Download Page"); | |
| 419 | - if( !g.perm.Zip ){ | |
| 420 | - @ <p>Bummer. You do not have permission to download. | |
| 421 | - if( g.zLogin==0 || g.zLogin[0]==0 ){ | |
| 422 | - @ Maybe it would work better if you | |
| 423 | - @ %z(href("%R/login"))logged in</a>. | |
| 424 | - }else{ | |
| 425 | - @ Contact the site administrator and ask them to give | |
| 426 | - @ you "Download Zip" privileges. | |
| 427 | - } | |
| 428 | - }else{ | |
| 429 | - const char *zDLTag = db_get("download-tag","trunk"); | |
| 430 | - const char *zNm = db_get("short-project-name","download"); | |
| 431 | - char *zUrl = href("%R/zip/%t/%t.zip", zDLTag, zNm); | |
| 432 | - @ <p>ZIP Archive: %z(zUrl)%h(zNm).zip</a> | |
| 433 | - zUrl = href("%R/tarball/%t/%t.tar.gz", zDLTag, zNm); | |
| 434 | - @ <p>Tarball: %z(zUrl)%h(zNm).tar.gz</a> | |
| 435 | - if( g.zLogin!=0 ){ | |
| 436 | - zUrl = href("%R/sqlar/%t/%t.sqlar", zDLTag, zNm); | |
| 437 | - @ <p>SQLite Archive: %z(zUrl)%h(zNm).sqlar</a> | |
| 438 | - } | |
| 439 | - } | |
| 417 | + style_header("How To Clone This Repository"); | |
| 440 | 418 | if( !g.perm.Clone ){ |
| 441 | 419 | @ <p>You are not authorized to clone this repository. |
| 442 | 420 | if( g.zLogin==0 || g.zLogin[0]==0 ){ |
| 443 | 421 | @ Maybe you would be able to clone if you |
| 444 | 422 | @ %z(href("%R/login"))logged in</a>. |
| @@ -446,12 +424,14 @@ | ||
| 446 | 424 | @ Contact the site administrator and ask them to give |
| 447 | 425 | @ you "Clone" privileges in order to clone. |
| 448 | 426 | } |
| 449 | 427 | }else{ |
| 450 | 428 | const char *zNm = db_get("short-project-name","clone"); |
| 451 | - @ <p>Clone the repository using this command: | |
| 429 | + @ <p>Clone this repository by running a command like the following: | |
| 452 | 430 | @ <blockquote><pre> |
| 453 | 431 | @ fossil clone %s(g.zBaseURL) %h(zNm).fossil |
| 454 | 432 | @ </pre></blockquote> |
| 433 | + @ <p>Do a web search for "fossil clone" or similar to find additional | |
| 434 | + @ information about using a cloned Fossil repository. | |
| 455 | 435 | } |
| 456 | 436 | style_finish_page(); |
| 457 | 437 | } |
| 458 | 438 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -405,40 +405,18 @@ | |
| 405 | db_protect_pop(); |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | /* |
| 410 | ** WEBPAGE: download |
| 411 | ** |
| 412 | ** Provide a simple page that enables newbies to download the latest tarball or |
| 413 | ** ZIP archive, and provides instructions on how to clone. |
| 414 | */ |
| 415 | void download_page(void){ |
| 416 | login_check_credentials(); |
| 417 | cgi_check_for_malice(); |
| 418 | style_header("Download Page"); |
| 419 | if( !g.perm.Zip ){ |
| 420 | @ <p>Bummer. You do not have permission to download. |
| 421 | if( g.zLogin==0 || g.zLogin[0]==0 ){ |
| 422 | @ Maybe it would work better if you |
| 423 | @ %z(href("%R/login"))logged in</a>. |
| 424 | }else{ |
| 425 | @ Contact the site administrator and ask them to give |
| 426 | @ you "Download Zip" privileges. |
| 427 | } |
| 428 | }else{ |
| 429 | const char *zDLTag = db_get("download-tag","trunk"); |
| 430 | const char *zNm = db_get("short-project-name","download"); |
| 431 | char *zUrl = href("%R/zip/%t/%t.zip", zDLTag, zNm); |
| 432 | @ <p>ZIP Archive: %z(zUrl)%h(zNm).zip</a> |
| 433 | zUrl = href("%R/tarball/%t/%t.tar.gz", zDLTag, zNm); |
| 434 | @ <p>Tarball: %z(zUrl)%h(zNm).tar.gz</a> |
| 435 | if( g.zLogin!=0 ){ |
| 436 | zUrl = href("%R/sqlar/%t/%t.sqlar", zDLTag, zNm); |
| 437 | @ <p>SQLite Archive: %z(zUrl)%h(zNm).sqlar</a> |
| 438 | } |
| 439 | } |
| 440 | if( !g.perm.Clone ){ |
| 441 | @ <p>You are not authorized to clone this repository. |
| 442 | if( g.zLogin==0 || g.zLogin[0]==0 ){ |
| 443 | @ Maybe you would be able to clone if you |
| 444 | @ %z(href("%R/login"))logged in</a>. |
| @@ -446,12 +424,14 @@ | |
| 446 | @ Contact the site administrator and ask them to give |
| 447 | @ you "Clone" privileges in order to clone. |
| 448 | } |
| 449 | }else{ |
| 450 | const char *zNm = db_get("short-project-name","clone"); |
| 451 | @ <p>Clone the repository using this command: |
| 452 | @ <blockquote><pre> |
| 453 | @ fossil clone %s(g.zBaseURL) %h(zNm).fossil |
| 454 | @ </pre></blockquote> |
| 455 | } |
| 456 | style_finish_page(); |
| 457 | } |
| 458 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -405,40 +405,18 @@ | |
| 405 | db_protect_pop(); |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | /* |
| 410 | ** WEBPAGE: howtoclone |
| 411 | ** |
| 412 | ** Provide instructions on how to clone this repository. |
| 413 | */ |
| 414 | void howtoclone_page(void){ |
| 415 | login_check_credentials(); |
| 416 | cgi_check_for_malice(); |
| 417 | style_header("How To Clone This Repository"); |
| 418 | if( !g.perm.Clone ){ |
| 419 | @ <p>You are not authorized to clone this repository. |
| 420 | if( g.zLogin==0 || g.zLogin[0]==0 ){ |
| 421 | @ Maybe you would be able to clone if you |
| 422 | @ %z(href("%R/login"))logged in</a>. |
| @@ -446,12 +424,14 @@ | |
| 424 | @ Contact the site administrator and ask them to give |
| 425 | @ you "Clone" privileges in order to clone. |
| 426 | } |
| 427 | }else{ |
| 428 | const char *zNm = db_get("short-project-name","clone"); |
| 429 | @ <p>Clone this repository by running a command like the following: |
| 430 | @ <blockquote><pre> |
| 431 | @ fossil clone %s(g.zBaseURL) %h(zNm).fossil |
| 432 | @ </pre></blockquote> |
| 433 | @ <p>Do a web search for "fossil clone" or similar to find additional |
| 434 | @ information about using a cloned Fossil repository. |
| 435 | } |
| 436 | style_finish_page(); |
| 437 | } |
| 438 |