changeset 47997:70547a7d5930

dirstate: drop dirstatemap.addfile All users have been migrated. Differential Revision: https://phab.mercurial-scm.org/D11437
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 15 Sep 2021 18:30:06 +0200
parents aa442fde0ea5
children 938a7769050c
files mercurial/dirstatemap.py
diffstat 1 files changed, 0 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstatemap.py	Wed Sep 15 18:27:57 2021 +0200
+++ b/mercurial/dirstatemap.py	Wed Sep 15 18:30:06 2021 +0200
@@ -177,51 +177,6 @@
         self.copymap.pop(filename, None)
         self.nonnormalset.discard(filename)
 
-    def addfile(
-        self,
-        f,
-        mode=0,
-        size=None,
-        mtime=None,
-        added=False,
-        merged=False,
-        from_p2=False,
-        possibly_dirty=False,
-    ):
-        """Add a tracked file to the dirstate."""
-        if added:
-            assert not merged
-            assert not possibly_dirty
-            assert not from_p2
-            new_entry = DirstateItem.new_added()
-            self.copymap.pop(f, None)
-        elif merged:
-            assert not possibly_dirty
-            assert not from_p2
-            new_entry = DirstateItem.new_merged()
-        elif from_p2:
-            assert not possibly_dirty
-            new_entry = DirstateItem.new_from_p2()
-        elif possibly_dirty:
-            new_entry = DirstateItem.new_possibly_dirty()
-        else:
-            assert size is not None
-            assert mtime is not None
-            size = size & rangemask
-            mtime = mtime & rangemask
-            new_entry = DirstateItem.new_normal(mode, size, mtime)
-        old_entry = self.get(f)
-        self._dirs_incr(f, old_entry)
-        self._map[f] = new_entry
-        if new_entry.dm_nonnormal:
-            self.nonnormalset.add(f)
-        else:
-            self.nonnormalset.discard(f)
-        if new_entry.dm_otherparent:
-            self.otherparentset.add(f)
-        else:
-            self.otherparentset.discard(f)
-
     def reset_state(
         self,
         filename,