mercurial/exchange.py
changeset 36452 04c319a07c7b
parent 35813 768326377e4d
child 36453 2831d918e1b4
--- a/mercurial/exchange.py	Sun Feb 25 22:30:14 2018 -0500
+++ b/mercurial/exchange.py	Sun Feb 25 23:08:41 2018 -0500
@@ -2149,7 +2149,8 @@
                 continue
             except error.UnsupportedBundleSpecification as e:
                 repo.ui.debug('filtering %s because unsupported bundle '
-                              'spec: %s\n' % (entry['URL'], str(e)))
+                              'spec: %s\n' % (
+                                  entry['URL'], util.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.
@@ -2254,7 +2255,8 @@
                 bundle2.applybundle(repo, cg, tr, 'clonebundles', url)
             return True
         except urlerr.httperror as e:
-            ui.warn(_('HTTP error fetching bundle: %s\n') % str(e))
+            ui.warn(_('HTTP error fetching bundle: %s\n') %
+                    util.forcebytestr(e))
         except urlerr.urlerror as e:
             ui.warn(_('error fetching bundle: %s\n') % e.reason)