Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/webcommands.py @ 37084:f0b6fbea00cf
stringutil: bulk-replace call sites to point to new module
This might conflict with other patches floating around, sorry.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 22 Mar 2018 21:56:20 +0900 |
parents | b33b91ca2ec2 |
children | d3a2344446e6 |
line wrap: on
line diff
--- 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