I was trying to pull only a specific file from the fossil scm but the only reply I got was
Fossil internal error: repository does not exist or is in an unreadable directory: blahblah
the commands I tried to use was
fossil pull "file" -R "http://user@ip/folder/to/fossil"
fossil pull "" -R "http://user@ip/folder/to/fossil/file"
I don't understand the documentation. If I wanted to just download a specific file without opening and cloning the repo, how would I do that?
You can't pull a single file from a fossil server. Pulling retrieves ALL the (new) changes in the remote repository into your local repository. It's the read part of the
sync
command, and it requires you to have cloned the repository first. (The-R
command-line option always indicates a local repository).But it seems to me that what you want, is simply to download a specific file from the remote repository. To do that, just use your browser to navigate the fossil server's web site (I'm using Fossil's own source code repository as an example):
http://fossil-scm.org/fossil/dir?ci=trunk
http://fossil-scm.org/fossil/tree?ci=trunk
and click on the file you want. On the page displaying the file, there's a
Download
button which will let you download that version of that specific file.If the file is not text or HTML, you can just download the file using http, using a so-called documentation URL:
For example, let's say you want to download the
trunk
version of the filewww/concept1.gif
from the main Fossil repository. That can be achieved by downloading the following URL:http://fossil-scm.org/fossil/doc/trunk/www/concept1.gif
That URL is composed as follows:
http://fossil-scm.org/fossil
is the repository's location;/doc/
indicates that you want to access the repository's files directly;trunk
indicates the check-in you want to access. This can also be a check-in identifier (like e319e8e870) or a tag (like pending-review). If you specify a tag or branch name, you'll get the file associated with the last check-in with that tag, respectively in that branch;/www/concept1.gif
is the path within the repository to the file you want to access.Note that if the file you requested is a wiki, text, or HTML page, fossil will add its header and footer to it.