mercurial/exchange.py
changeset 37084 f0b6fbea00cf
parent 36966 c0e90df1ab1e
child 37164 b229fd9adeae
--- a/mercurial/exchange.py	Thu Mar 22 21:19:31 2018 +0900
+++ b/mercurial/exchange.py	Thu Mar 22 21:56:20 2018 +0900
@@ -35,6 +35,9 @@
     url as urlmod,
     util,
 )
+from .utils import (
+    stringutil,
+)
 
 urlerr = util.urlerr
 urlreq = util.urlreq
@@ -2180,7 +2183,7 @@
             except error.UnsupportedBundleSpecification as e:
                 repo.ui.debug('filtering %s because unsupported bundle '
                               'spec: %s\n' % (
-                                  entry['URL'], util.forcebytestr(e)))
+                                  entry['URL'], stringutil.forcebytestr(e)))
                 continue
         # If we don't have a spec and requested a stream clone, we don't know
         # what the entry is so don't attempt to apply it.
@@ -2286,9 +2289,9 @@
             return True
         except urlerr.httperror as e:
             ui.warn(_('HTTP error fetching bundle: %s\n') %
-                    util.forcebytestr(e))
+                    stringutil.forcebytestr(e))
         except urlerr.urlerror as e:
             ui.warn(_('error fetching bundle: %s\n') %
-                    util.forcebytestr(e.reason))
+                    stringutil.forcebytestr(e.reason))
 
         return False