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.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
✅ refresh by Heptapod after a successful CI run (🐙 💚)
Path | Packages | |||
---|---|---|---|---|
M | mercurial/pure/parsers.py (8 lines) |
_state = attr.ib() | _state = attr.ib() | ||||
_mode = attr.ib() | _mode = attr.ib() | ||||
_size = attr.ib() | _size = attr.ib() | ||||
_mtime = attr.ib() | _mtime = attr.ib() | ||||
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 | ||||