Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
47665:a4443f66be6a | 47666:e53256a9f9c5 |
---|---|
78 state=state, | 78 state=state, |
79 mode=mode, | 79 mode=mode, |
80 size=size, | 80 size=size, |
81 mtime=mtime, | 81 mtime=mtime, |
82 ) | 82 ) |
83 | |
84 def set_possibly_dirty(self): | |
85 """Mark a file as "possibly dirty" | |
86 | |
87 This means the next status call will have to actually check its content | |
88 to make sure it is correct. | |
89 """ | |
90 self._mtime = AMBIGUOUS_TIME | |
83 | 91 |
84 def __getitem__(self, idx): | 92 def __getitem__(self, idx): |
85 if idx == 0 or idx == -4: | 93 if idx == 0 or idx == -4: |
86 msg = b"do not use item[x], use item.state" | 94 msg = b"do not use item[x], use item.state" |
87 util.nouideprecwarn(msg, b'6.0', stacklevel=2) | 95 util.nouideprecwarn(msg, b'6.0', stacklevel=2) |