# HG changeset patch # User Siddharth Agarwal # Date 1447483389 28800 # Node ID fa2daf0e61abe57253325584976fbced0d7bcf6a # Parent 042422f3a7734b220e6d2a111abf51fc06c9cd3f merge: make 'cd' and 'dc' actions store the same arguments as 'm' We're going to treat these conflicts similarly to merge conflicts, and this change to the way we store things in memory makes future code a lot simpler. diff -r 042422f3a773 -r fa2daf0e61ab hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Fri Nov 13 14:24:22 2015 -0800 +++ b/hgext/largefiles/overrides.py Fri Nov 13 22:43:09 2015 -0800 @@ -481,6 +481,9 @@ (lm, largs, lmsg) = actions.get(lfile, (None, None, None)) (sm, sargs, smsg) = actions.get(standin, (None, None, None)) if sm in ('g', 'dc') and lm != 'r': + if sm == 'dc': + f1, f2, fa, move, anc = sargs + sargs = (p2[f2].flags(),) # Case 1: normal file in the working copy, largefile in # the second parent usermsg = _('remote turned local normal file %s into a largefile\n' @@ -496,6 +499,9 @@ else: actions[standin] = ('r', None, 'replaced by non-standin') elif lm in ('g', 'dc') and sm != 'r': + if lm == 'dc': + f1, f2, fa, move, anc = largs + largs = (p2[f2].flags(),) # Case 2: largefile in the working copy, normal file in # the second parent usermsg = _('remote turned local largefile %s into a normal file\n' diff -r 042422f3a773 -r fa2daf0e61ab mercurial/merge.py --- a/mercurial/merge.py Fri Nov 13 14:24:22 2015 -0800 +++ b/mercurial/merge.py Fri Nov 13 22:43:09 2015 -0800 @@ -623,7 +623,8 @@ if acceptremote: actions[f] = ('r', None, "remote delete") else: - actions[f] = ('cd', None, "prompt changed/deleted") + actions[f] = ('cd', (f, None, f, False, pa.node()), + "prompt changed/deleted") elif n1[20:] == 'a': # This extra 'a' is added by working copy manifest to mark # the file as locally added. We should forget it instead of @@ -673,7 +674,8 @@ if acceptremote: actions[f] = ('c', (fl2,), "remote recreating") else: - actions[f] = ('dc', (fl2,), "prompt deleted/changed") + actions[f] = ('dc', (None, f, f, False, pa.node()), + "prompt deleted/changed") return actions, diverge, renamedelete @@ -1264,7 +1266,8 @@ actions['a'].append((f, None, "prompt keep")) for f, args, msg in sorted(actions['dc']): - flags, = args + f1, f2, fa, move, anc = args + flags = p2[f2].flags() if repo.ui.promptchoice( _("remote changed %s which local deleted\n" "use (c)hanged version or leave (d)eleted?"