I’m quite happy with Sapling at work. I still haven’t figured out what Jujutsu does better. I think nothing substantial? Not that Sapling can be easily used in the public sphere. But at a conceptual level I’m not sure there’s anything in JJ I’m missing.
Sapling is great. I worked on it for many years at Facebook and I think we did a pretty good job building a workflow that most developers preferred to Git.
To the extent that Jujutsu is similar to any other systems, it is most similar to Sapling — both have a Mercurial heritage (Sapling is derived from hg, while Jujutsu is a new codebase with an hg-inspired UX). However, Jujutsu introduces a number of fantastic improvements over Sapling, such as first-class merge conflicts and automatic working copy snapshots. See my testimonial, the top one on this page:
I no longer do VCS development, but I'm a very happy full-time jj user. I've also helped onboard a number of people onto it.
(Personally, I'm just happy that after the dark era of Git's branch-first UX being dominant, the anonymous heads/commit-first UX pioneered by Mercurial is making a resurgence. The vast majority of developers prefer a commit-first UX, and it is so much easier to explain things like stacked commits if you don't have to introduce git rebase -i.)
One of my favorite things about Sapling is that all commits are automagically backed up to the cloud. The D in DVCS is not important for roughly every project ever. So I’m not sure how to feel about “every state is a commit”.
I'm not sure why you think the two are incompatible? Commit Cloud is pretty great but makes more sense in a corporate environment. You don't have to upload every automatic commit that gets made locally, though you could choose to if the capacity requirements work out.
The automatic snapshots provide a great degree of UX coherence — definitely more than Sapling currently does. (When I last chatted with the Sapling folks, they were quite interested in porting some Jujutsu features over to it.)
Uploading everything everytime someone runs jj status seems potentially burdensome. Uploading on every commit is maybe also burdensome but at least it’s also nice and explicit? I dunno maybe it’s fine! Or maybe some heuristic would make it fine enough. I don’t really get the “working copy commit” concept. It hasn’t clicked yet.
> The automatic snapshots provide a great degree of UX coherence — definitely more than Sapling currently does.
Try jj out on an open source Git repo -- I think it will both be very easy to pick up, since you're used to Sapling, and quickly make sense.
You know how sl amend and sl fold/squash are two different commands, right? Well, jj amend is actually an alias for jj squash. And that's just the beginning.
Regarding uploading, yeah, you'll likely have to have some heuristics, but Mononoke is generally built for very high throughput. The heuristics might just be around local debouncing and aggressive expiry of uncommitted snapshots in the cloud. But in general, it's worth thinking about the local moment-to-moment UX independently of commit cloud considerations.
Sapling is Mercurial with some advancements. Mercurial is ridiculously better than git, but lost the network effects battle due to Github. So, JJ probably doesn't give you anything amazing.
JJ is useful for those of us who understand the shittiness of Git but have to work in a world that got locked into path dependent network effects by VC money.
> When I left Google three years ago I recall they were trying to figure out what to do about either making Git scale, or adopting Mercurial, or what.
It's interesting because I used Mercurial (hg) for close to a decade after coming from Subversion.
Rarely had to consult the docs for weird edge cases and generally operation felt natural and seamless. It was easy to onboard new devs of all experience levels.
I switched to git 5 years back and I still feel lost sometimes and inadvertently end up in detached head state once in a while. Git feels really "unnatural" or "unintuitive" to me in some way that Mercurial never did (I can't put my finger on why because I never gave Mercurial much thought).
You're like most developers! The core problem is that Git's workflow treats branches as the source of truth for what's in the repo, while Mercurial and its progeny (Jujutsu and Sapling) treat individual commits as the source of truth. The latter is vastly simpler, and also (as Jujutsu shows) more powerful.
While working on a stack of changes, you should be able to check out an earlier commit, amend it, and have its descendants be automatically rebased. Of course you should be able to -- this is a natural and straightforward way to think about working on changes, and builds on prior knowledge about how to work with individual commits and how to rebase them onto a newer upstream. Now compare this to git rebase -i.
Mercurial was slow, right when it mattered, and didn't have the Linux kernel using it. GitHub's VC funding helped, for sure, but that had more to do with the rise of GitHub over Gitlab, SourceForge, Google Code, and BitBucket than the success of git itself. Getting people to switch RCSes has a bootstrapping problem that the Linux kernel solved for git. Firefox was on Mercurial/hg, as was CPython, but neither of those have the same ecosystem of developers.
if you take the time to learn it, the underlying data model for git makes sense, leading to the tools making sense, for those that put in the time investment to understand the underlying data model. This meant that there was a bunch of git expertise floating around IRC and mailing lists. Git tooling also wasn't super opinionated, letting pre-git workflows be run on git with little modification (which is also its problem, but does drive adoption). Sure, a recommended workflow has emerged, but that came later. By the time GitHub started in 2008, that was three years after its invention and use on the Linux kernel and git already had the mindshare and intertia. Without VC funding, GitLab or BitBucket or even Google Code might be the dominant platform, but it really was git's speed and fast branching, and proven scalability from managing Linux kernel development that led to git's rise as the preferred solution. (Its inability to handle monorepos like Google/Meta wasn't an issue for that time.)
Mercurial's lack of speed and inflexibility are what hurt adoption. VC money pouring in might have saved it, by somehow addressing those two issues, but unfortunately we'll never know. Mercurial's workflow is pretty central though so I doubt its community would have supported changes to the central workflow. Moving from Subversion to a DVCS (aka mercurial/hg or git) required learning a new tool and being forced to change workflow on top of that made the decision to go with git easier since a git expert could make a company-specific cheat sheet that didn't also require learning and adapting to a new way of working at the same time.
Most of the world was on SVN by the time git came around, and Git-svn was a pretty popular adapter. You could use git and its fast local branching before the company turned to git. I really can't stress the fast local branching enough as a reason for git winning. SVN server-side branches took forever to be created (even with the underlying data not actually being copied) and I remember even just running "hg" and no arguments being slow.
VC funding helped GitHub, but git still would have won out because hg didn't have a dev community to rival the Linux Kernel. Maybe Wikipedia/Wikimedia, but that's a much smaller codebase.
Git succeeded to large degree because of GitHub, yes. But that isn't how it happened at all. They built an amazing product that people loved, there was nothing even vaguely like it before, and it earned its adoption through providing a superior product than the competition, by leaps and bounds.
It ended on a bitter note when Microsoft bought them, sure. But let's not rewrite history, GitHub was not dumped on the market by deep-pocketed VCs. GitHub was self-funded from 2007 to 2012, at which point it was wildly popular and used a big cash injection to get to where it is now. By the time that happened it had the #1 position in commits per month and was about to become #1 in repos hosted also.
Git and Mercurial both were initially released in the same month (April 2005), and DVCSs had existed for some time before [0]. Linus even considered Monotone, which is also based on SHA-1 hashes, as a replacement for Bitkeeper before starting his own Git. Most people who worked with both Mercurial and Git consider Mercurial’s UI to be superior. It was mostly the draw of Linus and then GitHub that made Git “win”.