Mercurial > hg
changeset 27122:77d760ba8dcd
mergestate: explicitly forget 'dc' conflicts where the deleted side is picked
Once we move change/delete conflicts into the resolve phase, a 'dc' file might
first be resolved by picking the other side, then later be resolved by picking
the local side. For this transition we want to make sure that the file goes
back to not being in the dirstate.
This has no impact on conflicts during the initial merge.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 23 Nov 2015 18:03:25 -0800 |
parents | b08c31cfc4b6 |
children | 4dc5951df1e4 |
files | mercurial/merge.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Mon Nov 23 19:06:15 2015 -0800 +++ b/mercurial/merge.py Mon Nov 23 18:03:25 2015 -0800 @@ -458,10 +458,13 @@ if complete: action = None if deleted: - if not fcd.isabsent(): + if fcd.isabsent(): + # dc: local picked. Need to drop if present, which may + # happen on re-resolves. + action = 'f' + else: # cd: remote picked (or otherwise deleted) action = 'r' - # else: dc: local picked (no action necessary) else: if fcd.isabsent(): # dc: remote picked action = 'g' @@ -511,7 +514,7 @@ def actions(self): """return lists of actions to perform on the dirstate""" - actions = {'r': [], 'a': [], 'g': []} + actions = {'r': [], 'f': [], 'a': [], 'g': []} for f, (r, action) in self._results.iteritems(): if action is not None: actions[action].append((f, None, "merge result"))