[PATCH 4 of 4] py3: use bytes() to byte-stringify Abort message in handleremotechangegroup()

Yuya Nishihara yuya at tcha.org
Thu Jul 12 10:17:30 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1531047155 -32400
#      Sun Jul 08 19:52:35 2018 +0900
# Node ID ef9f6f9a5d37b9159b9e8b31749b57805c5811b3
# Parent  e06128d929f7ae7bde69af75d6030e4a71db4fba
py3: use bytes() to byte-stringify Abort message in handleremotechangegroup()

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -41,6 +41,7 @@ test-bundle2-exchange.t
 test-bundle2-format.t
 test-bundle2-multiple-changegroups.t
 test-bundle2-pushback.t
+test-bundle2-remote-changegroup.t
 test-cappedreader.py
 test-casecollision.t
 test-cat.t
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1878,7 +1878,7 @@ def handleremotechangegroup(op, inpart):
         real_part.validate()
     except error.Abort as e:
         raise error.Abort(_('bundle at %s is corrupted:\n%s') %
-            (util.hidepassword(raw_url), str(e)))
+                          (util.hidepassword(raw_url), bytes(e)))
     assert not inpart.read()
 
 @parthandler('reply:changegroup', ('return', 'in-reply-to'))


More information about the Mercurial-devel mailing list