downloadfossil

Download latest version of a file in Fossil repo?


I see that Fossil UI allows the downloading of files ("artifacts") at the url /raw/directory/filename?name=artifactID. Is there a way to always get the latest version of the file without knowing the artifactID? I have tried ?name=trunk, ?name=current, ?name=, and ?name=tip. The only result I have gotten is to be returned to the homepage of the repository or given a text file with a listing of files in the repository. I also tried /doc/directory/filename, but that just gives me the contents of the file as a webpage, as intended.

For background, I have a script I would like to download without cloning the repository, but I would like a "permalink" to the latest version of the file.


Solution

  • What you are looking for is described here:

    http://fossil-scm.hwaci.com/fossil/doc/trunk/www/embeddeddoc.wiki

    In short, you would write <baseurl>/doc/tip/<filename>

    you can read <filename> above to be the path to your file, exactly as it is shown after "file" in the artifact content page. In other words: through the UI you go to "files" and navigate the the files you want link to. Once you are at the file, the header of the page will be "Artifact Content" and show you the as a full path after "File" (right at the top, after the artifact ID)