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".

drh 2009-10-31 17:01 trunk
Commit 8480dd38d2433035d07d137e95a454d9a5ba0515
1 file changed +7 -3
+7 -3
--- src/content.c
+++ src/content.c
@@ -311,15 +311,19 @@
311311
312312
return 0;
313313
}
314314
315315
/*
316
-** COMMAND: test-content-get
316
+** COMMAND: artifact
317
+**
318
+** Usage: %fossil artifact ARTIFACT-ID ?OUTPUT-FILENAME?
317319
**
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.
319323
*/
320
-void test_content_get_cmd(void){
324
+void artifact_cmd(void){
321325
int rid;
322326
Blob content;
323327
const char *zFile;
324328
if( g.argc!=4 && g.argc!=3 ) usage("RECORDID ?FILENAME?");
325329
zFile = g.argc==4 ? g.argv[3] : "-";
326330
--- 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

Keyboard Shortcuts

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