comparison mercurial/merge.py @ 27091:2ce00de5cc0e

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.
author Siddharth Agarwal <sid0@fb.com>
date Sun, 22 Nov 2015 21:58:28 -0800
parents ef6f98473a48
children b08c31cfc4b6
comparison
equal deleted inserted replaced
27090:ef6f98473a48 27091:2ce00de5cc0e
984 # prescan for merges 984 # prescan for merges
985 for f, args, msg in actions['m']: 985 for f, args, msg in actions['m']:
986 f1, f2, fa, move, anc = args 986 f1, f2, fa, move, anc = args
987 if f == '.hgsubstate': # merged internally 987 if f == '.hgsubstate': # merged internally
988 continue 988 continue
989 repo.ui.debug(" preserving %s for resolve of %s\n" % (f1, f)) 989 if f1 is None:
990 fcl = wctx[f1] 990 fcl = filemerge.absentfilectx(wctx, fa)
991 fco = mctx[f2] 991 else:
992 repo.ui.debug(" preserving %s for resolve of %s\n" % (f1, f))
993 fcl = wctx[f1]
994 if f2 is None:
995 fco = filemerge.absentfilectx(mctx, fa)
996 else:
997 fco = mctx[f2]
992 actx = repo[anc] 998 actx = repo[anc]
993 if fa in actx: 999 if fa in actx:
994 fca = actx[fa] 1000 fca = actx[fa]
995 else: 1001 else:
1002 # TODO: move to absentfilectx
996 fca = repo.filectx(f1, fileid=nullrev) 1003 fca = repo.filectx(f1, fileid=nullrev)
997 ms.add(fcl, fco, fca, f) 1004 ms.add(fcl, fco, fca, f)
998 if f1 != f and move: 1005 if f1 != f and move:
999 moves.append(f1) 1006 moves.append(f1)
1000 1007