perf: don't convert rev to node before calling revlog.revision()
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 06 May 2017 11:12:23 -0700
changeset 32230 73c3e226d2fc
parent 32229 75e93d95aae6
child 32231 954f63391d71
perf: don't convert rev to node before calling revlog.revision()
contrib/perf.py
tests/test-check-code.t
tests/test-contrib-perf.t
--- a/contrib/perf.py	Sat May 06 12:12:53 2017 -0700
+++ b/contrib/perf.py	Sat May 06 11:12:23 2017 -0700
@@ -864,7 +864,7 @@
             dist = -1 * dist
 
         for x in xrange(beginrev, endrev, dist):
-            r.revision(r.node(x))
+            r.revision(x)
 
     timer, fm = gettimer(ui, opts)
     timer(d)
--- a/tests/test-check-code.t	Sat May 06 12:12:53 2017 -0700
+++ b/tests/test-check-code.t	Sat May 06 11:12:23 2017 -0700
@@ -9,15 +9,11 @@
 
   $ hg locate -X contrib/python-zstandard -X hgext/fsmonitor/pywatchman |
   > sed 's-\\-/-g' | "$check_code" --warnings --per-file=0 - || false
-  contrib/perf.py:867:
-   >             r.revision(r.node(x))
-   don't convert rev to node before passing to revision(nodeorrev)
   Skipping i18n/polib.py it has no-che?k-code (glob)
   Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob)
   Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob)
   Skipping mercurial/statprof.py it has no-che?k-code (glob)
   Skipping tests/badserverext.py it has no-che?k-code (glob)
-  [1]
 
 @commands in debugcommands.py should be in alphabetical order.
 
--- a/tests/test-contrib-perf.t	Sat May 06 12:12:53 2017 -0700
+++ b/tests/test-contrib-perf.t	Sat May 06 11:12:23 2017 -0700
@@ -165,7 +165,3 @@
   $ (hg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py;
   >  hg files -r tip glob:mercurial/*.c glob:mercurial/*.py) |
   > "$TESTDIR"/check-perf-code.py contrib/perf.py
-  contrib/perf.py:867:
-   >             r.revision(r.node(x))
-   don't convert rev to node before passing to revision(nodeorrev)
-  [1]