Mercurial > public > mercurial-scm > hg
comparison contrib/revsetbenchmarks.py @ 41545:fbb43514f342
revetbenchmarks: use raw string for regular expression with escapes
This avoids a SyntaxWarning on Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D5830
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 04 Feb 2019 09:41:10 -0800 |
parents | 71ef4e923886 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
41544:7d1798ec92a3 | 41545:fbb43514f342 |
---|---|
69 print('(no output)', file=sys.stderr) | 69 print('(no output)', file=sys.stderr) |
70 else: | 70 else: |
71 print(exc.output, file=sys.stderr) | 71 print(exc.output, file=sys.stderr) |
72 return None | 72 return None |
73 | 73 |
74 outputre = re.compile(r'! wall (\d+.\d+) comb (\d+.\d+) user (\d+.\d+) ' | 74 outputre = re.compile(br'! wall (\d+.\d+) comb (\d+.\d+) user (\d+.\d+) ' |
75 'sys (\d+.\d+) \(best of (\d+)\)') | 75 br'sys (\d+.\d+) \(best of (\d+)\)') |
76 | 76 |
77 def parseoutput(output): | 77 def parseoutput(output): |
78 """parse a textual output into a dict | 78 """parse a textual output into a dict |
79 | 79 |
80 We cannot just use json because we want to compare with old | 80 We cannot just use json because we want to compare with old |