# HG changeset patch # User Boris Feld # Date 1527845766 -7200 # Node ID 8943c1352b6c42777a086f6e4795c30f7f36410c # Parent ddc1da1347722041f3209d1082d9e82cdaae0fc9 statprof: cleanup string construction Use string substitutions instead of string additions. diff -r ddc1da134772 -r 8943c1352b6c mercurial/statprof.py --- a/mercurial/statprof.py Wed Jul 25 17:11:59 2018 +0200 +++ b/mercurial/statprof.py Fri Jun 01 11:36:06 2018 +0200 @@ -356,7 +356,7 @@ stack = sample.stack sites = ['\1'.join([s.path, str(s.lineno), s.function]) for s in stack] - file.write(time + '\0' + '\0'.join(sites) + '\n') + file.write("%s\0%s\n" % (time, '\0'.join(sites))) def load_data(path): lines = open(path, 'r').read().splitlines()