diff -r f99d64e8a4e4 -r f0b6fbea00cf mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Thu Mar 22 21:19:31 2018 +0900 +++ b/mercurial/hgweb/webcommands.py Thu Mar 22 21:56:20 2018 +0900 @@ -36,7 +36,10 @@ scmutil, smartset, templater, - util, +) + +from ..utils import ( + stringutil, ) from . import ( @@ -121,7 +124,7 @@ if guessmime: mt = mimetypes.guess_type(path)[0] if mt is None: - if util.binary(text): + if stringutil.binary(text): mt = 'application/binary' else: mt = 'text/plain' @@ -141,7 +144,7 @@ parity = paritygen(web.stripecount) ishead = fctx.filerev() in fctx.filelog().headrevs() - if util.binary(text): + if stringutil.binary(text): mt = mimetypes.guess_type(f)[0] or 'application/octet-stream' text = '(binary:%s)' % mt