changeset 18391:833eb34e90e4

hgweb: better names for _navseq arguments The old names were misleading.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 10 Jan 2013 18:47:48 +0100
parents 28fa9443f751
children 88a37b19dc0e
files mercurial/hgweb/webutil.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py	Thu Jan 10 18:44:26 2013 +0100
+++ b/mercurial/hgweb/webutil.py	Thu Jan 10 18:47:48 2013 +0100
@@ -24,16 +24,16 @@
         return "/"
     return up + "/"
 
-def _navseq(factor, limit=None):
-    if limit:
-        yield limit
-        if limit >= 20 and limit <= 40:
+def _navseq(step, firststep=None):
+    if firststep:
+        yield firststep
+        if firststep >= 20 and firststep <= 40:
             yield 50
-        factor *= 10
+        step *= 10
     while True:
-        yield 1 * factor
-        yield 3 * factor
-        factor *= 10
+        yield 1 * step
+        yield 3 * step
+        step *= 10
 
 def revnavgen(pos, pagelen, limit, nodefunc):
     """computes label and revision id for navigation link