Mercurial > public > mercurial-scm > hg
diff mercurial/merge.py @ 12010:ce818cf215dc
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 21 Aug 2010 10:48:49 -0500 |
parents | d12fe809e1ee fad5ed0ff997 |
children | ad787252fed6 |
line wrap: on
line diff
--- a/mercurial/merge.py Fri Aug 20 21:28:14 2010 -0500 +++ b/mercurial/merge.py Sat Aug 21 10:48:49 2010 -0500 @@ -270,7 +270,12 @@ repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd)) fcl = wctx[f] fco = mctx[f2] - fca = fcl.ancestor(fco, actx) or repo.filectx(f, fileid=nullrev) + if mctx == actx: # backwards, use working dir parent as ancestor + fca = fcl.parents()[0] + else: + fca = fcl.ancestor(fco, actx) + if not fca: + fca = repo.filectx(f, fileid=nullrev) ms.add(fcl, fco, fca, fd, flags) if f != fd and move: moves.append(f)