# HG changeset patch # User Friedrich Kastner-Masilko # Date 1330521897 -3600 # Node ID 8ae7626d8bf1c41998bc62dbb929ae032c6ab6ff # Parent 40cc20042fb4f70a5175d66e31a7c092c4359930 subrepo: fix for merge inconsistencies Merging ancestors with children is allowed if they are on different named branches. This did not work for subrepo merges before. To fix this inconsistency, the mergefunc() will now use the simple update path only if both versions are on the same named branch. If not, they get merged into a new changeset, just as if you did the merge from the subrepo's root directly. diff -r 40cc20042fb4 -r 8ae7626d8bf1 mercurial/subrepo.py --- a/mercurial/subrepo.py Wed Feb 29 14:41:11 2012 +0100 +++ b/mercurial/subrepo.py Wed Feb 29 14:24:57 2012 +0100 @@ -500,7 +500,7 @@ anc = dst.ancestor(cur) def mergefunc(): - if anc == cur: + if anc == cur and dst.branch() == cur.branch(): self._repo.ui.debug("updating subrepo %s\n" % subrelpath(self)) hg.update(self._repo, state[1]) elif anc == dst: