Download:
child 67:4d6dfefbcc0c
parent 65:8d903e0972d8
66:482dd16a3fdb
Anton Shestakov <av6@dwimlabs.net>, Mon, 18 Jul 2016 18:53:20 +0800
bench: get filename once, shorten lines

1 файлов изменено, 9 вставок(+), 8 удалений(-) [+]
bench.py file | annotate | diff | comparison | revisions
--- a/bench.py Mon Jul 18 18:47:26 2016 +0800
+++ b/bench.py Mon Jul 18 18:53:20 2016 +0800
@@ -40,23 +40,24 @@
results = []
cmd = [rel(TESTHGREPO, 'hg'), '-R', TESTREPO]
+ filename = rel(TESTREPO, 'README')
if mark == 'blame':
- cmd += ['blame', rel(TESTREPO, 'README')]
+ cmd += ['blame', filename]
elif mark == 'grepall':
- cmd += ['grep', '--all', 'version', rel(TESTREPO, 'README')]
+ cmd += ['grep', '--all', 'version', filename]
elif mark == 'grepallf':
- cmd += ['grep', '--all', '--follow', 'version', rel(TESTREPO, 'README')]
+ cmd += ['grep', '--all', '--follow', 'version', filename]
elif mark == 'stco':
- cmd += ['status', '--copies', rel(TESTREPO, 'README')]
+ cmd += ['status', '--copies', filename]
elif mark == 'diff':
- cmd += ['diff', '-r', 'tip~100:tip', rel(TESTREPO, 'README')]
+ cmd += ['diff', '-r', 'tip~100:tip', filename]
elif mark == 'diffg':
- cmd += ['diff', '-r', 'tip~100:tip', '--git', rel(TESTREPO, 'README')]
+ cmd += ['diff', '-r', 'tip~100:tip', '--git', filename]
elif mark == 'logfile':
- cmd += ['log', rel(TESTREPO, 'README')]
+ cmd += ['log', filename]
elif mark == 'logfilecp':
- cmd += ['log', '--copies', rel(TESTREPO, 'README')]
+ cmd += ['log', '--copies', filename]
elif mark == 'log1':
cmd += ['log', '-l1']
elif mark == 'log1000':