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.
--- 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