D11437: dirstate: drop dirstatemap.addfile
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Sep 16 14:45:22 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
All users have been migrated.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D11437
AFFECTED FILES
mercurial/dirstatemap.py
CHANGE DETAILS
diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -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,
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list