Patchwork D2211: util: format line number of stack trace using %d

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 3:30 a.m.
Message ID <differential-rev-PHID-DREV-p3vpmqjfhg557bb7z7po-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27785/
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
  Required on Python 3, functional on Python 2.

REPOSITORY
  rHG Mercurial

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

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
@@ -3159,7 +3159,7 @@ 
             results.append(hook(*args))
         return results
 
-def getstackframes(skip=0, line=' %-*s in %s\n', fileline='%s:%s', depth=0):
+def getstackframes(skip=0, line=' %-*s in %s\n', fileline='%s:%d', depth=0):
     '''Yields lines for a nicely formatted stacktrace.
     Skips the 'skip' last entries, then return the last 'depth' entries.
     Each file+linenumber is formatted according to fileline.