Patchwork [11,of,23,Series-D] hgweb: better names for _navseq argument

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 11, 2013, 12:23 a.m.
Message ID <a9fcb87655e2784adc04.1357863836@yamac.lan>
Download mbox | patch
Permalink /patch/521/
State Superseded
Headers show

Comments

Pierre-Yves David - Jan. 11, 2013, 12:23 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1357840068 -3600
# Node ID a9fcb87655e2784adc045e781c0efa785f185e34
# Parent  bb8ee9a95c02cd79e3e220f01a8f635fb56498f1
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