Mercurial > hg
diff mercurial/dirstatemap.py @ 47970:7ab99007fce5
dirstate: move the copymap drop inside dropfile
Since the copymap is part of the dirstatemap it make more sense for the
dirstatemap to manage it directly.
This is part of a generic effort to move unified logic at lower level and to
clean up higher level API.
Differential Revision: https://phab.mercurial-scm.org/D11417
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 02 Sep 2021 02:44:12 +0200 |
parents | e02f9af7aed1 |
children | 5a6c1ef4bcac |
line wrap: on
line diff
--- a/mercurial/dirstatemap.py Tue Sep 14 18:25:51 2021 +0200 +++ b/mercurial/dirstatemap.py Thu Sep 02 02:44:12 2021 +0200 @@ -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)