Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.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 | 1168e54b727c |
children | 485ae37a7ec5 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon Jul 19 00:29:36 2021 +0200 +++ b/mercurial/dirstate.py Sun Jul 18 23:42:22 2021 +0200 @@ -506,6 +506,13 @@ self._updatedfiles.add(filename) self._normal(filename, parentfiledata=parentfiledata) + @requires_no_parents_change + def set_possibly_dirty(self, filename): + """record that the current state of the file on disk is unknown""" + self._dirty = True + self._updatedfiles.add(filename) + self._map.set_possibly_dirty(filename) + @requires_parents_change def update_file_p1( self,