Skip to content
Snippets Groups Projects
Commit dcd97b08 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

dirstate: deprecate `__getitem__` access

If we want to drop `state` usage, we need to deprecate this.

Differential Revision: https://phab.mercurial-scm.org/D11544
parent 82e142b9
No related branches found
No related tags found
No related merge requests found
......@@ -327,6 +327,8 @@
consider migrating all user of this to going through the dirstate entry
instead.
"""
msg = b"don't use dirstate[file], use dirstate.get_entry(file)"
util.nouideprecwarn(msg, b'6.1', stacklevel=2)
entry = self._map.get(key)
if entry is not None:
return entry.state
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment