changeset 27041:0e330f59ef68

filemerge: don't attempt to premerge change/delete conflicts This is mostly for completeness' sake -- at the moment we don't support any tools for change/delete conflicts that would do a premerge.
author Siddharth Agarwal <sid0@fb.com>
date Fri, 13 Nov 2015 23:56:00 -0800
parents 1bde66b89bb2
children 30b919bc49bf
files mercurial/filemerge.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Fri Nov 13 23:58:05 2015 -0800
+++ b/mercurial/filemerge.py	Fri Nov 13 23:56:00 2015 -0800
@@ -287,9 +287,9 @@
     used to resolve these conflicts."""
     return 1, False
 
-def _premerge(repo, toolconf, files, labels=None):
+def _premerge(repo, fcd, fco, fca, toolconf, files, labels=None):
     tool, toolpath, binary, symlink = toolconf
-    if symlink:
+    if symlink or fcd.isabsent() or fco.isabsent():
         return 1
     a, b, c, back = files
 
@@ -610,7 +610,7 @@
             labels = _formatlabels(repo, fcd, fco, fca, labels)
 
         if premerge and mergetype == fullmerge:
-            r = _premerge(repo, toolconf, files, labels=labels)
+            r = _premerge(repo, fcd, fco, fca, toolconf, files, labels=labels)
             # complete if premerge successful (r is 0)
             return not r, r, False