Initial Impressions Moving from Git to Mercurial
I recently started looking at hg after using git for years, for no other than curiosity when a friend said he was using it as well. I also am a believer in the argument that we should avoid a monoculture and clearly git is incredibly popular, so I should do my part.
I've been using hg on some personal projects for the last few weeks and here are my thoughts.
SimplerSo far hg is much simpler than git. The help page for a command generally fits on one terminal screen just fine. I generally haven't required going to stackoverflow and copy and paste some magic to solve every problem.
That being said, I haven't gotten myself into any crazy pickles that require doing wild things yet.
Branches vs BookmarksComing from git it's really hard for me to to tell when I want which. This might just be workflow confusion. hg is not just "git but different" it has its own style of development which I haven't entirely grokked.
BranchesAll of the documentation of hg makes one terrified of branches if they come from git. Should I make a branch to fix a typo? Is that bad? After asking some hg devs, they say that as long as you're closing the branch upon merge one should be good. There are a few repos out there that need to really purge branches every few years due to performance issues but those are really far and few between.
hg convertThis is probably the smoothest software experience I've had ever. I converted a few git repos to hg repos with hg convert my-git-repo and it Just Worked. None of my repos are huge so maybe it breaks down on larger ones but this experience was great. Very low bar to just turn something into hg and start working on it.
Unfortunately the hosted hg situation is not super awesome. BitBucket is fine for hosting. And it seems like it's also fine (although I haven't tried) if you're working with forks and creating PRs. However, if you're used to a team working in one repo it's less pleasant. It doesn't really understand bookmarks very well so one cannot do PRs between bookmarks. Working with branches seems to be OK though. I hope BitBucket starts investing (again?) more in hg support.
ConclusionFor the stuff I'm doing, so far I like hg quite a bit. It's just simpler and does things closer to how my brain expects it. For a project with many team members I will need to do some experiments and don't have any such projects on the horizon. If one feels monocultures are worth pushing back against, I'd encourage you to start using it. As I said, I like it, but I am also willing to put up with the less-than-ideal situation for things like BitBucket just to use software I prefer.