# HG changeset patch # User Pierre-Yves David # Date 2021-09-15 16:12:55 # Node ID 14fa2e583422d98a992050d5eca26bfbdfa9078b # Parent 625b84c1abddaaca8e76c6ab057f6fdddc6aaadd dirstate: replace the use of `_normallookup` in `rebuild` Normal lookup is a complicated function that we want to get rid of. Differential Revision: https://phab.mercurial-scm.org/D11432 diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -853,7 +853,17 @@ class dirstate(object): self._map.setparents(parent, self._nodeconstants.nullid) for f in to_lookup: - self._normallookup(f) + + if self.in_merge: + self.set_tracked(f) + else: + self._map.reset_state( + f, + wc_tracked=True, + p1_tracked=True, + possibly_dirty=True, + ) + self._updatedfiles.add(f) for f in to_drop: if self._map.dropfile(f): self._updatedfiles.add(f)