[Python-Dev] Tip for hg merge

Éric Araujo merwok at netwok.org
Tue Apr 26 17:23:47 CEST 2011


Hi,

> If not, next developer tring to merge will find some other
> unrelated code to merge, and she doesn't have the context knowledge to
> know what to do :-).

Here’s a useful tip: instead of merging pulled changesets with your
branch, do the reverse.  That is:

$ hg pull
$ hg heads .  # get only heads for the checked-out branch
$ hg up other-head
$ hg merge

Now instead of merging unknown code into your checkout, you will merge
the code added by your unpushed changesets to the other code.  If you’re
using a three-way file merge tool, it is your code that will be in the
“other” pane, not the unknown code.

Regards


More information about the Python-Dev mailing list