diff hgext/highlight/highlight.py @ 37087: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 169d66db5920
children 670eb4fa1b86
line wrap: on
line diff
--- a/hgext/highlight/highlight.py	Thu Mar 22 21:19:31 2018 +0900
+++ b/hgext/highlight/highlight.py	Thu Mar 22 21:56:20 2018 +0900
@@ -15,7 +15,10 @@
 
 from mercurial import (
     encoding,
-    util,
+)
+
+from mercurial.utils import (
+    stringutil,
 )
 
 with demandimport.deactivated():
@@ -47,7 +50,7 @@
         tmpl.cache['header'] = new_header
 
     text = fctx.data()
-    if util.binary(text):
+    if stringutil.binary(text):
         return
 
     # str.splitlines() != unicode.splitlines() because "reasons"