Fix test-oldcgi after navbar update
authorBrendan Cully <brendan@kublai.com>
Mon, 16 Oct 2006 11:36:57 -0700
changeset 3424 9b1c126b74cd
parent 3423 a2179e78d18b
child 3425 ec6f400cff4d
Fix test-oldcgi after navbar update
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Mon Oct 16 11:18:06 2006 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Mon Oct 16 11:36:57 2006 -0700
@@ -54,12 +54,15 @@
             if pos - f >= 0:
                 l.insert(0, ("-%d" % f, hex(nodefunc(pos - f).node())))
 
-        yield {"label": "(0)", "node": hex(nodefunc(0).node())}
+        try:
+            yield {"label": "(0)", "node": hex(nodefunc('0').node())}
 
-        for label, node in l:
-            yield {"label": label, "node": node}
+            for label, node in l:
+                yield {"label": label, "node": node}
 
-        yield {"label": "tip", "node": hex(nodefunc('-1').node())}
+            yield {"label": "tip", "node": hex(nodefunc('-1').node())}
+        except hg.RepoError:
+            pass
 
     return nav