changeset 48018:ccb9cc47b7b6

dirstate: remove the `normallookup` function All use have been migrated. Differential Revision: https://phab.mercurial-scm.org/D11434
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 15 Sep 2021 12:33:59 +0200
parents eb1f8d6e9419
children e7d0a511965c
files mercurial/dirstate.py
diffstat 1 files changed, 0 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Thu Sep 16 14:14:33 2021 +0200
+++ b/mercurial/dirstate.py	Wed Sep 15 12:33:59 2021 +0200
@@ -718,31 +718,6 @@
         mtime = s[stat.ST_MTIME]
         return (mode, size, mtime)
 
-    def _normallookup(self, f):
-        '''Mark a file normal, but possibly dirty.'''
-        if self.in_merge:
-            # if there is a merge going on and the file was either
-            # "merged" or coming from other parent (-2) before
-            # being removed, restore that state.
-            entry = self._map.get(f)
-            if entry is not None:
-                # XXX this should probably be dealt with a a lower level
-                # (see `merged_removed` and `from_p2_removed`)
-                if entry.merged_removed or entry.from_p2_removed:
-                    source = self._map.copymap.get(f)
-                    if entry.merged_removed:
-                        self._addpath(f, merged=True)
-                    else:
-                        self._addpath(f, from_p2=True)
-                    self._map.copymap.pop(f, None)
-                    if source is not None:
-                        self.copy(source, f)
-                    return
-                elif entry.merged or entry.from_p2:
-                    return
-        self._addpath(f, possibly_dirty=True)
-        self._map.copymap.pop(f, None)
-
     def _discoverpath(self, path, normed, ignoremissing, exists, storemap):
         if exists is None:
             exists = os.path.lexists(os.path.join(self._root, path))