comparison mercurial/dirstatemap.py @ 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 724a77979b47
children ff97e793ed36
comparison
equal deleted inserted replaced
47671:20f366db3e5f 47672:0efaa1bbad2b
220 if entry.merged: # merge 220 if entry.merged: # merge
221 size = NONNORMAL 221 size = NONNORMAL
222 elif entry.from_p2: 222 elif entry.from_p2:
223 size = FROM_P2 223 size = FROM_P2
224 self.otherparentset.add(f) 224 self.otherparentset.add(f)
225 if size == 0: 225 if entry is not None and not (entry.merged or entry.from_p2):
226 self.copymap.pop(f, None) 226 self.copymap.pop(f, None)
227 227
228 if entry is not None and not entry.removed and "_dirs" in self.__dict__: 228 if entry is not None and not entry.removed and "_dirs" in self.__dict__:
229 self._dirs.delpath(f) 229 self._dirs.delpath(f)
230 if entry is None and "_alldirs" in self.__dict__: 230 if entry is None and "_alldirs" in self.__dict__: