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

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 19, 2015, 9:33 p.m.
Message ID <1b30c58e408645fd4a25.1447968833@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11536/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Siddharth Agarwal - Nov. 19, 2015, 9:33 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.

Patch

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):