July 15th, 2024

Mercurial is simply too good (2020)

Mercurial, a user-friendly version control system created as an alternative to git, offers intuitive commands and safeguards. Despite losing popularity, it sees a resurgence with companies like Facebook adopting it.

Read original articleLink Icon
Mercurial is simply too good (2020)

Mercurial, a version control system released in response to Linus Torvalds' git, was designed for simplicity and user-friendliness. Despite losing to git's complexity, Mercurial offers intuitive commands, powerful search capabilities, and built-in safeguards. Its design allowed for easy collaboration without the need for platforms like GitHub. However, the simplicity of Mercurial led to its decline in popularity compared to git-based platforms. Recently, there has been a resurgence of interest in Mercurial, with companies like Facebook using it for large repositories and efforts to improve its functionality through a rewrite. New hosting forges have emerged to support Mercurial. While Mercurial may not reach the same level of adoption as git, it remains a practical choice for those prioritizing functionality over complexity in version control systems.

Link Icon 12 comments
By @frankjr - 7 months
> The tool was so correctly designed, it didn't give way for something like github to be required for it to work. You only needed someone with an IP and port, and you can get a running host. Have a team near you? Run hg serve and you can collaborate immediately.

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...

By @amluto - 7 months
As a long-time Mercurial user, I'm not entirely convinced. On the one hand, Mercurial's command-line UI is so much better thought-through than git's that the comparison is ridiculous. And mercurial doesn't have an index, yay! (Okay, the ability to, on occasion, stage things is useful, but git's index usually just serves to confuse, even as someone who is also a long-time git user.)

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.

By @wakawaka28 - 7 months
Mercurial is slow and unpopular, and it may never be made fast enough to compete with Git. I learned it once upon a time (when I barely knew Git) and thought the UI was marginally better. But now that I have used Git for a while and learned more, I think Git is way superior technologically and in terms of features.

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.

By @sedatk - 7 months
> It has very intuitive verb commands that do precisely what you would believe they would do.

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.

By @n4r9 - 7 months
> This is precisely the problem. The tool actually solved the problems you needed. So there just simply was no real reason why you would need to spend money on a web host or forge for mercurial.

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?

By @jorams - 7 months
I don't think being too good is the reason it didn't beat git. I think Mercurial didn't beat git because it's only marginally better. Not nearly enough to overcome network effects, but also just not enough to make people move for personal use. It is always advertised as more intuitive, and it might be, but the list of "very intuitive verb commands" largely matches git for the most common actions.

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.

By @ktosobcy - 7 months
I was using Mercurial ages ago because it somewhat felt easier, but at that time I was using Tortoise* and Hg flavour was more straightforward to use that Git one (using mingw or somesuch) and my grasp of the concepts was... lacking to say the least. Fast forward and I took some time to learn git (and also migrated to mac which had great shell) and each time I had to use hg it was painful... odd concepts and it was sooo sloooooooow...
By @lucisferre - 7 months
Yet another Mercurial-stan convinced of their "rightness" in the face of the overwhelming popularity of the alternative. Just blame "Github" and the "cool kids" for picking the "wrong thing".

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.

By @7e - 7 months
A general rule is that when someone clones a piece of software because the original is too hard to understand, the new software is isn’t any getter, because the authors are by definition not the brightest bulbs. That is Mercurial.
By @deepsun - 7 months
> A full rust rewrite of mercurial's internals have been in the works to fully make it just that much better.

From all the projects I know, rewriting one in Rust always turned out to be a wrong move, unfortunately.