Mercurial > hg
diff mercurial/dirstate.py @ 48107:dcd97b082b3b
dirstate: deprecate `__getitem__` access
If we want to drop `state` usage, we need to deprecate this.
Differential Revision: https://phab.mercurial-scm.org/D11544
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 29 Sep 2021 02:34:32 +0200 |
parents | c87844960a35 |
children | 5fc2dfb073d6 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Wed Sep 29 18:39:02 2021 +0200 +++ b/mercurial/dirstate.py Wed Sep 29 02:34:32 2021 +0200 @@ -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