# HG changeset patch # User Pierre-Yves David # Date 1569537652 -7200 # Node ID bbf77341a956b3ba40ae87538fcd200b34c5a3e5 # Parent 3737499829246a878b66495908f988c5e7bdc061 perf: fix perfhelper-pathcopies without --stats Some conditional were missing. diff -r 373749982924 -r bbf77341a956 contrib/perf.py --- a/contrib/perf.py Fri Sep 27 19:59:53 2019 +0200 +++ b/contrib/perf.py Fri Sep 27 00:40:52 2019 +0200 @@ -1814,16 +1814,17 @@ b'nbrevs': len(repo.revs('%d::%d', b, p)), b'nbmissingfiles': len(missing), } - alldata['nbrevs'].append(( - data['nbrevs'], - base.hex(), - parent.hex(), - )) - alldata['nbmissingfiles'].append(( - data['nbmissingfiles'], - base.hex(), - parent.hex(), - )) + if dostats: + alldata['nbrevs'].append(( + data['nbrevs'], + base.hex(), + parent.hex(), + )) + alldata['nbmissingfiles'].append(( + data['nbmissingfiles'], + base.hex(), + parent.hex(), + )) if dotiming: begin = util.timer() renames = copies.pathcopies(base, parent) @@ -1831,16 +1832,17 @@ # not very stable timing since we did only one run data['time'] = end - begin data['nbrenamedfiles'] = len(renames) - alldata['time'].append(( - data['time'], - base.hex(), - parent.hex(), - )) - alldata['nbrenames'].append(( - data['nbrenamedfiles'], - base.hex(), - parent.hex(), - )) + if dostats: + alldata['time'].append(( + data['time'], + base.hex(), + parent.hex(), + )) + alldata['nbrenames'].append(( + data['nbrenamedfiles'], + base.hex(), + parent.hex(), + )) fm.startitem() fm.data(**data) out = data.copy()