# HG changeset patch # User Pierre-Yves David # Date 2013-01-10 17:47:48 # Node ID 833eb34e90e422cc4bf5f2f9d491498911a6c553 # Parent 28fa9443f7517e3fab47f34c8f6d78a92dfaa234 hgweb: better names for _navseq arguments The old names were misleading. diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -24,16 +24,16 @@ def up(p): 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