Mercurial > hg
diff mercurial/dirstatemap.py @ 48050:2ac0e6b23222
dirstate: Replace dropfile with drop_item_and_copy_source
Those removing a DirstateItem and a copy source are always done together
Differential Revision: https://phab.mercurial-scm.org/D11493
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 23 Sep 2021 15:36:43 +0200 |
parents | 76f1c76186a1 |
children | 98c0408324e6 |
line wrap: on
line diff
--- a/mercurial/dirstatemap.py Thu Sep 23 15:29:38 2021 +0200 +++ b/mercurial/dirstatemap.py Thu Sep 23 15:36:43 2021 +0200 @@ -606,7 +606,7 @@ self.copymap.pop(filename, None) if not (p1_tracked or p2_tracked or wc_tracked): - self.dropfile(filename) + self._rustmap.drop_item_and_copy_source(filename) elif merged: # XXX might be merged and removed ? entry = self.get(filename) @@ -684,8 +684,7 @@ return False else: if entry.added: - self._rustmap.copymap().pop(f, None) - self._rustmap.dropfile(f) + self._rustmap.drop_item_and_copy_source(f) else: self._rustmap.removefile(f, in_merge=True) return True @@ -693,10 +692,6 @@ def removefile(self, *args, **kwargs): return self._rustmap.removefile(*args, **kwargs) - def dropfile(self, f, *args, **kwargs): - self._rustmap.copymap().pop(f, None) - self._rustmap.dropfile(f, *args, **kwargs) - def clearambiguoustimes(self, *args, **kwargs): return self._rustmap.clearambiguoustimes(*args, **kwargs)