Patchwork [14,of,23,Series-D] hgweb: do not access first changeset with a string

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 11, 2013, 12:23 a.m.
Message ID <824dd4eea09fbcf9cf90.1357863839@yamac.lan>
Download mbox | patch
Permalink /patch/538/
State Superseded
Headers show

Comments

Pierre-Yves David - Jan. 11, 2013, 12:23 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1357840550 -3600
# Node ID 824dd4eea09fbcf9cf9033aafc23e5699a6ea8ab
# Parent  ca473790efc20d18f38146f2a27d2730e5f4ed7a
hgweb: do not access first changeset with a string

There is not reason not to use an int

Patch

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):