45 points · by gitdude · 11y ago · 58 comments
Mercurial does a good job at facilitating everyone's favourite, yet obscure, workflow. There are people who prefer using things like mq (patchset queues), which until recently also was Mozilla's recommended workflow. Queues are a novel way to organise your work in progress, but is quite different from what people are used to coming from svn or git.
More recently bookmarks were added (also as an extension you have to opt-in to), which are reminiscent of git branches. They make it possible to have a HEAD-based workflow where you rebase frequently, much like you would with git, only that the defaults of `hg log` and various other commands don't interop very well, which means you have to memorise a lot of flags and arguments.
There are also many strange defaults in hg that you simply have to get used to, for example that `hg push` by default pushes everything. I have a hook in place on the remote end which prevents me from doing that.
By far the most frustrating experience with hg is that you cannot expect the default installation to come with sensible defaults. The argument is that keeping "advanced" functionality out of core prevents new users from accidentally using it.
An unintended consequence is that it sometimes makes it difficult for other people to help when you're stuck because more often than not their environment won't match yours.
One frequently lauded aspect of hg is that the user interface is easier to understand. Whilst I appreciate difference in taste, my experience is the opposite. If you follow the HEAD-based bookmark-style workflow, I find many cognitive dissonances in how the bookmark feature interacts with other commands.
At Mozilla we use hg for the canonical repositories and we have many Mozilla related extensions, but whereas I use hg every day now and it's a fine experience as long as I stay within the marked lines, I would return to git in a heartbeat if I had the chance.
Up to this point your comment was true, objective, and very helpful (though I would remove the word "obscure"). Then it starts to sound like maybe you learned git first and got used to it's defaults and now mercurial tastes a little funny to you. I'm guessing this because I got good with mercurial first and then when I tried git it left a funny taste in my mouth. I thought, what is this "fast-forward merge" that doesn't actually merge anything? Why do people talk about deleting a branch when it doesn't actually delete the branch of commits in the DAG of commits, just a pointer? Why does pull do a pull (fetch) and merge (mercurial's pull just pulls, or fetches, I guess)? Stuff like that.
https://en.wikipedia.org/wiki/Imprinting_%28psychology%29#Ba...
Habituation is the best user interface.
Bookmarks were added to the core in mercurial version 1.8 in 2011. No configuration is needed to enable them.
It's a very widespread common misconception that "HEAD" means "latest", probably because this is what it means in svn.
And this brings up some very interesting usability research from Google: the vast majority of people who use any VCS don't really understand it:
http://static.googleusercontent.com/media/research.google.co...
I realise you are trying to say that you like to rebase and linearise your hg history. This is just `hg pull --rebase`, just like `git pull --rebase`.
> only that the defaults of `hg log` and various other commands don't interop very well, which means you have to memorise a lot of flags and arguments.
I assume you want something like git where "log" by default starts from the currently checked out commit and hides the rest?
You can have that, and if you don't like memorising the incantations to do that, you can save them as aliases in your ~/.hgrc
I use both Mercurial and Git, and honestly, they aren't that different. Unless you're doing something very specific I don't see why you would choose one over the other.
I don't know much about mercurial. I use git because somebody said it is easier to rewrite history in git.
source: http://en.wikipedia.org/wiki/Apache_Subversion#Limitations_a...
Sounds like you should be using Subversion then.
Do you understand how history rewriting works in git? do you understand why it's there? do you understand why people use it?
Personal beliefs don't advance computing, hard facts do.
http://michaeldehaan.net/post/116465000577/understanding-whe...
though i have to use git at work daily. github to add insult...
my finger memory is now on git. and that's where git "wins". the chance that you will be forced to use it and learn the awful laundry list of steps to properly use it (hint, if you ever type "pull" you are doing it wrong) you get your finger memory and then curse when you have to use the simple and more intuitive solutions. damn dumb fingers.
Genuine question: what's wrong with executing 'git pull' on a branch you haven't changed locally?
As you say it's bad practice and shouldn't happen. I use gitlab and GitHub where branches can be protected to only allow merges via their web interfaces.
At least that is what the docs say: http://git-scm.com/docs/git-pull
What am I missing?
http://selenic.com/hg/log?rev=google.com&revcount=80
Facebook is almost entirely hg by this point, though.