changeset 47672:0efaa1bbad2b

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 14 Jul 2021 23:32:35 +0200
parents 20f366db3e5f
children 37825a85d3b0
files mercurial/dirstatemap.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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__: