mercurial/context.py
changeset 37084 f0b6fbea00cf
parent 37066 b33b91ca2ec2
child 37101 656ac240f392
--- a/mercurial/context.py	Thu Mar 22 21:19:31 2018 +0900
+++ b/mercurial/context.py	Thu Mar 22 21:56:20 2018 +0900
@@ -46,7 +46,10 @@
     subrepoutil,
     util,
 )
-from .utils import dateutil
+from .utils import (
+    dateutil,
+    stringutil,
+)
 
 propertycache = util.propertycache
 
@@ -818,7 +821,7 @@
 
     def isbinary(self):
         try:
-            return util.binary(self.data())
+            return stringutil.binary(self.data())
         except IOError:
             return False
     def isexec(self):
@@ -1500,7 +1503,8 @@
         for f in files:
             if self.flags(f) == 'l':
                 d = self[f].data()
-                if d == '' or len(d) >= 1024 or '\n' in d or util.binary(d):
+                if (d == '' or len(d) >= 1024 or '\n' in d
+                    or stringutil.binary(d)):
                     self._repo.ui.debug('ignoring suspect symlink placeholder'
                                         ' "%s"\n' % f)
                     continue