mercurial/hgweb/common.py
changeset 6122 800e2756c9ab
parent 4462 12e4d9524951
child 6123 f7f25f58693a
--- a/mercurial/hgweb/common.py	Fri Sep 07 16:48:42 2007 +0200
+++ b/mercurial/hgweb/common.py	Tue Sep 04 22:25:37 2007 -0500
@@ -76,3 +76,9 @@
             parity = 1 - parity
             count = 0
 
+def countgen(start=0, step=1):
+    """count forever -- useful for line numbers"""
+    while True:
+        yield start
+        start += step
+