Read about our upcoming Code of Conduct on this issue

Commit 406451cb authored by Siddharth Agarwal's avatar Siddharth Agarwal
Browse files

merge.applyupdates: create absentfilectxes for change/delete conflicts

At the moment no change/delete conflicts get to this point -- we're going to
make that happen in an upcoming patch.
parent ef6f98473a48
......@@ -986,13 +986,20 @@ def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None):
f1, f2, fa, move, anc = args
if f == '.hgsubstate': # merged internally
continue
repo.ui.debug(" preserving %s for resolve of %s\n" % (f1, f))
fcl = wctx[f1]
fco = mctx[f2]
if f1 is None:
fcl = filemerge.absentfilectx(wctx, fa)
else:
repo.ui.debug(" preserving %s for resolve of %s\n" % (f1, f))
fcl = wctx[f1]
if f2 is None:
fco = filemerge.absentfilectx(mctx, fa)
else:
fco = mctx[f2]
actx = repo[anc]
if fa in actx:
fca = actx[fa]
else:
# TODO: move to absentfilectx
fca = repo.filectx(f1, fileid=nullrev)
ms.add(fcl, fco, fca, f)
if f1 != f and move:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment