Hacker News new | past | comments | ask | show | jobs | submit login

Why is it worth it? I've been happier with other vcs.



Curious, what do you currently use for version control?


I'm not that poster, but Mercurial is just as powerful and much easier to use.


That's what everyone says, but for me, coming from a rebase heavy git workflow, I've found Mercurial far more difficult to learn.

For example, with Mercurial, there's at least four different ways to do a rebase-ish thing: transplant, graft, rebase, and rebase (w/ evolve enabled). It's not obvious which a newbie should pick (rebase+evolve... I think?). Likewise, Mercurial has purge and strip which both delete commits in different ways. Git has multiple ways to do the same thing, but at least it's simple and consistent when you lift the hood.

Undoing any sort of rebase-ish operation in Mercurial also seems difficult and janky. It seems to take multiple steps, and involves unbundling some sort of patch file stored underneath your home directory. Whereas in git, you just update a pointer: `git reset --hard $BRANCH@{1}`. Git's reflog is such a fantastic safety net. Doing any sort of history rewriting in Mercurial feels very dangerous, in comparison.


For example, with Mercurial, there's at least four different ways to do a rebase-ish thing: transplant, graft, rebase, and rebase (w/ evolve enabled). It's not obvious which a newbie should pick (rebase+evolve... I think?).

You're cherrypicking--no pun intended.

By default, Mercurial doesn't do any of these operations; you have to activate extensions.

If I were a newbie coming from Git and I wanted a similar workflow using Mercurial, I would probably start with rebase.

But these days, the Evolve extension is the way to go--using it is a lot easier than anything I've seen or experienced using Git: https://www.mercurial-scm.org/doc/evolution/user-guide.html.

I find it kinda ironic when in this message thread, people are praising a chart like this--http://justinhileman.info/article/git-pretty/. It feels like the DVCS version of Helsinki Syndrome…

By design, Mercurial makes it much harder to shoot yourself in the foot.

In contrast, there's an entire cottage industry (https://ohshitgit.com and the like) to help when you--inevitably--get into a bad situation with Git.


> By default, Mercurial doesn't do any of these operations; you have to activate extensions.

graft is actually built-in, but that's beside the point. Coming from a rebase heavy workflow in git, things like updating a ref or abandoning a commit feel like fundamental operations, and when moving to Mercurial it wasn't obvious which of the built-ins or bundled extensions I needed to be reading about to do these things.

I did eventually find Evolve, as you suggest, but it's not one of the bundled extensions, and it's not something you'll find in the official tutorial, or "The Definitive Guide", or even in most of the SO answers explaining how to do git-like things.

> By design, Mercurial makes it much harder to shoot yourself in the foot.

This is true, but git makes it so easy to recover from those mistakes.


Fortunately "transplant" is just an old extension, so you can just forget entirely about it.

"Graft" copies; "Rebase" moves.

Alternatively just forget about graft also, and use "rebase --keep" to copy.

"Rebase with evolve" is conceptually still rebase.

Mercurial has strip (removes changesets from repository, by default stores a backup). Mercurial does not have purge.

Evolve has ~purge~ prune (marks changesets as obsolete).

Evolve is similar to a git reflog.

Evolve stores more contextual information than the reflog, so Mercurial+Evolve it is safer and easier to undo things than in Git+reflog. Mercurial also pushes some of this contextual information, so even collaborative history rewriting is possible in a safe and easy way, unlike git.


You surely don't know much about Mercurial.

"purge" has NOTHING to do with commits. "purge" only removes file not tracked by Mercurial.

"graft" replaced "transplant".

"graft" copies commits while "rebase" moves commits.

These commands all have very clear purposes, unlike those in Git.

It's just that you haven't really bothered to spend a few minutes on learning them.


purge is a third-party extension; it removes untracked files as you wrote.

But ~purge~ prune is also a command of the evolve extension, that is conceptually similar to strip, as GP wrote.


evolve doesn't have a purge command. It has a prune command.

purge is not a third party extension. It is distributed along with Mercurial.


You are correct, thanks.


I don’t do any of the things you describe.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: