Mercurial > hg-stable
changeset 48149:25836b0029f5
dirstatemap: drop legacy method on the dirstatemap wrapper
They are no longer in use now that the Rust wrapper version of the Dirstatemap
are back in line with the Python one.
Differential Revision: https://phab.mercurial-scm.org/D11582
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 02 Oct 2021 11:39:57 +0200 |
parents | bda85920de6b |
children | 38488d488ec1 |
files | mercurial/dirstatemap.py |
diffstat | 1 files changed, 0 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstatemap.py Sat Oct 02 00:15:24 2021 +0200 +++ b/mercurial/dirstatemap.py Sat Oct 02 11:39:57 2021 +0200 @@ -803,42 +803,3 @@ def __setitem__(self, key, value): assert isinstance(value, DirstateItem) self._map.set_dirstate_item(key, value) - - ### Legacy method we need to get rid of - - def addfile( - self, - f, - mode=0, - size=None, - mtime=None, - added=False, - merged=False, - from_p2=False, - possibly_dirty=False, - ): - if added: - assert not possibly_dirty - assert not from_p2 - item = DirstateItem.new_added() - elif merged: - assert not possibly_dirty - assert not from_p2 - item = DirstateItem.new_merged() - elif from_p2: - assert not possibly_dirty - item = DirstateItem.new_from_p2() - elif possibly_dirty: - item = DirstateItem.new_possibly_dirty() - else: - assert size is not None - assert mtime is not None - size = size & rangemask - mtime = mtime & rangemask - item = DirstateItem.new_normal(mode, size, mtime) - self._map.addfile(f, item) - if added: - self.copymap.pop(f, None) - - def removefile(self, *args, **kwargs): - return self._map.removefile(*args, **kwargs)