On Sat, 24 Nov 2012 13:12:38 +0100, Martin Gagnon <eme...@gmail.com> wrote:

On Sat, Nov 24, 2012 at 5:40 AM, j. v. d. hoff <veedeeh...@googlemail.com>wrote:

hi,

I found this statement in the `technical overview' section:

8<----------------------------**------------------------------**
-----------------------
When accessing the repository database using raw SQL and the fossil sql
command, the extension function "content()" with a single argument which is
the SHA1 hash of an artifact will return the complete undeleted and
uncompressed content of that artifact.
8<----------------------------**------------------------------**
-----------------------

since I don't know anything about `sql',I don't understand, how to use
this. could someone please explain what to do, exactly, in order to dump
the content of revision [1234] to stdout (i.e. achieve the functionality
of, e.g., `hg cat -r 1234 some_file.txt')?


Probably you are looking for: "fossil artifact"...

on second thought: yes, indeed but it was not obvious: I tried it on one
of the timeline entries but than one only gets the manifest of the respective
checkin. I did not realize immediately that I then need to locate the SHA1
of the respective file here (or from doing `finfo' for the file) and reissue
`fossil artifact' with _that_ hash again.

so thanks a lot for clarifying this.--

some feedback to the developers:

from a (new) user's perspective I find the procedure a bit tedious (compared to `hg cat -r 1234 myfile.txt').
I would say the typical scenario is:

-- identify from the `timeline' checkin-comments at which revision I want to look -- knowing the specific file contained in that checkin I'm interested in (usually only one file will have been modified, anyway), I would like to issue something like `fossil artifact [1234] -f myfile.txt'

having to use first `fsl finfo myfile.txt' in order to get the specific artifact hash of the file itself seems unnecessary overhea, especially, since the layout of the `finfo' output is ragged/confusing: the actually relevant SHA1 hash of the file is inlined into the checkin comment and appears at "random" positions in the output. it simply takes 1-2 seconds to long to find it I'd say.

would it not be a good idea (and probably easy?) to change the syntax of the artifact command to accomodate for such a "one line usage"? sure, not an important point, but still...


j.


$ fossil artifact --help
Usage: fossil artifact ARTIFACT-ID ?OUTPUT-FILENAME? ?OPTIONS?

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.

Options:
   -R|--repository FILE       Extract artifacts from repository FILE

See also: finfo




Regards,



--
Using Opera's revolutionary email client: http://www.opera.com/mail/
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to