changeset 39784:be0f32ca2671

hgweb: use heads() instead of headrevs() These appear to be the only callers of headrevs() on file storage objects. Let's port to heads() so we can remove headrevs(). Differential Revision: https://phab.mercurial-scm.org/D4662
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 18 Sep 2018 19:00:17 -0700
parents 76f92d208f7a
children 979e9f124caa
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Tue Sep 18 18:56:02 2018 -0700
+++ b/mercurial/hgweb/webcommands.py	Tue Sep 18 19:00:17 2018 -0700
@@ -143,7 +143,7 @@
     f = fctx.path()
     text = fctx.data()
     parity = paritygen(web.stripecount)
-    ishead = fctx.filerev() in fctx.filelog().headrevs()
+    ishead = fctx.filenode() in fctx.filelog().heads()
 
     if stringutil.binary(text):
         mt = mimetypes.guess_type(f)[0] or 'application/octet-stream'
@@ -922,7 +922,7 @@
     fctx = webutil.filectx(web.repo, web.req)
     f = fctx.path()
     parity = paritygen(web.stripecount)
-    ishead = fctx.filerev() in fctx.filelog().headrevs()
+    ishead = fctx.filenode() in fctx.filelog().heads()
 
     # parents() is called once per line and several lines likely belong to
     # same revision. So it is worth caching.