Mercurial is simply too good (2020)
baez.link
baez.link
Why would Git require "something like github" to work? You can just initialize a repository and give people access via SSH. Done. There's no need to even run a Git specific server.
https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-...
> So now we are all stuck with three options: git (github), git (gitlab), and git (bitbucket). Good job, mercurial. You beat git so well, you kicked yourself out the fight.
Bitbucket supported Mercurial for a long time but the support was eventually removed because nobody was using it.
https://bitbucket.org/blog/sunsetting-mercurial-support-in-b...
The (internal unverified Atlassian) mythos goes, that in the early days, both GitHub and Bitbucket were on equal MAU footing, but as Git mindshare started to take over, the Bitbucket founder, a Mercurial fan, dragged their feet on adding Git support. This delay lost them the war.
I now have my Mercurial repos on Sourcehut.
On the other hand, Mercurial's model of the world is IMO fundamentally quite a bit worse than git's. Revision _numbers_ are obnoxious and add negative value. Mercurial's concept of branching is just plain wrong. Mercurial's mq extension is spiffy, but it's far more tedious to use than git rebase -i. Stripping mercurial repositories is a bit scary, and it solves a problem that git never had in the first place.
I don't fully believe this, but I kind of believe that having the staging model is what allows git to be very good at modelling almost anything nicely. New workflows can be easily rolled out because we have this phase separation between committing and simply staging.
And just as a general thing, `git add -p` totally made me a better developer overnight, at least in terms of actually rereading my changes seriously (and fixing them up etc). The model isn't necessary to this kind of workflow but it helps!
So enable Hg queues:
* https://wiki.mercurial-scm.org/MqExtension
> Git is the only DistributedSCM that exposes the concept of index or staging area. The others may implement and hide it, but in no other case is the user aware or has to deal with it.
> Mercurial's rough equivalent is the DirState, which controls working copy status information to determine the files to be included in the next commit. But in any case, this file is handled automatically. Additionally, it is possible to be more selective at commit time either by specifying the files you want to commit on the command line or by using hg commit --interactive.
[…]
> If you need the index, you can gain its behavior (with many additional options) with mercurial queues (MQ). Simple addition of changes to the index can be imitated by just building up a commit with hg commit --amend (optionally with --secret, see phases).
* https://wiki.mercurial-scm.org/GitConcepts#Git.27s_staging_a...
What I don’t like is that git’s index is called an index (what does “index” have to do with its usecases?) and that the index is live even when you don’t want it. It should be opt-in, not opt-out.
See perhaps:
> ! This extensions is deprecated, the feature is now part of Mercurial core as hg commit --interactive.
> The record extension provides the record command, which may be used in lieu of commit. This command lets you choose which parts of the changes in a working directory you'd like to commit, at the granularity of patch hunks. It is similar in spirit to the darcs record command.
I used Mercurial in the past and I don’t remember it lacked such a feature. I use the git stage a hundred times a day to prepare my commits, and I don’t think I could ever go back to a tool that can’t do this.
I wouldn't fault anyone for liking Mercurial, but it definitely isn't better than Git except in giving a superficially better impression in its user interface. Once you get past initial impressions and start to do more advanced things, Mercurial sucks. There's good reasons why Mercurial fell out of favor.
Before anyone tries to say Facebook uses Mercurial, I'm just gonna point out that their VCS seems to be an entirely different implementation of Mercurial compared to what is available publicly. And even then, the tech lead on that has said recently that they have performance problems to solve. I doubt if they ever will solve those problems because they are inherent to Mercurial's implementation. Fixing it would break compatibility with old repos, and take a hell of a lot of work.
I love Mercurial, but I'm not sure if it's straightforward to figure out how verbs "revert", "rollback", and "backout" differ. But, when you get used to it, it's good, yes. Much easier to learn than git reset --hard HEAD^!@#$ at least.
I'm not sure I follow the argument here. The tool removes the need to spend money. So people didn't use it because they needed to spend money?
Anecdotally I've experienced a number of times some exec has proudly announced they've paid for some commercial product for everyone to use because their salespeople have sold it as a silver bullet for some common problem, and then dev teams need to diplomatically explain that there's industry standard open source tooling that's better and nobody wants to use the commercial thing.
Also, some of them offerer Mercurial as well. Somehow Mercurial still failed to gain traction.
In addition the different kinds of branches are confusing. Once you understand git branches they're simple. Once you understand Mercurial branches you understand just one of the branching models it offers. I believe "bookmarks" are the most similar to git branches, but good luck finding out about them from the website without already knowing they exist. Instead it tells you all about keeping around a bunch of copies of the source tree.
I don't really agree. Mercurial was missing some critical features that were left as an afterthought, like support for stashing. It takes some rose-tainted glasses to spin Mercurial as being an all-good,no-bad tool and Git the exact opposite.
I used Mercurial for a while when I was still also learning Git and migrating from SVN. It had serious UX problems and Git just "clicked" for me in a way that Mercurial just never did.
Perhaps I just wasn't smart enough to see the genius of Mercurial.
It follows then that Windows® is a much better desktop/laptop OS (than Linux or macOS), given its popularity.
Any time someone complains about popularity and tries to sell rewrites in Rust as a solution to attract more users, you know right there and then what kind of delusion you're dealing with.
From all the projects I know, rewriting one in Rust always turned out to be a wrong move, unfortunately.