Skip to content
Snippets Groups Projects
Commit a8908c13 authored by Siddharth Agarwal's avatar Siddharth Agarwal
Browse files

filemerge: add support for change/delete conflicts to the ':other' merge tool

This, along with the previous patch to the :local merge tool, covers the full
matrix of change/delete conflicts.
parent 63d6bc87
No related branches found
No related tags found
No related merge requests found
...@@ -242,8 +242,14 @@ ...@@ -242,8 +242,14 @@
@internaltool('other', nomerge) @internaltool('other', nomerge)
def _iother(repo, mynode, orig, fcd, fco, fca, toolconf): def _iother(repo, mynode, orig, fcd, fco, fca, toolconf):
"""Uses the other version of files as the merged version.""" """Uses the other version of files as the merged version."""
repo.wwrite(fcd.path(), fco.data(), fco.flags()) if fco.isabsent():
return 0, False # local changed, remote deleted -- 'deleted' picked
repo.wvfs.unlinkpath(fcd.path())
deleted = True
else:
repo.wwrite(fcd.path(), fco.data(), fco.flags())
deleted = False
return 0, deleted
@internaltool('fail', nomerge) @internaltool('fail', nomerge)
def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf): def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment