This should help us to catch and update the last user of this, especially in
extensions.
People will need to run the test with --pure to actually catch it, but this is
better than nothing.
( )
SimonSapin | |
Alphare |
hg-reviewers |
This should help us to catch and update the last user of this, especially in
extensions.
People will need to run the test with --pure to actually catch it, but this is
better than nothing.
No Linters Available |
No Unit Test Coverage |
✅ refresh by Heptapod after a successful CI run (🐙 💚)
Path | Packages | |||
---|---|---|---|---|
M | mercurial/pure/parsers.py (8 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
eae169c3e275 | 7d807b32ab05 | Pierre-Yves David | Jul 4 2021, 5:41 PM |
def __init__(self, state, mode, size, mtime): | def __init__(self, state, mode, size, mtime): | ||||
self._state = state | self._state = state | ||||
self._mode = mode | self._mode = mode | ||||
self._size = size | self._size = size | ||||
self._mtime = mtime | self._mtime = mtime | ||||
def __getitem__(self, idx): | def __getitem__(self, idx): | ||||
if idx == 0 or idx == -4: | if idx == 0 or idx == -4: | ||||
msg = b"do not use item[x], use item.state" | |||||
util.nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return self._state | return self._state | ||||
elif idx == 1 or idx == -3: | elif idx == 1 or idx == -3: | ||||
msg = b"do not use item[x], use item.mode" | |||||
util.nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return self._mode | return self._mode | ||||
elif idx == 2 or idx == -2: | elif idx == 2 or idx == -2: | ||||
msg = b"do not use item[x], use item.size" | |||||
util.nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return self._size | return self._size | ||||
elif idx == 3 or idx == -1: | elif idx == 3 or idx == -1: | ||||
msg = b"do not use item[x], use item.mtime" | |||||
util.nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return self._mtime | return self._mtime | ||||
else: | else: | ||||
raise IndexError(idx) | raise IndexError(idx) | ||||
@property | @property | ||||
def mode(self): | def mode(self): | ||||
return self._mode | return self._mode | ||||