Mercurial > hg
changeset 9781:eccc8aacd6f9
subrepo: do a linear update when appropriate
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 07 Nov 2009 16:31:43 -0600 |
parents | 1ee085511b89 |
children | c1c40511c276 8eacee85d019 |
files | mercurial/subrepo.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/subrepo.py Sat Nov 07 16:30:42 2009 -0600 +++ b/mercurial/subrepo.py Sat Nov 07 16:31:43 2009 -0600 @@ -200,7 +200,12 @@ def merge(self, state): self._get(state) - hg.merge(self._repo, state[1], remind=False) + cur = self._repo['.'] + dst = self._repo[state[1]] + if dst.ancestor(cur) == cur: + hg.update(self._repo, state[1]) + else: + hg.merge(self._repo, state[1], remind=False) def push(self, force): # push subrepos depth-first for coherent ordering