dirstate: drop the `_merge` method
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 24 Aug 2021 21:16:48 +0200
changeset 47916 65e3d8028f2e
parent 47915 51cd60c0a345
child 47917 1b3c753b62c6
dirstate: drop the `_merge` method It only has one caller that only use one of the branch, so lets inline that branch and clean things up further. Differential Revision: https://phab.mercurial-scm.org/D11351
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Tue Aug 24 21:12:39 2021 +0200
+++ b/mercurial/dirstate.py	Tue Aug 24 21:16:48 2021 +0200
@@ -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):