[PATCH 7 of 7 mergedriver] filemerge: don't try using external tools on change/delete conflicts

Siddharth Agarwal sid0 at fb.com
Thu Nov 19 15:33:59 CST 2015


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1447487863 28800
#      Fri Nov 13 23:57:43 2015 -0800
# Node ID 4b90631e13b8d474a808f68733047a8c48c7b80c
# Parent  2bdd5467ac12506533d343f811efef690b88261c
# Available At http://42.netv6.net/sid0-wip/hg/
#              hg pull http://42.netv6.net/sid0-wip/hg/ -r 4b90631e13b8
filemerge: don't try using external tools on change/delete conflicts

This is mostly for completeness' sake -- the current code shouldn't get to this
point.

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -447,6 +447,10 @@ def _idump(repo, mynode, orig, fcd, fco,
 
 def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
     tool, toolpath, binary, symlink = toolconf
+    if fcd.isabsent() or fco.isabsent():
+        repo.ui.warn(_('warning: %s cannot merge change/delete conflict '
+                       'for %s\n') % (tool, fcd.path()))
+        return False, 1, None
     a, b, c, back = files
     out = ""
     env = {'HG_FILE': fcd.path(),


More information about the Mercurial-devel mailing list