[Updated] D11434: dirstate: remove the `normallookup` function

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Mon Sep 20 14:08:18 UTC 2021


Closed by commit rHGccb9cc47b7b6: dirstate: remove the `normallookup` function (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11434?vs=30272&id=30316

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11434/new/

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

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



To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210920/b0d4f60e/attachment-0002.html>


More information about the Mercurial-patches mailing list