util: convert traceback-related sysstrs to sysbytes in getstackframes
With this change, test-devel-warnings.t passes except for differences
in how ProgrammingError is formatted and one mysterious traceback
inside of transaction.__del__.
Differential Revision: https://phab.mercurial-scm.org/D2212
--- a/mercurial/util.py Mon Feb 12 20:43:33 2018 -0500
+++ b/mercurial/util.py Mon Feb 12 20:44:06 2018 -0500
@@ -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: