Patchwork D11857: mergestate: inline `_resolve()` into `resolve()`

login
register
mail settings
Submitter phabricator
Date Dec. 4, 2021, 7:07 a.m.
Message ID <differential-rev-PHID-DREV-v6dvwxk253avk2dqx5tc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50182/
State Superseded
Headers show

Comments

phabricator - Dec. 4, 2021, 7:07 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The caller is now trivial, so the indirection is pointless.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11857

AFFECTED FILES
  mercurial/mergestate.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -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"""