Mercurial > hg
changeset 12664:545ec1775021
merge: handle no file parent in backwards merge (issue2364)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 09 Oct 2010 14:50:20 -0500 |
parents | 8269af351a64 |
children | cf24b6b5517c |
files | mercurial/merge.py tests/test-merge1.t |
diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Sat Oct 09 14:52:58 2010 -0500 +++ b/mercurial/merge.py Sat Oct 09 14:50:20 2010 -0500 @@ -276,7 +276,10 @@ fcl = wctx[f] fco = mctx[f2] if mctx == actx: # backwards, use working dir parent as ancestor - fca = fcl.parents()[0] + if fcl.parents(): + fca = fcl.parents()[0] + else: + fca = repo.filectx(f, fileid=nullrev) else: fca = fcl.ancestor(fco, actx) if not fca: