changeset 29247:3e438497edca

dirstate: remove file from copymap on drop As the copymap is short-lived object regenerated from dirstate on each read this didn't affect us in any serious way. But since I've started working on permanent storage of copymap in my experiments with sqldirstate[1] I've seen this bug leaving the copy information in copymap after reverting the file moves and copies. [1] https://www.mercurial-scm.org/wiki/SQLDirstatePlan
author Mateusz Kwapich <mitrandir@fb.com>
date Wed, 25 May 2016 16:09:07 -0700
parents 8dbfd3befbd7
children e6de6ef3e426
files mercurial/dirstate.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Thu May 26 02:35:44 2016 +0000
+++ b/mercurial/dirstate.py	Wed May 25 16:09:07 2016 -0700
@@ -582,6 +582,8 @@
             del self._map[f]
             if f in self._nonnormalset:
                 self._nonnormalset.remove(f)
+            if f in self._copymap:
+                del self._copymap[f]
 
     def _discoverpath(self, path, normed, ignoremissing, exists, storemap):
         if exists is None: