mergestate: inline `_resolve()` into `resolve()`
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 03 Dec 2021 15:43:54 -0800
changeset 48429 f9bc36863923
parent 48428 c25a67cfc291
child 48430 921853391276
mergestate: inline `_resolve()` into `resolve()` The caller is now trivial, so the indirection is pointless. Differential Revision: https://phab.mercurial-scm.org/D11857
mercurial/mergestate.py
--- a/mercurial/mergestate.py	Fri Dec 03 13:53:02 2021 -0800
+++ b/mercurial/mergestate.py	Fri Dec 03 15:43:54 2021 -0800
@@ -313,10 +313,10 @@
         """return extras stored with the mergestate for the given filename"""
         return self._stateextras[filename]
 
-    def _resolve(self, dfile, wctx):
-        """rerun merge process for file path `dfile`.
-        Returns the return value of merge obtained from filemerge._filemerge().
-        """
+    def resolve(self, dfile, wctx):
+        """run merge process for dfile
+
+        Returns the exit code of the merge."""
         if self[dfile] in (
             MERGE_RECORD_RESOLVED,
             LEGACY_RECORD_DRIVER_RESOLVED,
@@ -405,12 +405,6 @@
 
         return merge_ret
 
-    def resolve(self, dfile, wctx):
-        """run merge process for dfile
-
-        Returns the exit code of the merge."""
-        return self._resolve(dfile, wctx)
-
     def counts(self):
         """return counts for updated, merged and removed files in this
         session"""