filemerge._mergecheck: add check for change/delete conflicts
authorSiddharth Agarwal <sid0@fb.com>
Fri, 13 Nov 2015 23:58:05 -0800
changeset 27040 1bde66b89bb2
parent 27039 d7517deedf86
child 27041 0e330f59ef68
filemerge._mergecheck: add check for change/delete conflicts Merge tools that perform an actual 3-way merge can't handle change/delete conflicts. This adds a check for that.
mercurial/filemerge.py
--- a/mercurial/filemerge.py	Sun Nov 15 21:40:15 2015 -0800
+++ b/mercurial/filemerge.py	Fri Nov 13 23:58:05 2015 -0800
@@ -328,6 +328,10 @@
         repo.ui.warn(_('warning: internal %s cannot merge symlinks '
                        'for %s\n') % (tool, fcd.path()))
         return False
+    if fcd.isabsent() or fco.isabsent():
+        repo.ui.warn(_('warning: internal %s cannot merge change/delete '
+                       'conflict for %s\n') % (tool, fcd.path()))
+        return False
     return True
 
 def _merge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, mode):