diff mercurial/hgweb/webcommands.py @ 18404:1da84a6b136a

hgweb: pass nodefunc to the revnav object The issue between hgweb and filtering lay in this function. Moving it into the object itself helps to abstract the erroneous bit.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 10 Jan 2013 18:59:37 +0100
parents bfaee31a83d2
children f332a64fef51
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Tue Jan 15 21:17:18 2013 +0100
+++ b/mercurial/hgweb/webcommands.py	Thu Jan 10 18:59:37 2013 +0100
@@ -242,7 +242,7 @@
     pos = end - 1
     parity = paritygen(web.stripecount, offset=start - end)
 
-    changenav = webutil.revnav().gen(pos, revcount, count, web.repo.changectx)
+    changenav = webutil.revnav(web.repo.changectx).gen(pos, revcount, count)
 
     return tmpl(shortlog and 'shortlog' or 'changelog', changenav=changenav,
                 node=ctx.hex(), rev=pos, changesets=count,
@@ -772,7 +772,7 @@
             yield e
 
     nodefunc = lambda x: fctx.filectx(fileid=x)
-    nav = webutil.revnav().gen(end - 1, revcount, count, nodefunc)
+    nav = webutil.revnav(nodefunc).gen(end - 1, revcount, count)
     return tmpl("filelog", file=f, node=fctx.hex(), nav=nav,
                 entries=lambda **x: entries(latestonly=False, **x),
                 latestentry=lambda **x: entries(latestonly=True, **x),
@@ -851,7 +851,7 @@
 
     uprev = min(max(0, count - 1), rev + revcount)
     downrev = max(0, rev - revcount)
-    changenav = webutil.revnav().gen(pos, revcount, count, web.repo.changectx)
+    changenav = webutil.revnav(web.repo.changectx).gen(pos, revcount, count)
 
     dag = graphmod.dagwalker(web.repo, range(start, end)[::-1])
     tree = list(graphmod.colored(dag, web.repo))