merge.mergestate: add a wrapper around resolve
authorSiddharth Agarwal <sid0@fb.com>
Sun, 11 Oct 2015 18:29:50 -0700
changeset 26615 c9223a3979b7
parent 26614 ef1eb6df7071
child 26616 2f1fce0d4e86
merge.mergestate: add a wrapper around resolve The resolve function will be broken up into separate pre-resolve and resolve steps.
mercurial/merge.py
--- a/mercurial/merge.py	Fri Oct 09 13:54:52 2015 -0700
+++ b/mercurial/merge.py	Sun Oct 11 18:29:50 2015 -0700
@@ -287,7 +287,7 @@
             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 @@
             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