Patchwork D11351: dirstate: drop the `_merge` method

login
register
mail settings
Submitter phabricator
Date Aug. 26, 2021, 2:22 p.m.
Message ID <differential-rev-PHID-DREV-uqdz2c5i2i7i4lke4hj5-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49666/
State Superseded
Headers show

Comments

phabricator - Aug. 26, 2021, 2:22 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  It only has one caller that only use one of the branch, so lets inline that
  branch and clean things up further.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -733,7 +733,7 @@ 
                 if entry.merged_removed or entry.from_p2_removed:
                     source = self._map.copymap.get(f)
                     if entry.merged_removed:
-                        self._merge(f)
+                        self._otherparent(f)
                     elif entry.from_p2_removed:
                         self._otherparent(f)
                     if source is not None:
@@ -762,11 +762,6 @@ 
         self._addpath(filename, added=True)
         self._map.copymap.pop(filename, None)
 
-    def _merge(self, f):
-        if not self.in_merge:
-            return self._normallookup(f)
-        return self._otherparent(f)
-
     def _drop(self, filename):
         """internal function to drop a file from the dirstate"""
         if self._map.dropfile(filename):