2

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.

jrtolle
  • 23
  • 3

1 Answers1

2

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)

FvD
  • 3,697
  • 1
  • 35
  • 53
  • Ok, I tried that, but it only gets me the contents of the file rendered as a webpage; I'm looking to download the actual file, not just look at the contents. – jrtolle Dec 11 '12 at 18:59
  • If the file name parses as something that can be displayed in the fossil web-UI then the only option I can think of is to "right-click and Save-Link-As". But maybe what you are looking for is possible too, hopefully someone else can give us a hint in that direction. – FvD Dec 11 '12 at 20:55
  • Actually, now I feel dumb. I was testing `/doc/tip` with a text file, which would get parsed as a webpage, but when I tried it with any code file, it works as intended. Thanks for pointing out the "parsing." – jrtolle Dec 12 '12 at 16:53