diff mercurial/subrepo.py @ 16196:8ae7626d8bf1 stable

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.
author Friedrich Kastner-Masilko <kastner_masilko@at.festo.com>
date Wed, 29 Feb 2012 14:24:57 +0100
parents 04604d1a9fc3
children 0196c437ca9f c9c8c9053119
line wrap: on
line diff
--- 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: