Why I'm using Fossil SCM instead of other source control systems (2016)
andreiclinciu.net
andreiclinciu.net
Btw A lot of people who say rebase is dangerous use git stash and have no idea that stash is one of the actual dangerous things to do, much more dangerous than rebase, and not any easier than branching.
“If you mistakenly drop or clear stash entries, they cannot be recovered through the normal safety mechanisms.”
What’s dangerous is using things one doesn’t understand and not asking how to use it or reading up on it.
I mean, once I understood the major concepts of git, and understood how its model was fundamentally different from something like svn or cvs, it wasn't that hard to use it. Sure, it took time to learn, but given that it's a tool so integral to my working life, I'm fine with spending a little more time learning it if it makes me more productive in the long run.
I use mostly Jetbrains IDEs, I'm sure their git/VCS integration is pretty good, but I stick to Sourcetree plus occasional command-line for most stuff.
I'd probably fail a git-oriented interview section because I'd fail at the command-line for some common things for which I just use Sourcetree. In any case though with my approach I've seen I generally get a much better overview of code changes and branching strategies and have a more flexible and convenient experience that many other coworkers over the years.
I don't want a bitbucket account and never bothered to check how often it would phone home to ensure you had an up-to-date bitbucket account. I think the Sublime folks have a better track record here and I fully expect Sublime Merge to get to the point where I'd want to buy it if I wanted a git GUI.
Unfortunately for Atlassian, by 2011 Bitbucket already lost out to Github and they hadn't realized it yet.
Teaching colleagues and using tools they can put on their résumés is pretty important. Iconoclasm isn't always a good way to live (or do business).
I thought I'd learned my lesson, switched to Git, etc. Then I started rolling out SaltStack and turned myself back into that guy. I finally gave up when I realized I was the bottleneck on so many people's work. Went back to plain old written deployment guidance about three years ago. Now I'm looking at containerization and orchestration tooling and worrying if I'm making the same freaking mistake yet again.
It's such a difficult balancing act, especially as one moves into management. I could, by fiat, mandate tooling (and do). But will I regret my possibly poor choice in 5 years? I don't know—let's find out!
I find hg much more pleasant to use than git, and can generally still work in git based teams while using hg.
I find pijul's approach much more interesting than git's, and look forward to pijul (and others :) pushing forward how we do revision control.
I don't believe git to be the end of the evolution of revision control systems (which for me has looked like cp -> rcs -> cvs -> svn -> git|hg), and find git lacking enough that I look forward to what the next generation does.
Would I argue that you personally should branch outside of your git centric world? Of course not! Just as I've worked with many devs who live their lives gainfully employed only knowing Java, or sys admins who only know Microsoft, it is up to you as to if you wish to explore different approaches and styles to achieve your end goal.
My point is that even if you do get into one of those other communities, you are still going to have to learn how to use git because so much of the world uses it. You will need it either for your job or because the open source project you want to use is on it. You can't skip learning git.
If you don't mind that, then go for it. For me, I don't want to use my limited capacity for learning things on learning a second (or third, since I still have SVN usage somewhere in my brain) SCM.
I’m not saying that Git is never used in game dev (it absolutely is), I’m saying that not everyone will have to learn it, or ever touch it.
It's a fine point, and quite reasonable. It is however I think important that we don't all take your approach.
How likely is it that Fossil will displace Git? If you believe it is likely, then learning it, and using it for projects, may be time well spent. But even then, it'll take so long that you will still have plenty of time to adapt. So perhaps it is something you should keep an eye on, but not worth investing in now. If you find Git to be a pain, then a better investment right now, which pays off right now, would be to figure out what you can do to get along with Git, and thus most developers.
You have to treat learning as an investment. Which means, you have to think about about returns on investment. And just like regular investments, it doesn't matter what people who don't pay attention think.
Also, I wouldn’t put the choice of SCM at the same level as the choice for OS.
But sysadmin'ing Windows vs. Linux is basically two different jobs. You certainly wouldn't hire someone to be a Linux admin who'd only worked on Windows servers before.
We’d absolutely switch over if there was some feature we wouldn’t get elsewhere. But it’d need a couple of months/years of sustained advocacy.
There are already experiments in this area[1], but I don't think any are ready for mass adoption yet.
The fact that it's 2022 and we're still working with red/green line-based diffs is absurd. Our tools should be smarter and we shouldn't have to handhold them as much as we do with Git. It wouldn't surprise me if the next big VCS used ML to track code changes and resolve conflicts. I personally can't wait.
A new VCS isn't really needed.
It turns out, both kind of need the same things, and if you do it right, you get better merging with text than Git currently does.
Source: I'm working on the next big VCS. It's not Pijul, though.
Not much else is done, unfortunately, because this VCS depends on some other software that I'm struggling to write.
Hmm maybe. I think this will come, but it may be more broken up through build tools that include this functionality, not a singular VCS. I think aggressive linting is starting to help with whitespace and formatting adding noise to diffs. We're seeing progressively more integrated build tools (Cargo, NPM, vs anything C/Java).
Personally, my bets are on the next VCS being more "workspace" centric as a next-step evolution. Any big change is going to come as we already change how we work. We're starting to see a lot of various tools that are basically VM/Container workspaces that you work out of. Cheap to spin up for each feature, instead of branching/pushing/pulling on one local repo. I think "thin client" reproducible workspaces are the next evolution.
What will VCS look like when everything is always-connected and (maybe?) cloud hosted? Maybe it'll allow "sharing" of workspaces, so you can build big features as a team (instead of feature branches being pushed/pulled). You'd certainly not store the "fat" history of changes locally, and big assets/binaries/etc would be better supported. Maybe it'll be built into one of these virtual workspaces as an overlay-fs, so its transparently auto-saved to a central store instead of manipulating the existing file system like git.
Basically, if you have the repo and the fossil binary you have everything. Is this better? I never saw a lot of advantages in my style of work, but i could see this being huge for someone who has intermittent connectivity. Or maybe someone who wants to use the ticket tracking, etc without setting up a separate server or public instance.
I just love that fossil exists and there is a diversity of opinion on how things can work.
An scm can be better, some probably are, but it won't match these other traits.
I think it's pretty interesting in that it's a hugely replete web application written in C that does all sorts of stuff... bug tracking, wiki, etc.
If Fossil had good support for binary files I would have considered switching from Git (since Git LFS is just yuck), but from what I've heard it doesn't look too good.
Could you elaborate, since you used the word “shocked”? Was it terrible or just bad? Doesn’t Fossil have any hooks to use another diff tool?
$ fossil set diff-command “diff -bu”
Fossil doesn't do rewriting history. I think that rules it out for large team efforts. As an immutable distributed log of everything I write by myself it's essentially perfect.
"Purge" is really only intended for use with fossil's "bundle" feature, bundles being essentially feature-rich patches which record all of the historical state of the bundle. (Yes, it's long been flagged as experimental, but it's also been unchanged since it was added so i'll look into getting that notice removed or amended.)
The idea of fossil's bundles is that a person not associated with a project can submit a patch in the form of a bundle, a developer imports that bundle into their repo and either retains it or "purges" it, leaving the developer's repo clone back in a clean pre-bundle state. That feature can, however, and sometimes is, used for "popping" the top-most commit from a repository (so long as it has not yet been pushed to a remote). So long as a local repo has not been synced with any remotes, and so long as there are no branch points to interfere with it, repeated applications the bundle/purge combo can be used to pop the top-most checkin multiple times, effectively wiping out as-yet-unsynced changes even if they span multiple checkins.
Git rebase provides a new, second, altered sequence of commits. It doesn’t replace the original. We often choose to preserve the rebased sequence, but this distinction is not academic, it’s critically important because as a part of a version control system, rebase can be undone, precisely because it does not write over the old history.
Git never promised a “history” per se, not in the form of an immutable record of events. The framing of git rebase as a history rewrite, the very idea that rewriting history is bad, came from the Fossil team in an attempt to convince people to try Fossil and cast shade on git. I’m in favor of better VCSs, but the claim that rebase is a history rewrite is hyperbolic, and the judgement on top of that is silly and misguided. Rebase is a tool designed to reorder a sequence of commits, mostly for the purposes of making local changes presentable before pushing them, and has other legitimate uses too.
Good point. Perhaps "rewrite history" is not the best metaphor, and does not cover all possible git workflows. I only considered the workflows where a rebased branch is merged back onto master instead of its non-rebased variant, which loses its name, its remote copy/copies and is eventually hit by the GC.
> the very idea that rewriting history is bad, came from the Fossil team in an attempt to convince people to try Fossil and cast shade on git.
The resistance I've met among developers to adopt rebasing workflows with git have no knowledge of Fossil.
My impression is that the main objection to such workflows is that it exceeds some developers' novelty budget [0] and that those developers generally don't read git messages and don't value the history of code to understand its current shape.
FWIW, my intro to rebase came after using Perforce for years. Because git is strict about commit ordering and P4 is not, I was struggling to figure out how to manage multiple in-flight changes like I would in P4, and how to clean up and push something that wasn't a hot mess. Rebasing my local workspace, it turned out, is the answer to that. It is the key to working around git's strict commit parentage, and makes it easy to sculpt changes so they're palatable for me and my team.
Above I was referring to some of the anti-rebase messaging Fossil has put out in the past. Some is there still, for example https://www.fossil-scm.org/home/doc/trunk/www/rebaseharm.md I'm quite pleased to see that a lot of the most hyperbolic verbiage is gone now, it used to carry on quite a bit. But that page still says rebase is "dishonest", which is a deeply ironic claim, if you catch my drift. That kind of mis-representation ruffles my feathers a little bit, but I've had discussions with the Fossil team right here on HN about it, and they have in fact been open to listening, responsive, and willing to change and improve the messaging.
Fossil heavily discourages (outright forbids?) this kind of stuff.
I would argue the team-wide destination branch history is what should be called “history”, and the only thing that matters. But Fossil’s distinction is more rigid and it considers anything ever committed to be history.
Squashing a local branch does, in a way, rewrite local commit history. But this shouldn’t be called “rewriting history” in my book. Rebasing the main branch really is fully rewriting history (and this isn’t a squash commit). Squashing a feature branch that multiple people touch is somewhere in between. It’s a little rewriting. It’s often desirable. Should squashing small feature branch PRs be called “rewriting history” in the sense that Fossil claims that it’s intended to misrepresent the project? I don’t really think so, but since “rewriting history” wasn’t clearly defined, it’s open for debate.
That’s horrible, sounds like a blockchain oO !
In my workflow I constantly create throw away commits. Once I am satisfied with the code changes I cleanup history and open a PR.
Both bitcoin and git use merkle trees to prevent (unwanted) history rewrites :)
Can you fake it by constructing a new branch with the history you want, copying files between branches from appropriate commits?
Easier is to copy the repo, do a bunch of feature work there, then rsync over to the shared repo and commit. I don't bother though, local history has the mistakes and backtracking enshrined.
What I like about this question, however, is what it reveals about our assumptions, and what it says about what the words “commit” and “history” mean, and what it is we want out of a version control system.
The truth is that a commit is what I say it is, whether I’m using git or Fossil or anything else. This means that it’s absolutely always guaranteed to be subjective, and has only the meaning I give it. Preventing rewrites might have some workflow benefits, I’m quite open to the idea that there are advantages to the way Fossil does things. But the idea that rewrites should be prevented in principle because history should be preserved is really very funny to me. It’s only possible to preserve the history of the things I said are history in the first place.
The biggest surprise was the web UI didn't seem to provide a way to review changed files in the working directory and perform a commit.
With Mercurial, before a commit I'll usually use Tortoisehg to review what I've changed, running diff views (with Meld) on my code changes, etc.
There didn't seem to be a non-command-line way to do this. I guess I expected a nice commit interface that would also easily let me add cross-references to related issues and such, given it is all integrated.
You can get this sort of UI workflow from within IDEs which support Fossil SCE. Some IDEs even allow selective diff hunk Undo.
Since (IIRC) late 2021, you can view a diff in your browser with:
fossil diff -b
(use -by for side-by-side diff)
A checkin cannot be performed via the UI. That has to be done via the CLI.
Fossil has, for many years, supported:
fossil diff -tk
for a TK-based diff view, but that only works on systems with working tcl/tk installations.
Notably 'fossil' is a single static binary that can be anywhere on the $PATH too.
I would say if you do all of your development in a corporate or institutional setting where you are a contributor on a distributed team, Github is the best choice and the choice will often already have been made for you anyway. If on the other hand you do a lot of development on your own projects, it could be beneficial to spend a half-day and try out Fossil.
Is that still the case? (I sure hope not!)
Fossil has not stored a plaintext password in many years (2008-ish). Only a one of the small handful of "first-generation" repositories has any chance whatsoever of having such a password (and only if the user has never updated their password since then).
https://fossil-scm.org/home/doc/trunk/www/password.wiki
That’s an improvement, but I doubt it’s best practice.
That's FUD: you cannot connect to a remote anywhere nearly that fast. Fossil's passwords are hashed in such a way that they are useless for any repository clone other than the one they were established on. Even if i manage to get your password hash, it doesn't do me any good unless i have physical access to the exact copy of the repository on which that password was initially stored/hashed, because only that copy has the secret key needed to reverse-engineer your password. Local physical access trumps any and all security measures.
These sorts of things are all about defence in depth. Some have said: “What’s wrong with storing passwords in cleartext? No one else can access them anyway!” But then a bug in another part of your system allows exfiltration of the database. It’s that kind of thing. Weak password storage is also as much a problem for other systems as it is for one’s own system, due to password reuse.
I gather from a little more research that current CPUs can probably do over ten million SHA-1 hashes per second (some extrapolation of old figures there), and consumer-grade GPUs over twenty trillion. This will crack even moderately strong passwords in a very short time.
For comparison, Argon2 is designed as a proper password hash (resistant against acceleration) and its recommendation is to make passwords take a few hundred milliseconds to check (increasing the number of iterations as hardware gets faster). So maybe three per second, which basically renders any cracking whatsoever infeasible.
And then there are some other little things, like the absence of a good free hosting service similar to github or gitlab, the ignore system isn't as flexible as git, etc.
It might be faster than many SSGs and perhaps less complicated.
Not in the general case, no. Fossil-generated wiki/markdown output expect to be browsed within the context of a fossil repository, and will generate links accordingly. There might be very limited use cases where it would work reasonably well, but not generically. e.g. adding a link to a local file or another wiki page will not work if the output is browsed from outside of a fossil repo instance.