mercurial/hgweb/webcommands.py
branchstable
changeset 32070 a298f5c61b34
parent 31939 604d31507f86
child 32189 f238a483a1fd
--- a/mercurial/hgweb/webcommands.py	Mon Apr 24 18:33:23 2017 +0200
+++ b/mercurial/hgweb/webcommands.py	Mon Apr 24 10:32:15 2017 +0200
@@ -131,6 +131,7 @@
     f = fctx.path()
     text = fctx.data()
     parity = paritygen(web.stripecount)
+    ishead = fctx.filerev() in fctx.filelog().headrevs()
 
     if util.binary(text):
         mt = mimetypes.guess_type(f)[0] or 'application/octet-stream'
@@ -150,6 +151,7 @@
                 symrev=webutil.symrevorshortnode(req, fctx),
                 rename=webutil.renamelink(fctx),
                 permissions=fctx.manifest().flags(f),
+                ishead=int(ishead),
                 **webutil.commonentry(web.repo, fctx))
 
 @webcommand('file')