[PATCH 1 of 1] subrepo: fix for merge inconsistencies
Friedrich Kastner-Masilko
kastner_masilko at at.festo.com
Wed Feb 29 14:27:32 UTC 2012
# HG changeset patch
# User Friedrich Kastner-Masilko <kastner_masilko at at.festo.com>
# Date 1330521897 -3600
# Node ID 8980b37cb4a68bae7864df425d0d1a0151491b24
# Parent a4413624d0146f1edaa712a32c36c3409209ed6a
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 a4413624d014 -r 8980b37cb4a6 mercurial/subrepo.py
--- a/mercurial/subrepo.py Tue Feb 28 21:17:53 2012 -0600
+++ b/mercurial/subrepo.py Wed Feb 29 14:24:57 2012 +0100
@@ -508,7 +508,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:
More information about the Mercurial-devel
mailing list