[Updated] D11544: dirstate: deprecate `__getitem__` access

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Oct 1 20:49:44 UTC 2021


Closed by commit rHGdcd97b082b3b: dirstate: deprecate `__getitem__` access (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11544?vs=30471&id=30544

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11544/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11544

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -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



To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211001/22b0778b/attachment-0002.html>


More information about the Mercurial-patches mailing list