##// END OF EJS Templates
hgweb: introduction a filerevnav subclass...
Pierre-Yves David -
r18408:f332a64f default
parent child Browse files
Show More
@@ -772,7 +772,7 b' def filelog(web, req, tmpl):'
772 yield e
772 yield e
773
773
774 nodefunc = lambda x: fctx.filectx(fileid=x)
774 nodefunc = lambda x: fctx.filectx(fileid=x)
775 nav = webutil.revnav(nodefunc).gen(end - 1, revcount, count)
775 nav = webutil.filerevnav(nodefunc).gen(end - 1, revcount, count)
776 return tmpl("filelog", file=f, node=fctx.hex(), nav=nav,
776 return tmpl("filelog", file=f, node=fctx.hex(), nav=nav,
777 entries=lambda **x: entries(latestonly=False, **x),
777 entries=lambda **x: entries(latestonly=False, **x),
778 latestentry=lambda **x: entries(latestonly=True, **x),
778 latestentry=lambda **x: entries(latestonly=True, **x),
@@ -93,6 +93,9 b' class revnav(object):'
93 return ({'before': lambda **map: (data(i) for i in navbefore),
93 return ({'before': lambda **map: (data(i) for i in navbefore),
94 'after': lambda **map: (data(i) for i in navafter)},)
94 'after': lambda **map: (data(i) for i in navafter)},)
95
95
96 class filerevnav(revnav):
97 pass
98
96 def _siblings(siblings=[], hiderev=None):
99 def _siblings(siblings=[], hiderev=None):
97 siblings = [s for s in siblings if s.node() != nullid]
100 siblings = [s for s in siblings if s.node() != nullid]
98 if len(siblings) == 1 and siblings[0].rev() == hiderev:
101 if len(siblings) == 1 and siblings[0].rev() == hiderev:
General Comments 0
You need to be logged in to leave comments. Login now