Patchwork D3307: context: set stack level for deprecation warning

login
register
mail settings
Submitter phabricator
Date April 14, 2018, 8:12 a.m.
Message ID <569c50270cc9485acbd127353dc5c2a2@localhost.localdomain>
Download mbox | patch
Permalink /patch/31007/
State Not Applicable
Headers show

Comments

phabricator - April 14, 2018, 8:12 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1764527af92e: context: set stack level for deprecation warning (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3307?vs=8113&id=8258

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -399,7 +399,7 @@ 
     #  * If "x" can be a mix of the above, you'll have to figure it out
     #    yourself
     repo.ui.deprecwarn("changectx.__init__ is getting more limited, see source "
-                       "for details", "4.6")
+                       "for details", "4.6", stacklevel=4)
 
 class changectx(basectx):
     """A changecontext object makes access to data related to a particular