mercurial/hgweb/common.py
changeset 6123 f7f25f58693a
parent 5993 948a41e77902
parent 6122 800e2756c9ab
child 6924 e8332c8108ff
--- a/mercurial/hgweb/common.py	Fri Feb 15 18:37:00 2008 +0100
+++ b/mercurial/hgweb/common.py	Fri Feb 15 19:44:54 2008 +0100
@@ -101,6 +101,12 @@
             parity = 1 - parity
             count = 0
 
+def countgen(start=0, step=1):
+    """count forever -- useful for line numbers"""
+    while True:
+        yield start
+        start += step
+
 def get_contact(config):
     """Return repo contact information or empty string.