comparison mercurial/hgweb/webutil.py @ 18387:39616410aa32

hgweb: do not access first changeset with a string There is not reason not to use an int
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 10 Jan 2013 18:55:50 +0100
parents ae7215f4f7b9
children 083daee1b749
comparison
equal deleted inserted replaced
18386:03442135dff4 18387:39616410aa32
64 if pos - f >= 0: 64 if pos - f >= 0:
65 navbefore.insert(0, ("-%d" % f, hex(nodefunc(pos - f).node()))) 65 navbefore.insert(0, ("-%d" % f, hex(nodefunc(pos - f).node())))
66 66
67 navafter.append(("tip", "tip")) 67 navafter.append(("tip", "tip"))
68 try: 68 try:
69 navbefore.insert(0, ("(0)", hex(nodefunc('0').node()))) 69 navbefore.insert(0, ("(0)", hex(nodefunc(0).node())))
70 except error.RepoError: 70 except error.RepoError:
71 pass 71 pass
72 72
73 def gen(l): 73 def gen(l):
74 def f(**map): 74 def f(**map):