# HG changeset patch # User Gregory Szorc # Date 2018-09-19 02:00:17 # Node ID be0f32ca267149825726befc2e596826e78813b2 # Parent 76f92d208f7a1f0671d3a50870599842eca47756 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 diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -143,7 +143,7 @@ def _filerevision(web, fctx): 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 @@ def annotate(web): 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.