[Updated] D11417: dirstate: move the copymap drop inside dropfile
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Sep 16 08:02:56 UTC 2021
Closed by commit rHG7ab99007fce5: dirstate: move the copymap drop inside dropfile (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11417?vs=30247&id=30255
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11417/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11417
AFFECTED FILES
mercurial/dirstate.py
mercurial/dirstatemap.py
CHANGE DETAILS
diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -316,6 +316,7 @@
old_entry = self._map.pop(f, None)
self._dirs_decr(f, old_entry=old_entry)
self.nonnormalset.discard(f)
+ self.copymap.pop(f, None)
return old_entry is not None
def clearambiguoustimes(self, files, now):
@@ -652,8 +653,9 @@
def removefile(self, *args, **kwargs):
return self._rustmap.removefile(*args, **kwargs)
- def dropfile(self, *args, **kwargs):
- return self._rustmap.dropfile(*args, **kwargs)
+ def dropfile(self, f, *args, **kwargs):
+ self._rustmap.copymap().pop(f, None)
+ return self._rustmap.dropfile(f, *args, **kwargs)
def clearambiguoustimes(self, *args, **kwargs):
return self._rustmap.clearambiguoustimes(*args, **kwargs)
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -749,7 +749,6 @@
if self._map.dropfile(filename):
self._dirty = True
self._updatedfiles.add(filename)
- self._map.copymap.pop(filename, None)
def _discoverpath(self, path, normed, ignoremissing, exists, storemap):
if exists is None:
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210916/85a5fc98/attachment-0002.html>
More information about the Mercurial-patches
mailing list