[PATCH 1 of 7 mergedriver] filemerge: add support for change/delete conflicts to the ':local' merge tool

Siddharth Agarwal sid0 at fb.com
Thu Nov 19 21:33:53 UTC 2015


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1447890028 28800
#      Wed Nov 18 15:40:28 2015 -0800
# Node ID 1b30c58e408645fd4a25e0d66d986523208d5302
# Parent  634d6cfdd13970738fc191c9ec7c4f728aea60e7
# Available At http://42.netv6.net/sid0-wip/hg/
#              hg pull http://42.netv6.net/sid0-wip/hg/ -r 1b30c58e4086
filemerge: add support for change/delete conflicts to the ':local' merge tool

This covers two of the four cases of change/delete conflicts -- in an upcoming
patch we'll make :other cover the other two.

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -237,7 +237,7 @@ def _iprompt(repo, mynode, orig, fcd, fc
 @internaltool('local', nomerge)
 def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf):
     """Uses the local version of files as the merged version."""
-    return 0, False
+    return 0, fcd.isabsent()
 
 @internaltool('other', nomerge)
 def _iother(repo, mynode, orig, fcd, fco, fca, toolconf):


More information about the Mercurial-devel mailing list