Patchwork [06,of,22,V2-Series-D] hgweb: better names for _navseq argument

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 14, 2013, 8:35 p.m.
Message ID <705e6db663644c4193c5.1358195738@yamac.lan>
Download mbox | patch
Permalink /patch/602/
State Superseded
Headers show

Comments

Pierre-Yves David - Jan. 14, 2013, 8:35 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1357840068 -3600
# Node ID 705e6db663644c4193c58fe495539bf53a0794ee
# Parent  7a93bd6e823ab85fe4f057937e4ca2b80e10744b
hgweb: better names for _navseq argument

The old names were misleading.

Patch

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -22,20 +22,20 @@  def up(p):
     up = os.path.dirname(p)
     if up == "/":
         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
 
 class revnav(object):
 
     def __init__(self, nodefunc):
         """Navigation generation object