mercurial/subrepo.py
branchstable
changeset 10251 a19d2993385d
parent 10068 8f14f749f471
child 10252 0bc93fa2cf2b
child 10263 25e572394f5c
--- a/mercurial/subrepo.py	Fri Jan 15 09:50:52 2010 +0100
+++ b/mercurial/subrepo.py	Fri Jan 15 21:08:04 2010 +0100
@@ -209,9 +209,12 @@
         self._get(state)
         cur = self._repo['.']
         dst = self._repo[state[1]]
-        if dst.ancestor(cur) == cur:
+        anc = dst.ancestor(cur)
+        if anc == cur:
             self._repo.ui.debug("updating subrepo %s\n" % self._path)
             hg.update(self._repo, state[1])
+        elif anc == dst:
+            self._repo.ui.debug("skipping subrepo %s\n" % self._path)
         else:
             self._repo.ui.debug("merging subrepo %s\n" % self._path)
             hg.merge(self._repo, state[1], remind=False)