dirstate-map: do not use `size` to gate copy dropping during remove_file
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.
Differential Revision: https://phab.mercurial-scm.org/D11127
--- a/mercurial/dirstatemap.py Thu Jul 15 00:27:29 2021 +0200
+++ b/mercurial/dirstatemap.py Wed Jul 14 23:32:35 2021 +0200
@@ -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__: