diff mercurial/pure/parsers.py @ 47666:e53256a9f9c5

dirstate-item: add a `set_possibly_dirty` method See inline documentation for details. The pushes the AMBIGUOUS_TIME implementation further down the line within the DirstateItem only. When this cleanup is done we will be able to stop using this representation internally. Differential Revision: https://phab.mercurial-scm.org/D11119
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 06:29:30 +0200
parents a4443f66be6a
children d06ced90c80f
line wrap: on
line diff
--- a/mercurial/pure/parsers.py	Tue Jul 13 13:06:50 2021 +0200
+++ b/mercurial/pure/parsers.py	Mon Jul 19 06:29:30 2021 +0200
@@ -81,6 +81,14 @@
             mtime=mtime,
         )
 
+    def set_possibly_dirty(self):
+        """Mark a file as "possibly dirty"
+
+        This means the next status call will have to actually check its content
+        to make sure it is correct.
+        """
+        self._mtime = AMBIGUOUS_TIME
+
     def __getitem__(self, idx):
         if idx == 0 or idx == -4:
             msg = b"do not use item[x], use item.state"