D2212: util: convert traceback-related sysstrs to sysbytes in getstackframes
This revision was automatically updated to reflect the committed changes. Closed by commit rHG7ec26f27ca83: util: convert traceback-related sysstrs to sysbytes in getstackframes (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2212?vs=5604=5611 REVISION DETAIL https://phab.mercurial-scm.org/D2212 AFFECTED FILES mercurial/util.py CHANGE DETAILS 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: To: durin42, #hg-reviewers, indygreg Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D2212: util: convert traceback-related sysstrs to sysbytes in getstackframes
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 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: To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel