When I have to commit merges I’ve done in mercurial, I just do hg commit -m "Merge."
What do you usually do when Merging? Do you write the changesets in a comment, or try to write “meaningfull” comments (since I think they are useless, except when you’re doing merges from two really different repos in different locations).
Is it possible to create an alias in mercurial (like hgmerge) in [alias] in hgrc, that automatically does hg commit -m "Merge: heads ${head}, ${head} ..."?
It would be easy to create that alias (I’ll do it below) but it’s also of almost no value. It’s very easy to pull the parent1 and parent2 values out of a merge changeset, so it’s not really telling you anything more than just “merge” would.
Personally, even on single person repos I try to put something at least halfway useful even if it’s just something like these:
There’s always some reason history diverged, even if it’s a totally mundane reason like forgetting to update or working disconnected at the coffeeshop, and that’s what I note.
That said you could do this:
which you sould make a shell alias with:
Allowing you to run
hg mycommit, but just dig for the better description.P.S. Someone is going to suggest the
fetchextension. Ignore them.