D11127: dirstate-map: do not use `size` to gate copy dropping during remove_file
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Mon Jul 19 10:40:03 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This get us close to moving the block right above withing the DirstateItem
object. Doing so will help us getting rid of magic constant at the dirstatemap
level.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D11127
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
@@ -222,7 +222,7 @@
elif entry.from_p2:
size = FROM_P2
self.otherparentset.add(f)
- if size == 0:
+ if entry is not None and not (entry.merged or entry.from_p2):
self.copymap.pop(f, None)
if entry is not None and not entry.removed and "_dirs" in self.__dict__:
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list