D11569: dirstatemap: small rework of the `set_untracked` method
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Sat Oct 2 15:05:05 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D11569
AFFECTED FILES
mercurial/dirstatemap.py
CHANGE DETAILS
diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -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
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list