# HG changeset patch # User Gregory Szorc # Date 1539362262 -7200 # Node ID 2864f8d3fcd6749d6ebba725a58717f42e52971b # Parent 720355c7b7c992892ccd70c088865ec4baf4a363 py3: use raw strings for stack names These are used for simple compares. We don't need to normalize to bytes. As part of this, I expanded a set literal so entries are 1 per line. Differential Revision: https://phab.mercurial-scm.org/D5013 diff -r 720355c7b7c9 -r 2864f8d3fcd6 mercurial/statprof.py --- a/mercurial/statprof.py Fri Oct 12 18:30:40 2018 +0200 +++ b/mercurial/statprof.py Fri Oct 12 18:37:42 2018 +0200 @@ -125,13 +125,21 @@ __all__ = ['start', 'stop', 'reset', 'display', 'profile'] -skips = {"util.py:check", "extensions.py:closure", - "color.py:colorcmd", "dispatch.py:checkargs", - "dispatch.py:", "dispatch.py:_runcatch", - "dispatch.py:_dispatch", "dispatch.py:_runcommand", - "pager.py:pagecmd", "dispatch.py:run", - "dispatch.py:dispatch", "dispatch.py:runcommand", - "hg.py:", "evolve.py:warnobserrors", +skips = { + r"util.py:check", + r"extensions.py:closure", + r"color.py:colorcmd", + r"dispatch.py:checkargs", + r"dispatch.py:", + r"dispatch.py:_runcatch", + r"dispatch.py:_dispatch", + r"dispatch.py:_runcommand", + r"pager.py:pagecmd", + r"dispatch.py:run", + r"dispatch.py:dispatch", + r"dispatch.py:runcommand", + r"hg.py:", + r"evolve.py:warnobserrors", } ########################################################################### @@ -647,7 +655,8 @@ if len(stack) > 1: i = 1 # Skip boiler plate parts of the stack - while i < len(stack) and '%s:%s' % (stack[i].filename(), stack[i].function) in skips: + name = r'%s:%s' % (stack[i].filename(), stack[i].function) + while i < len(stack) and name in skips: i += 1 if i < len(stack): child.add(stack[i:], time)