3 ms·
I've said this in the past on HN posts about mercurial but it bears repeating: if you had bad experiences with mercurial in the past, I strongly urge you to spi
by ngoldbaum 11y ago
I've said this in the past on HN posts about mercurial but it bears repeating: if you had bad experiences with mercurial in the past, I strongly urge you to spin up one of the latest releases. Engineers at Google, Facebook, Mozilla, and Unity contribute regularly and mercurial has become more feature rich and substantially faster over the past few years.
Mercurial does everything that git does (in fact, you can pull from or push to git repos with hg-git), has a UI that's easier to learn, and has online help that is terse and helpful. As far as killer features go, check out phases[1] and changeset evolution[2]. The latter is still at alpha level and the UI is unstable, but I use it for day-to-day work and find it incredibly useful.
[1] https://mercurial.selenic.com/wiki/Phases https://mercurial.selenic.com/wiki/Phases
[2] https://bitbucket.org/marmoute/mutable-history https://bitbucket.org/marmoute/mutable-history
- shuzchen 11y agoI'm also a big fan of hg revsets: https://www.selenic.com/hg/help/revsets https://www.selenic.com/hg/help/revsets Granted, it's not a commonly used feature by solo devs working on their own projects, but is useful for team repos that get large enough where you need to do audits on the codebase.
- ngoldbaum 11y agoAgreed, revsets are another amazingly useful feature. Also check out templates[1], which let you customize pretty much everything about hg's output. [1] http://jordi.inversethought.com/blog/customising-mercurial-like-a-pro/ http://jordi.inversethought.com/blog/customising-mercurial-l...
- emn13 11y agoEven though I use git day-to-day, I keep around an hg-git clone specifically for revsets. What's the point of a version control system if you can't actually find anything in the history?
- leonardinius 11y agoThanks for the tip. I never thought of this particular use case. Will give it try.
- jcranmer 11y agoAh yes, changeset evolution, or, as I like to think of it, how to do rebasing properly. However, try convincing git aficionados that there's a much safer way of rebasing than git rebase. :-(
- hngiszmo 11y agoOh, mercurial was my old love but due to peer pressure I'm now a git user. Always liked hg better and so happy to hear it's still vibrant :)
- mycelium 11y agoAfter it became clear that darcs wasn't going to win the next gen source control wars I switched to mercurial. I now use and love git for its own charms, but I'd love to come across mercurial again professionally. I own up to my preference to rewrite history—git has facilitated that in equal measure to mercurial—but my first source control love is mercurial queues. Queues taught me how to structure and sequence my changesets, and through that the structure of codebase evolution. The user experience is still unmatched by any patch queue on git.
- ngoldbaum 11y agoCheck out the mercurial evolve extension. You can now do all kinds of local rewriting, collapsing, whatever using regular mercurial commits.
- david-given 11y agoIt's worth looking at hg-git. It works brilliantly --- seamless interoperability between hg and git; you just tell hg to clone a git repository and it Just Works. Merges, branches, tags, the lot, but with sensible commands and workflow. There are a few rough edges; creating a new branch (git branches are mapped onto hg bookmarks) is a bit clunky, and it's easier to create the branch at the git end and then do an hg pull to get all the metadata set up, but I mainly use it with github and github's UI for handling branches is pretty good.