Mercurial > hg-stable
changeset 18407:50dc5b244474
hgweb: simplify addition of "(0) navigation entry"
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 10 Jan 2013 19:09:32 +0100 |
parents | 20cf53932b6f |
children | f332a64fef51 |
files | mercurial/hgweb/webutil.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Mon Jan 14 16:30:06 2013 +0100 +++ b/mercurial/hgweb/webutil.py Thu Jan 10 19:09:32 2013 +0100 @@ -76,7 +76,7 @@ # empty repo return ({'before': (), 'after': ()},) - navbefore = [] + navbefore = [("(0)", self.hex(0))] navafter = [] for f in _navseq(1, pagelen): @@ -88,7 +88,6 @@ navbefore.insert(0, ("-%d" % f, self.hex(pos - f))) navafter.append(("tip", "tip")) - navbefore.insert(0, ("(0)", self.hex(0))) data = lambda i: {"label": i[0], "node": i[1]} return ({'before': lambda **map: (data(i) for i in navbefore),