Fossil SCM
Correct the /doc page to support read-only repositories
Commit
95edba6534dafc1f85e0def8ac87f2e04eaed43454048496b21ea7468498b306
Parent
2a615bed1184d6a…
2 files changed
+4
-4
+5
+4
-4
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -467,16 +467,16 @@ | ||
| 467 | 467 | */ |
| 468 | 468 | int doc_load_content(int vid, const char *zName, Blob *pContent){ |
| 469 | 469 | int rid; /* The RID of the file being loaded */ |
| 470 | 470 | if( !db_table_exists("repository","vcache") ){ |
| 471 | 471 | db_multi_exec( |
| 472 | - "CREATE TABLE IF NOT EXISTS vcache(\n" | |
| 472 | + "CREATE %s TABLE IF NOT EXISTS vcache(\n" | |
| 473 | 473 | " vid INTEGER, -- check-in ID\n" |
| 474 | 474 | " fname TEXT, -- filename\n" |
| 475 | 475 | " rid INTEGER, -- artifact ID\n" |
| 476 | 476 | " PRIMARY KEY(vid,fname)\n" |
| 477 | - ") WITHOUT ROWID" | |
| 477 | + ") WITHOUT ROWID", db_is_writeable("repository") ? "" : "TEMPORARY" | |
| 478 | 478 | ); |
| 479 | 479 | } |
| 480 | 480 | if( !db_exists("SELECT 1 FROM vcache WHERE vid=%d", vid) ){ |
| 481 | 481 | db_multi_exec( |
| 482 | 482 | "DELETE FROM vcache;\n" |
| @@ -496,17 +496,17 @@ | ||
| 496 | 496 | return rid; |
| 497 | 497 | } |
| 498 | 498 | |
| 499 | 499 | /* |
| 500 | 500 | ** Transfer content to the output. During the transfer, when text of |
| 501 | -** the followign form is seen: | |
| 501 | +** the following form is seen: | |
| 502 | 502 | ** |
| 503 | 503 | ** href="$ROOT/ |
| 504 | 504 | ** action="$ROOT/ |
| 505 | 505 | ** |
| 506 | 506 | ** Convert $ROOT to the root URI of the repository. Allow ' in place of " |
| 507 | -** and any case for href. | |
| 507 | +** and any case for href or action. | |
| 508 | 508 | */ |
| 509 | 509 | static void convert_href_and_output(Blob *pIn){ |
| 510 | 510 | int i, base; |
| 511 | 511 | int n = blob_size(pIn); |
| 512 | 512 | char *z = blob_buffer(pIn); |
| 513 | 513 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -467,16 +467,16 @@ | |
| 467 | */ |
| 468 | int doc_load_content(int vid, const char *zName, Blob *pContent){ |
| 469 | int rid; /* The RID of the file being loaded */ |
| 470 | if( !db_table_exists("repository","vcache") ){ |
| 471 | db_multi_exec( |
| 472 | "CREATE TABLE IF NOT EXISTS vcache(\n" |
| 473 | " vid INTEGER, -- check-in ID\n" |
| 474 | " fname TEXT, -- filename\n" |
| 475 | " rid INTEGER, -- artifact ID\n" |
| 476 | " PRIMARY KEY(vid,fname)\n" |
| 477 | ") WITHOUT ROWID" |
| 478 | ); |
| 479 | } |
| 480 | if( !db_exists("SELECT 1 FROM vcache WHERE vid=%d", vid) ){ |
| 481 | db_multi_exec( |
| 482 | "DELETE FROM vcache;\n" |
| @@ -496,17 +496,17 @@ | |
| 496 | return rid; |
| 497 | } |
| 498 | |
| 499 | /* |
| 500 | ** Transfer content to the output. During the transfer, when text of |
| 501 | ** the followign form is seen: |
| 502 | ** |
| 503 | ** href="$ROOT/ |
| 504 | ** action="$ROOT/ |
| 505 | ** |
| 506 | ** Convert $ROOT to the root URI of the repository. Allow ' in place of " |
| 507 | ** and any case for href. |
| 508 | */ |
| 509 | static void convert_href_and_output(Blob *pIn){ |
| 510 | int i, base; |
| 511 | int n = blob_size(pIn); |
| 512 | char *z = blob_buffer(pIn); |
| 513 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -467,16 +467,16 @@ | |
| 467 | */ |
| 468 | int doc_load_content(int vid, const char *zName, Blob *pContent){ |
| 469 | int rid; /* The RID of the file being loaded */ |
| 470 | if( !db_table_exists("repository","vcache") ){ |
| 471 | db_multi_exec( |
| 472 | "CREATE %s TABLE IF NOT EXISTS vcache(\n" |
| 473 | " vid INTEGER, -- check-in ID\n" |
| 474 | " fname TEXT, -- filename\n" |
| 475 | " rid INTEGER, -- artifact ID\n" |
| 476 | " PRIMARY KEY(vid,fname)\n" |
| 477 | ") WITHOUT ROWID", db_is_writeable("repository") ? "" : "TEMPORARY" |
| 478 | ); |
| 479 | } |
| 480 | if( !db_exists("SELECT 1 FROM vcache WHERE vid=%d", vid) ){ |
| 481 | db_multi_exec( |
| 482 | "DELETE FROM vcache;\n" |
| @@ -496,17 +496,17 @@ | |
| 496 | return rid; |
| 497 | } |
| 498 | |
| 499 | /* |
| 500 | ** Transfer content to the output. During the transfer, when text of |
| 501 | ** the following form is seen: |
| 502 | ** |
| 503 | ** href="$ROOT/ |
| 504 | ** action="$ROOT/ |
| 505 | ** |
| 506 | ** Convert $ROOT to the root URI of the repository. Allow ' in place of " |
| 507 | ** and any case for href or action. |
| 508 | */ |
| 509 | static void convert_href_and_output(Blob *pIn){ |
| 510 | int i, base; |
| 511 | int n = blob_size(pIn); |
| 512 | char *z = blob_buffer(pIn); |
| 513 |
+5
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -1,7 +1,12 @@ | ||
| 1 | 1 | <title>Change Log</title> |
| 2 | 2 | |
| 3 | +<a name='v2_4'></a> | |
| 4 | +<h2>Changes for Version 2.4 (TBD)</h2> | |
| 5 | + | |
| 6 | + * Correct the [/help?cmd=/doc|/doc] page to support read-only repositories. | |
| 7 | + | |
| 3 | 8 | <a name='v2_3'></a> |
| 4 | 9 | <h2>Changes for Version 2.3 (2017-07-21)</h2> |
| 5 | 10 | |
| 6 | 11 | * Update the built-in SQLite to version 3.20.0 (beta). |
| 7 | 12 | * Update internal Unicode character tables, used in regular expression |
| 8 | 13 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,7 +1,12 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <a name='v2_3'></a> |
| 4 | <h2>Changes for Version 2.3 (2017-07-21)</h2> |
| 5 | |
| 6 | * Update the built-in SQLite to version 3.20.0 (beta). |
| 7 | * Update internal Unicode character tables, used in regular expression |
| 8 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,7 +1,12 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <a name='v2_4'></a> |
| 4 | <h2>Changes for Version 2.4 (TBD)</h2> |
| 5 | |
| 6 | * Correct the [/help?cmd=/doc|/doc] page to support read-only repositories. |
| 7 | |
| 8 | <a name='v2_3'></a> |
| 9 | <h2>Changes for Version 2.3 (2017-07-21)</h2> |
| 10 | |
| 11 | * Update the built-in SQLite to version 3.20.0 (beta). |
| 12 | * Update internal Unicode character tables, used in regular expression |
| 13 |