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
--- a/mercurial/dirstate.py Wed Sep 15 18:16:16 2021 +0200
+++ b/mercurial/dirstate.py Wed Sep 15 18:12:55 2021 +0200
@@ -853,7 +853,17 @@
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)