Fossil

Check-in [8480dd38]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the "artifact" command for extracting the content of individual artifacts. The new "artifact" command is really just a renaming of "test-content-get".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8480dd38d2433035d07d137e95a454d9a5ba0515
User & Date: drh 2009-10-31 17:01:35
Context
2009-11-01
19:25
Update to the latest version of SQLite (3.6.20rc1) and fix some compiler warnings. check-in: dffe11c2 user: drh tags: trunk
2009-10-31
17:01
Add the "artifact" command for extracting the content of individual artifacts. The new "artifact" command is really just a renaming of "test-content-get". check-in: 8480dd38 user: drh tags: trunk
15:07
Add an "finfo" command to give file history. check-in: 8c8f8616 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/content.c.

309
310
311
312
313
314
315
316
317
318




319
320
321
322
323
324
325
326
327
    fossil_panic("could not parse manifest for revision: %s", revision);
  }
  
  return 0;
}

/*
** COMMAND:  test-content-get
**
** Extract a blob from the database and write it into a file.




*/
void test_content_get_cmd(void){
  int rid;
  Blob content;
  const char *zFile;
  if( g.argc!=4 && g.argc!=3 ) usage("RECORDID ?FILENAME?");
  zFile = g.argc==4 ? g.argv[3] : "-";
  db_must_be_within_tree();
  rid = name_to_rid(g.argv[2]);







|

|
>
>
>
>

|







309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
    fossil_panic("could not parse manifest for revision: %s", revision);
  }
  
  return 0;
}

/*
** COMMAND:  artifact
**
** Usage: %fossil artifact ARTIFACT-ID  ?OUTPUT-FILENAME?
**
** Extract an artifact by its SHA1 hash and write the results on
** standard output, or if the optional 4th argument is given, in
** the named output file.
*/
void artifact_cmd(void){
  int rid;
  Blob content;
  const char *zFile;
  if( g.argc!=4 && g.argc!=3 ) usage("RECORDID ?FILENAME?");
  zFile = g.argc==4 ? g.argv[3] : "-";
  db_must_be_within_tree();
  rid = name_to_rid(g.argv[2]);