How to avoid creating local repo?
(1) By WuMing2 on 2025-10-15 05:26:29 [link] [source]
cvs co —> local copy w/o repo svn co —> local copy w/o repo git checkout —> local copy w/o repo fossil ? I will not contribute to a project. Just compiling the most recent version. Thanks for sharing.
(2.1) By Stephan Beal (stephan) on 2025-10-15 05:44:21 edited from 2.0 in reply to 1 [link] [source]
How to avoid creating local repo?
You can't. Aside from the sync protocol itself, fossil works exclusively with local copies of repositories.
Edit: an alternative is to use the project's /zip page to download a snapshot of one specific version, but that has to be repeated for each new version. It would likely be more space- and bandwidth-efficient, long-term, to clone the repository.
(3) By WuMing2 on 2025-10-15 06:31:56 in reply to 2.1 [link] [source]
clone the repository
Obtaining all versions and not the last one only. Correct?
(4) By Stephan Beal (stephan) on 2025-10-15 07:12:53 in reply to 3 [link] [source]
Obtaining all versions and not the last one only. Correct?
Correct. We would like for fossil to support "shallow clones" (storing only the branches or versions it strictly needs to for local work) but doing so would require a significant rework, as its internals very much depend on having complete access to the history.
(5.1) By WuMing2 on 2025-10-15 07:46:51 edited from 5.0 in reply to 4 [link] [source]
fossil tarball as git archive?
its internals very much depend on having complete access to the history
I understand but don’t really need any versioning function. Just the code. And the next time, if ever, again.
use the project's /zip page to download a snapshot
Unfortunately project doesn’t appear to offer pre-made zip or tarball. At least I could not find it in the files list or hamburger button.
(7) By Stephan Beal (stephan) on 2025-10-15 08:43:54 in reply to 5.1 [link] [source]
Unfortunately project doesn’t appear to offer pre-made zip or tarball.
/zip is a page fossil provides which downloads a zip of a specific version of your choice.
(8) By WuMing2 on 2025-10-15 08:50:36 in reply to 7 [link] [source]
/zip is a page fossil provides
Nice. Thanks. Alternative to fossil tarball?
(10) By Stephan Beal (stephan) on 2025-10-15 08:56:25 in reply to 8 [link] [source]
Alternative to fossil tarball?
They're identical except that one emits a tar.gz and one emits a zip.
(11.1) By WuMing2 on 2025-10-15 09:04:58 edited from 11.0 in reply to 10 [link] [source]
There’s also fossil zip which I assume is called by the ui. Edit: /tarball also.
(12) By Trevor (MelvaigT) on 2025-10-15 10:29:08 in reply to 11.1 [link] [source]
Why www.fossil-scm.com instead of fossil-scm.org in those URLs? Firefox complains about the certificate because it isn't valid for that host.
I have not attempted to check if www.fossil-scm.com is a genuine alias that has been left off a (recently created) certificate, or it is in fact a rogue site of some sort. Generally I go for confusion rather than conspiracy, but one day I'll be wrong.
(14) By Daniel Dumitriu (danield) on 2025-10-15 10:58:41 in reply to 12 [link] [source]
Maybe it's your cache, but (at least) the current certificate has www.fossil-scm.org as alternative name:
Not Before: Oct 4 01:09:37 2025 GMT
Not After : Jan 2 01:09:36 2026 GMT
Subject: CN=a1.sqlite.org
X509v3 Subject Alternative Name: [...] DNS:www.fossil-scm.org [...]
(15) By Stephan Beal (stephan) on 2025-10-15 11:01:32 in reply to 12 [link] [source]
I have not attempted to check if www.fossil-scm.com is a genuine alias that has been left off a (recently created) certificate
It is genuine but (A) yes, it seems to have been left out of the cert list and (B) Google seems to prefer serving "www."-prefixed domains for fossil-scm and sqlite.org.
$ dig fossil-scm.com ... fossil-scm.com. 276 IN A 194.195.208.62 $ dig fossil-scm.org ... fossil-scm.org. 0 IN A 194.195.208.62
(45) By Richard Hipp (drh) on 2025-10-17 11:47:35 in reply to 5.1 [link] [source]
At least I could not find [zip or tarball] in the ... hamburger button.
There is now an experimental change on the main server that incorporates a "Tarballs and Zips" link in the hamburger menu. This takes one to a page with buttons to click for various tarballs and zips.
As you know now, it is possible to download a tarball/zip for any check-in. The new /tarlist page only shows a handful of check-ins. The choice of check-ins can be configured by the administrator. I have the Fossil source code repository configured to show just the latest trunk check-in plus the two most recent release check-ins. (Experts: The suggested-tarlist setting is "1 trunk 2 release".)
Over at the SQLite source repository I have the /tarlist configured to show the latest trunk check-in and the seven most recent releases. (Experts: setting is "1 trunk 7 release".)
WuMing2: You are new to Fossil, I think. That makes your opinion in this matter more important. Does this feature make it easier for newcomers to find where to download tarballs and zips?
(48.1) By WuMing2 on 2025-10-26 05:23:39 edited from 48.0 in reply to 45 [link] [source]
Does this feature make it easier for newcomers to find where to download tarballs and zips?
I think so. Menu option is fairly higher up to be easily noticed. Available options of two formats for most branches and releases are very generous.
(6) By Konstantin Khomutov (kostix) on 2025-10-15 08:30:36 in reply to 1 [link] [source]
git checkout —> local copy w/o repo
This one is not correct ;-)
Like Fossil, Git is a DVCS, where 'D' stands for "distributed". This model assumes any "clone" of a repository is normally self-containing and self-sufficient, with the ability of them to exchange commits and other data being, actually, not strictly required.
The git checkout command populates the so-called "work tree" with the state of the files and directories
as recorded in a commit, but the repository is still there —
either in the ".git" subdirectory or elsewhere (for complex cases).
You cannot git checkout from a Git server, so to speak.
On the othe hand, Git supports so-called "shallow-clones", where a cloning may bring in just a mimimum set of data so that the local repository (to which the cloning is done) contains no history or a small subset of it.
(9) By WuMing2 on 2025-10-15 08:55:28 in reply to 6 [link] [source]
This one is not correct
Thanks for remarking my mistake. Found reference on stackoverflow but clearly I misinterpreted it. Didn’t try it anyway.
(13) By Richard Hipp (drh) on 2025-10-15 10:36:59 in reply to 1 [link] [source]
Suppose there was a command that would reach out and download a tarball or similar from a remote repository then unpack it locally, all in one step. What would that command be called?
Example:
fossil eligere https://fossil-scm.org/home trunk
This command would contact the server named by the URL, extract the latest "trunk" check-in, send just that one check-in over the wire perhaps as a tarball, then unpack it locally.
It seems like this could be useful, no? And not too difficult to implement. I dare say I might have an implementation in the tree within a day or two if y'all can suggest a sensible name to use for the placeholder "eligere" shown in the example above.
Maybe this isn't a separate command but just an option to the "checkout" command?
fossil checkout trunk --extract-from https://fossil-scm.org/home
(16) By jvdh (veedeehjay) on 2025-10-15 11:02:28 in reply to 13 [link] [source]
my 2c:
I would think this should not be delegated to be an option of checkout. the latter should remain a "repository-related" action in my view
if made a new command and the "semantic collision" with what +git fetch+ or +hg fetch+ does is considered irrelevant +fetch+ would be fine. or +grap+ (but then it sounds like +grep+) or +snatch+. something like that?
although this thread might indicate that such a command could be useful for some users, I personally think it is essentially sufficient that one can download tarballs from the remote repo via web ui already. but OTOH, having the functionality available via CLI is of course nice, too.
(19) By Daniel Dumitriu (danield) on 2025-10-15 11:16:10 in reply to 16 [link] [source]
I agree on points 1 and 3.
'Eligere' is nice but probably not very domain appropiate... 'Download' sounds too generic. Folding it into zip is appealing but might make it too obscure.
'Snapshot'?
(17) By ravbc on 2025-10-15 11:05:11 in reply to 13 [link] [source]
Maybe: 'fossil download https://fossil-scm.org/home trunk' ? Or just 'get'?
(18.1) By Stephan Beal (stephan) on 2025-10-15 11:10:24 edited from 18.0 in reply to 13 [link] [source]
It seems like this could be useful, no? And not too difficult to implement.
FWIW: +1.
... if y'all can suggest a sensible name to use for the placeholder "eligere" shown in the example above.
(Certainly Daniel already knew this, but: https://en.wiktionary.org/wiki/eligo#Latin)
If it's an arg to the zip/tarball commands it doesn't necessarily need a new name:
fossil zip https://fossil-scm.org/home/trunk/my-copy.zip
Edit: or...
fossil zip --unpack --remote https://fossil-scm.org/home/trunk/my-copy.zip
to both download and unpack.
(20) By Richard Hipp (drh) on 2025-10-15 11:31:00 in reply to 13 [link] [source]
When you do the command
fossil eligere https://fossil-scm.org/home trunk
(for some substitution of the placeholder "eligere") does it put all of the files in the working directory, or does it create a subdirectory named "fossil-scm.org" or "trunk" and unpack everything into that subdirectory?
Perhaps there is a "--subdir NAME" option that overrides the
subdirectory name, and if you want to expand into the working
directory you could say "--subdir ."? Maybe --subdir is called
--into or --dest instead?
(22.1) By Daniel Dumitriu (danield) on 2025-10-15 12:48:47 edited from 22.0 in reply to 20 [link] [source]
I took it that that should bring a disconnected snapshot, so we'd rather quit/warn if within a working directory. Or maybe allow it into any subdir, as long as empty?
(23) By Florian Balmer (florian.balmer) on 2025-10-15 13:16:19 in reply to 13 [link] [source]
Isn't pointing somebody to the zip/tar download URL even easier than explaining them another new Fossil command?
And people who are not interested in the project history wouldn't even have to get the Fossil binary, first.
(24) By Stephan Beal (stephan) on 2025-10-15 13:55:36 in reply to 23 [link] [source]
And people who are not interested in the project history wouldn't even have to get the Fossil binary, first.
That's definitely a compelling counter-argument.
(25) By Florian Balmer (florian.balmer) on 2025-10-15 14:01:09 in reply to 24 [link] [source]
BTW: That's how I've been using the source code of Git-based projects for years, just download the zip without ever installing the Git binaries.
(27) By jvdh (veedeehjay) on 2025-10-15 14:35:35 in reply to 24 [link] [source]
yes, definitely. as said, I also feel an easy way to download via the web-UI is sufficient. but...: for people unacquainted with the fossil web-UI it sure is not self-explanatory how to find a way to download the tarball or zip archive (assuming default config of the web-UI), no? so maybe a default "Download" menu entry and some added logic to select which checkin to use for the download (current trunk or possibly something else) could help.
what I also have noted is, that the name given to the tarball is constructed for as "project+name-hash.tar.gz" while the root dir of tarred tree is called "project name" (with verbatim blank). so the used project name is used verbatim in the root dir name rather than replacing any blanks by "+" or "" or similiar. I would argue for doing the same sort of blank substitution everywhere (and would think "" more common than "+"?). blanks in file names remain a pain etc...
(28) By Andy Bradford (andybradford) on 2025-10-15 17:22:35 in reply to 27 [link] [source]
> for people unacquainted with the fossil web-UI it sure is not > self-explanatory how to find a way to download the tarball or zip > archive And what will explain to these people how to download it from the command line? Will it be self-explanatory? This already works quite admirably, and reliably: ftp 'https://fossil-scm.org/home/tarball/fossil-src.tar.gz' && tar xvfz fossil-src.tar.gz ftp 'https://fossil-scm.org/home/zip/fossil-src.zip' && unzip fossil-src.zip Instead of ftp(1), one could also use wget, curl, or any other tool, that can download. PowerShell also has command-line tools for downloading. Just my $0.02. Andy
(30) By Richard Hipp (drh) on 2025-10-15 17:32:14 in reply to 28 [link] [source]
That works fine if the server is publicly accessible on the web, but not for "ssh:"-style private repositories. The new "fossil get" command works for both.
The new "fossil get" command also works for "file:"-style URLs. That does really provide any advantage over "fossil open" for manually typed commands. But in a script, where the URL might be anything, the "fossil get" command works in all cases, whereas the ftp/wget/curl approach only works for "http:"- and "https:"-style URLs.
(33) By Andy Bradford (andybradford) on 2025-10-15 21:36:36 in reply to 30 [source]
> That works fine if the server is publicly accessible on the web, but > not for "ssh:"-style private repositories. Yes, that is one advantage. It doesn't seem to work with the anonfsl Fossil server that I setup: $ fossil get ssh://anonfsl@fossil.bradfords.org//fossil server says: 404 Not Found SQLITE_ERROR(1): no such table: sqlar in "SELECT name, mode, sz, data FROM sqlar" SQL error: no such table: sqlar Seems there's a table missing... But anyone can easily clone it without problems: $ fossil clone ssh://anonfsl@fossil.bradfords.org//fossil /tmp/fossil.fossil Round-trips: 13 Artifacts sent: 0 received: 65311 Clone done, wire bytes sent: 3857 received: 59254260 remote: fossil.bradfords.org Seems it makes this request: GET /sqlar?name=fossil-trunk&r=trunk HTTP/1.0 Any ideas why this might not be working? anonfsl works similar to anoncvs but the server restricts communication to "fossil http" basically. If you get prompted for SSH host key, the fingerprint is one of: 256 SHA256:UNaEa9GsOJYKeomY0iWfZMH6v7qPw6qsxSy/0Vt/1ew 256 SHA256:lXIPDwR3DbjQHKyz+dLVyAMgtzt2FqGDdGnTj6AwgbM 2048 SHA256:WHyPvu3M73NKSlUhluLz1qIvWQ59gP3n9TcgfDn4x/I By the way, there appears to be a typo in the usage? Is the "get get" intentional? $ ./fossil get Usage: ./fossil get get URL ?VERSION? ?OPTIONS? Thanks, Andy
(34) By Richard Hipp (drh) on 2025-10-15 21:54:41 in reply to 33 [link] [source]
It doesn't seem to work with the anonfsl Fossil server that I setup:
Perhaps due to the preexisting code at zip.c:1036-1038. I think I need to record it to use ZIP Archives instead of SQL archives.
There are other bugs too, that I'm working on.
(43) By Andy Bradford (andybradford) on 2025-10-17 03:45:10 in reply to 33 [link] [source]
> $ fossil get ssh://anonfsl@fossil.bradfords.org//fossil > server says: 404 Not Found > SQLITE_ERROR(1): no such table: sqlar in "SELECT name, mode, sz, data FROM sqlar" > SQL error: no such table: sqlar I think this can be easily reproduced just using "fossil test-http /tmp/museum" (with or without --ssh-sim): ------------------------------------------------------------------------ $ mkdir /tmp/museum $ fossil init /tmp/museum/project-a.fossil ... $ printf 'GET /sqlar?name=project-a-trunk&r=trunk HTTP/1.0\r\n' | fossil test-http /tmp/museum HTTP/1.0 404 Not Found Date: Thu, 16 Oct 2025 13:37:22 +0000 Connection: close X-UA-Compatible: IE=edge Cache-control: no-cache X-Frame-Options: SAMEORIGIN Content-Type: text/html; charset=utf-8 Content-Length: 125 <html><head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head><body> <h1>Not Found</h1> </body> ------------------------------------------------------------------------ This is happening because "fossil get" does not include the complete path, whereas clone, sync, etc, all include the full path over SSH. I believe the following fix will address the problem: https://fossil-scm.org/home/info/6fc687402673e884 Will someone review and provide feedback? Is there a better way? Thanks, Andy
(44) By Andy Bradford (andybradford) on 2025-10-17 04:00:08 in reply to 43 [link] [source]
> Will someone review and provide feedback? Never mind, it's not ready. I see a potential problem already with: https://www2.fossil-scm.org/home/file?ci=6fc687402673e884&name=src%2Fcgi.c&ln=2362
(46) By Andy Bradford (andybradford) on 2025-10-17 14:41:32 in reply to 44 [link] [source]
There was apparently another problem that I didn't identify until today. I have put a fix on trunk to unbreak SSH: https://fossil-scm.org/home/info/7531b9452ee4e26e Under some conditions, trimming the URL appears to be the wrong thing to do and it would result in: server says: 400 Bad Request Clone done, wire bytes sent: 299 received: 26 remote: localhost server returned an error - clone aborted Rerun using --httptrace for more detail The fix works, but now I'm starting to wonder if there isn't a better way. I'll dig into it later.
(26) By Florian Balmer (florian.balmer) on 2025-10-15 14:27:21 in reply to 23 [link] [source]
Maybe, as a tiny QOL improvement for non-SCM users downloading the zip archives, the --name option could be exposed to the zip/tarball web UI pages. But this may have security implications (?name=/bin), drive AI bots even crazier, and require changes to the Fossil web cache.
(21.1) By Pinchas Neiman (neimanpinchas) on 2025-10-15 12:27:52 edited from 21.0 in reply to 1 [link] [source]
Your question seems to relate an existing repository.
Technically for the sake of sharing a single fossil repo with multiple work directories "avoid creating local repo" LiteFS can be the answer, but you need to have access to the server https://github.com/superfly/litefs
Disclaimer, I never worked with LiteFS before, my first tought was to patch fossil with a sqlite over network wrapper that I worked with years ago, but LiteFS seems to be simpler.
(29) By Richard Hipp (drh) on 2025-10-15 17:27:07 in reply to 1 [link] [source]
Now available on the get-command branch is a new command "get".
fossil get URL ?VERSION? ?--dest DIRECTORY?
The URL can be an "http:", "https:", "ssh:", or "file:". VERSION defaults to "trunk"
but can be any valid check-in name. The check-out is unpacked into DIRECTORY.
You can do "--dest ." to unpack into your local directory. There are other
options as well. Run "fossil help get" for details.
I'm open to renaming this command to something other than "get".
Post suggestions are comments as follow-ups to this message. If there are no serious objects, I will merge to trunk.
How It Works
The client sends an HTTP request to URL using the same mechanism as it would for doing a "sync" or "clone". But the request is of the form:
/sqlar?name=NAME&r=VERSION
Where NAME and VERSION are determined by the command-line inputs. This request should return an SQL archive as a Blob. If the --sqlar option is present, then the SQL archive is simply stored in the file named by --sqlar. If the --sqlar option is omitted, then the SQL archive is queried using SQL and individual files are written to disk.
(31) By graham on 2025-10-15 19:51:04 in reply to 29 [link] [source]
No comment/view on the command itself, just a "just in case" question: does it, or does it need to, sit behind – or interact with – the recent anti-robot-attack defenses?
(32) By Richard Hipp (drh) on 2025-10-15 19:53:51 in reply to 31 [link] [source]
No. Because the robots are sending HTTP requests. We are talking about a new command on the command-line here. Robots do not have access to the command-line.
Robots can send the /sqlar HTTP requests that the new command uses. But that is already dealt with.
(35) By Stephan Beal (stephan) on 2025-10-15 21:56:17 in reply to 32 [link] [source]
Robots do not have access to the command-line.
Somewhere in the distance i just heard a cry of "challenge accepted!"
(36) By WuMing2 on 2025-10-15 22:47:55 in reply to 35 [link] [source]
My humble point of view. With a reference to /zip and /tarball in the hamburger button menu I would not have started this discussion. Existing zip and tarball commands as alternatives for who has the binary installed already (assuming -R accepting a remote repo URI). In short I would not change anything.
(37) By Richard Hipp (drh) on 2025-10-15 23:17:17 in reply to 36 [link] [source]
Kinda too late. I've already implemented the "fossil get" command. It seems to be working well.
On the other hand, adding a new "/archives" webpage that gives you a menu of possible tarball and ZIP downloads, and then adding that page to the hamburger menu, might also be useful.
(38) By Andy Bradford (andybradford) on 2025-10-15 23:33:36 in reply to 36 [link] [source]
> Existing zip and tarball commands as alternatives for who has the > binary installed already (assuming -R accepting a remote repo URI). I already demonstrated CLI for HTTP/HTTPS. For SSH that could be as simple as: ssh user@remote fossil tarball -R path/to/project.fossil trunk - > project-trunk.tar.gz However, this assumes that one has full SSH access to the remote. But, for anonymous Fossil repositories over SSH (arguably I'm probably the only one with such a beast), that wouldn't work. Andy
(39) By Richard Hipp (drh) on 2025-10-15 23:38:55 in reply to 38 [link] [source]
The code for the "fossil get" command is now on trunk. If y'all decide that we should delete that command, well enough. The exercise of adding the new command brought a number of infrastructure bugs and omissions to my attention which have now been fixed. The "fossil get" command can be removed simply be deleting the "get_cmd()" function and its header comment from the "checkout.c" source file and recompiling.
(40.1) By WuMing2 on 2025-10-16 00:43:33 edited from 40.0 in reply to 39 [link] [source]
If anything I would have reused the export command (now deprecated) with appropriate options. Reminiscent of svn export. But more commands are better be avoided if possible.
(41) By Andy Bradford (andybradford) on 2025-10-16 00:20:11 in reply to 40.0 [link] [source]
> If anything I would have resumed the export command I believe that an equivalent to "export" is found in Fossil's tarball and zip command-line options. https://fossil-scm.org/home/help//tarball https://fossil-scm.org/home/help//zip The new command allows an "external export" in the sense that one need not have a copy of the repository to do so. Andy
(42) By Andy Bradford (andybradford) on 2025-10-16 06:17:17 in reply to 39 [link] [source]
It looks like the use of cgi_init() for SSH CGI handling breaks the use of "fossil http" over SSH when using ForceCommand as discussed here: https://fossil-scm.org/home/doc/trunk/www/server/any/http-over-ssh.md This commit[1] in particular added cgi_init() to the code path for SSH, but there were other unforseen side-effects that were introduced as a result: [1] https://fossil-scm.org/home/info/9a767601780a0770 I've committed a fix that I think addresses all the issues. I believe originally cgi_init() was left out of the code path because it did more than was necessary for the SSH transport, with the new "fossil get" command additional updates are needed for this method. These changes appear to correct the problems: https://fossil-scm.org/home/info/088be210db8abad5 I've tried to test it in as many scenarios/ways that I can, so hopefully it doesn't break more than it attempts to fix. A quick way to test Fossil over SSH with a ForceCommand is simply to put your SSH public key in ~/.ssh/authorized_keys like: command="/tmp/fossil http /tmp/museum",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN+S69lC42aU731xEBsP9lD368T5KZVPOI4kB7N0aagJ Put a test.fossil in /tmp/museum, then try: fossil clone ssh://localhost//test /tmp/test.fossil Thanks, Andy
(47.1) By brickviking on 2025-10-20 22:19:12 edited from 47.0 in reply to 39 [link] [source]
I did happen to think of "fossil pick ...." to pick a revision from the codebase, pack it up in zip/sqlar, send it over the wire, and unpack at the local end. "fossil get" implies getting the whole thing, at least to me.
(Edit) ... or perhaps "fossil latest". My other choice of "fossil grab" doesn't suggest grabbing the latest (or tip) code. And "pick" implies that I can choose any revision, which is already supported by fossil.
Regards, RTDoc brickviking
(Post 68)