diff mercurial/patch.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 c268ba15deb3
children a8a902d7176e
line wrap: on
line diff
--- a/mercurial/patch.py	Thu Mar 22 21:19:31 2018 +0900
+++ b/mercurial/patch.py	Thu Mar 22 21:56:20 2018 +0900
@@ -40,7 +40,10 @@
     util,
     vfs as vfsmod,
 )
-from .utils import dateutil
+from .utils import (
+    dateutil,
+    stringutil,
+)
 
 diffhelpers = policy.importmod(r'diffhelpers')
 stringio = util.stringio
@@ -1461,7 +1464,7 @@
                 dec.append(util.b85decode(line[1:])[:l])
             except ValueError as e:
                 raise PatchError(_('could not decode "%s" binary patch: %s')
-                                 % (self._fname, util.forcebytestr(e)))
+                                 % (self._fname, stringutil.forcebytestr(e)))
             line = getline(lr, self.hunk)
         text = zlib.decompress(''.join(dec))
         if len(text) != size: