[PATCH 09 of 22 V2-Series-D] hgweb: do not access first changeset with a string

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Jan 14 14:35:41 CST 2013


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1357840550 -3600
# Node ID 0e1549221853543dc811b2e6e70f8f772ac570a3
# Parent  0c0c858fb41574fb4c3c34080d2719aa5023df4c
hgweb: do not access first changeset with a string

There is not reason not to use an int

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -76,11 +76,11 @@ class revnav(object):
             if pos - f >= 0:
                 navbefore.insert(0, ("-%d" % f, self.hex(pos - f)))
 
         navafter.append(("tip", "tip"))
         try:
-            navbefore.insert(0, ("(0)", self.hex('0')))
+            navbefore.insert(0, ("(0)", self.hex(0)))
         except error.RepoError:
             pass
 
         def gen(l):
             def f(**map):


More information about the Mercurial-devel mailing list