diff mercurial/hgweb/webcommands.py @ 33012:1c97df5e3b46

hgweb: plug followlines action in annotate view Add the followlines.js script and corresponding parameters as data attribute on <tbody class="sourcelines"> element. Extend CSS rules so that they also match the DOM structure of annotate view. As previously, only address paper and gitweb styles (other styles do not have followlines at all).
author Denis Laxalde <denis.laxalde@logilab.fr>
date Wed, 21 Jun 2017 17:17:17 +0200
parents 582080a4a812
children 2943141f5e07
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Wed Jun 21 17:07:51 2017 +0200
+++ b/mercurial/hgweb/webcommands.py	Wed Jun 21 17:17:17 2017 +0200
@@ -865,6 +865,7 @@
     fctx = webutil.filectx(web.repo, req)
     f = fctx.path()
     parity = paritygen(web.stripecount)
+    ishead = fctx.filerev() in fctx.filelog().headrevs()
 
     # parents() is called once per line and several lines likely belong to
     # same revision. So it is worth caching.
@@ -927,6 +928,7 @@
                 symrev=webutil.symrevorshortnode(req, fctx),
                 rename=webutil.renamelink(fctx),
                 permissions=fctx.manifest().flags(f),
+                ishead=int(ishead),
                 **webutil.commonentry(web.repo, fctx))
 
 @webcommand('filelog')