diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py --- a/mercurial/dirstatemap.py +++ b/mercurial/dirstatemap.py @@ -803,42 +803,3 @@ if rustmod is not None: 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)