Patchwork [2,of,2] perf: fix `perfhelper-mergecopies` report of #changesets

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 10, 2019, noon
Message ID <0ccefbc6882e53aedbdc.1570708809@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/42185/
State Accepted
Headers show

Comments

Pierre-Yves David - Oct. 10, 2019, noon
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1570675711 -7200
#      Thu Oct 10 04:48:31 2019 +0200
# Node ID 0ccefbc6882e53aedbdc134fe6b9133292d85d3d
# Parent  cf8bf5943aa4c02257cd1b4227f5f01d7a37a497
# EXP-Topic perfhelper
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 0ccefbc6882e
perf: fix `perfhelper-mergecopies` report of #changesets

Same as `perfhelper-pathcopies`. The previous computation `<base>::<target>` was
wrong, what we actually need is `::<target> - ::<base>`.

This is now fixed.

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1941,10 +1941,10 @@  def perfhelpermergecopies(ui, repo, revs
             data = {
                 b'base': b.hex(),
                 b'p1.node': p1.hex(),
-                b'p1.nbrevs': len(repo.revs('%d::%d', b.rev(), p1.rev())),
+                b'p1.nbrevs': len(repo.revs('only(%d, %d)', p1.rev(), b.rev())),
                 b'p1.nbmissingfiles': len(p1missing),
                 b'p2.node': p2.hex(),
-                b'p2.nbrevs': len(repo.revs('%d::%d', b.rev(), p2.rev())),
+                b'p2.nbrevs': len(repo.revs('only(%d, %d)', p2.rev(), b.rev())),
                 b'p2.nbmissingfiles': len(p2missing),
             }
             if dostats: