[PATCH 3 of 6 mergedriver] merge.mergestate: add a wrapper around resolve

Siddharth Agarwal sid0 at fb.com
Mon Oct 12 15:09:39 CDT 2015


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1444613390 25200
#      Sun Oct 11 18:29:50 2015 -0700
# Node ID 97b41189812468236377eaf70a153fb5e6da2a1e
# Parent  0092af614c35fec043cbff137b0468790a91ca7e
merge.mergestate: add a wrapper around resolve

The resolve function will be broken up into separate pre-resolve and resolve
steps.

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -287,7 +287,7 @@ class mergestate(object):
             if entry[0] == 'u':
                 yield f
 
-    def resolve(self, dfile, wctx, labels=None):
+    def _resolve(self, dfile, wctx, labels=None):
         """rerun merge process for file path `dfile`"""
         if self[dfile] == 'r':
             return 0
@@ -323,6 +323,10 @@ class mergestate(object):
             self.mark(dfile, 'r')
         return r
 
+    def resolve(self, dfile, wctx, labels=None):
+        """rerun merge process for file path `dfile`"""
+        return self._resolve(dfile, wctx, labels=labels)
+
 def _checkunknownfile(repo, wctx, mctx, f, f2=None):
     if f2 is None:
         f2 = f


More information about the Mercurial-devel mailing list