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

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 12, 2015, 8:09 p.m.
Message ID <97b41189812468236377.1444680579@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10970/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 12, 2015, 8:09 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.

Patch

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