dirstatemap: small rework of the `set_untracked` method
This shuffle the code a bit to have it flowing more "naturally". This will help
us to create a common version of this code in the next changesets.
Differential Revision: https://phab.mercurial-scm.org/D11569
--- a/mercurial/dirstatemap.py Sat Oct 02 12:10:46 2021 +0200
+++ b/mercurial/dirstatemap.py Fri Oct 01 18:49:21 2021 +0200
@@ -479,10 +479,9 @@
self._dirs_decr(f, old_entry=entry, remove_variant=not entry.added)
if not entry.merged:
self.copymap.pop(f, None)
- if entry.added:
+ entry.set_untracked()
+ if not entry.any_tracked:
self._map.pop(f, None)
- else:
- entry.set_untracked()
return True