Mercurial > hg
diff mercurial/dirstatemap.py @ 47720:b0314d8deee1
dirstate: add a `set_possibly_dirty` method
This method will be able to replace some usage of `normallookup` in the future.
Differential Revision: https://phab.mercurial-scm.org/D11162
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 18 Jul 2021 23:42:22 +0200 |
parents | e5fb14a07866 |
children | 460e479be66e |
line wrap: on
line diff
--- a/mercurial/dirstatemap.py Mon Jul 19 00:29:36 2021 +0200 +++ b/mercurial/dirstatemap.py Sun Jul 18 23:42:22 2021 +0200 @@ -168,6 +168,10 @@ normed = util.normcase(filename) self.filefoldmap.pop(normed, None) + def set_possibly_dirty(self, filename): + """record that the current state of the file on disk is unknown""" + self[filename].set_possibly_dirty() + def addfile( self, f, @@ -907,6 +911,12 @@ f[normcase(name)] = name return f + def set_possibly_dirty(self, filename): + """record that the current state of the file on disk is unknown""" + entry = self[filename] + entry.set_possibly_dirty() + self._rustmap.set_v1(filename, entry) + def __setitem__(self, key, value): assert isinstance(value, DirstateItem) self._rustmap.set_v1(key, value)