changeset 40752:cfaf3843491b

perf: rename version flag of perfchangegroupchangelog to cgversion The version flag conflicts with the global version flag and does not work. Differential Revision: https://phab.mercurial-scm.org/D5297 Differential Revision: https://phab.mercurial-scm.org/D5298
author Pulkit Goyal <pulkit@yandex-team.ru>
date Thu, 22 Nov 2018 18:14:21 +0300
parents 246b61bfdc2f
children 7c25d2233d53
files contrib/perf.py tests/test-contrib-perf.t
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Fri Nov 23 22:27:57 2018 -0500
+++ b/contrib/perf.py	Thu Nov 22 18:14:21 2018 +0300
@@ -712,9 +712,9 @@
         fm.end()
 
 @command(b'perfchangegroupchangelog', formatteropts +
-         [(b'', b'version', b'02', b'changegroup version'),
+         [(b'', b'cgversion', b'02', b'changegroup version'),
           (b'r', b'rev', b'', b'revisions to add to changegroup')])
-def perfchangegroupchangelog(ui, repo, version=b'02', rev=None, **opts):
+def perfchangegroupchangelog(ui, repo, cgversion=b'02', rev=None, **opts):
     """Benchmark producing a changelog group for a changegroup.
 
     This measures the time spent processing the changelog during a
@@ -727,7 +727,7 @@
     opts = _byteskwargs(opts)
     cl = repo.changelog
     nodes = [cl.lookup(r) for r in repo.revs(rev or b'all()')]
-    bundler = changegroup.getbundler(version, repo)
+    bundler = changegroup.getbundler(cgversion, repo)
 
     def d():
         state, chunks = bundler._generatechangelog(cl, nodes)
--- a/tests/test-contrib-perf.t	Fri Nov 23 22:27:57 2018 -0500
+++ b/tests/test-contrib-perf.t	Thu Nov 22 18:14:21 2018 +0300
@@ -145,6 +145,7 @@
   $ hg perfbranchmap
   $ hg perfcca
   $ hg perfchangegroupchangelog
+  $ hg perfchangegroupchangelog --cgversion 01
   $ hg perfchangeset 2
   $ hg perfctxfiles 2
   $ hg perfdiffwd