Fossil SCM
Add the "artifact" command for extracting the content of individual artifacts. The new "artifact" command is really just a renaming of "test-content-get".
Commit
8480dd38d2433035d07d137e95a454d9a5ba0515
Parent
8c8f8616a64ad48…
1 file changed
+7
-3
+7
-3
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -311,15 +311,19 @@ | ||
| 311 | 311 | |
| 312 | 312 | return 0; |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | /* |
| 316 | -** COMMAND: test-content-get | |
| 316 | +** COMMAND: artifact | |
| 317 | +** | |
| 318 | +** Usage: %fossil artifact ARTIFACT-ID ?OUTPUT-FILENAME? | |
| 317 | 319 | ** |
| 318 | -** Extract a blob from the database and write it into a file. | |
| 320 | +** Extract an artifact by its SHA1 hash and write the results on | |
| 321 | +** standard output, or if the optional 4th argument is given, in | |
| 322 | +** the named output file. | |
| 319 | 323 | */ |
| 320 | -void test_content_get_cmd(void){ | |
| 324 | +void artifact_cmd(void){ | |
| 321 | 325 | int rid; |
| 322 | 326 | Blob content; |
| 323 | 327 | const char *zFile; |
| 324 | 328 | if( g.argc!=4 && g.argc!=3 ) usage("RECORDID ?FILENAME?"); |
| 325 | 329 | zFile = g.argc==4 ? g.argv[3] : "-"; |
| 326 | 330 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -311,15 +311,19 @@ | |
| 311 | |
| 312 | return 0; |
| 313 | } |
| 314 | |
| 315 | /* |
| 316 | ** COMMAND: test-content-get |
| 317 | ** |
| 318 | ** Extract a blob from the database and write it into a file. |
| 319 | */ |
| 320 | void test_content_get_cmd(void){ |
| 321 | int rid; |
| 322 | Blob content; |
| 323 | const char *zFile; |
| 324 | if( g.argc!=4 && g.argc!=3 ) usage("RECORDID ?FILENAME?"); |
| 325 | zFile = g.argc==4 ? g.argv[3] : "-"; |
| 326 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -311,15 +311,19 @@ | |
| 311 | |
| 312 | return 0; |
| 313 | } |
| 314 | |
| 315 | /* |
| 316 | ** COMMAND: artifact |
| 317 | ** |
| 318 | ** Usage: %fossil artifact ARTIFACT-ID ?OUTPUT-FILENAME? |
| 319 | ** |
| 320 | ** Extract an artifact by its SHA1 hash and write the results on |
| 321 | ** standard output, or if the optional 4th argument is given, in |
| 322 | ** the named output file. |
| 323 | */ |
| 324 | void artifact_cmd(void){ |
| 325 | int rid; |
| 326 | Blob content; |
| 327 | const char *zFile; |
| 328 | if( g.argc!=4 && g.argc!=3 ) usage("RECORDID ?FILENAME?"); |
| 329 | zFile = g.argc==4 ? g.argv[3] : "-"; |
| 330 |