Patchwork D2212: util: convert traceback-related sysstrs to sysbytes in getstackframes

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 3:30 a.m.
Message ID <differential-rev-PHID-DREV-mu7ssoqgztixm5ghpsun-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27786/
State Superseded
Headers show

Comments

phabricator - Feb. 13, 2018, 3:30 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  With this change, test-devel-warnings.t passes except for differences
  in how ProgrammingError is formatted and one mysterious traceback
  inside of transaction.__del__.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -3171,7 +3171,7 @@ 
 
     Not be used in production code but very convenient while developing.
     '''
-    entries = [(fileline % (fn, ln), func)
+    entries = [(fileline % (pycompat.sysbytes(fn), ln), pycompat.sysbytes(func))
         for fn, ln, func, _text in traceback.extract_stack()[:-skip - 1]
         ][-depth:]
     if entries: