D5013: py3: use raw strings for stack names
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Fri Oct 12 17:02:13 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2864f8d3fcd6: py3: use raw strings for stack names (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5013?vs=11926&id=11949
REVISION DETAIL
https://phab.mercurial-scm.org/D5013
AFFECTED FILES
mercurial/statprof.py
CHANGE DETAILS
diff --git a/mercurial/statprof.py b/mercurial/statprof.py
--- a/mercurial/statprof.py
+++ b/mercurial/statprof.py
@@ -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:<lambda>", "dispatch.py:_runcatch",
- "dispatch.py:_dispatch", "dispatch.py:_runcommand",
- "pager.py:pagecmd", "dispatch.py:run",
- "dispatch.py:dispatch", "dispatch.py:runcommand",
- "hg.py:<module>", "evolve.py:warnobserrors",
+skips = {
+ r"util.py:check",
+ r"extensions.py:closure",
+ r"color.py:colorcmd",
+ r"dispatch.py:checkargs",
+ r"dispatch.py:<lambda>",
+ 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:<module>",
+ 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)
To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list