# HG changeset patch
# User Manuel Jacob <me@manueljacob.de>
# Date 1583514638 -3600
#      Fri Mar 06 18:10:38 2020 +0100
# Node ID 8dd49f530b020669eb3d44fb2d1b6c31ce0defd4
# Parent  8a327480a72014b1d1868ea2fc894b40cb12bc55
py3: use pycompat.sysbytes for stringified exception

diff --git a/hggit/git_handler.py b/hggit/git_handler.py
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -400,7 +400,8 @@
 
             return old, new
         except (HangupException, GitProtocolError) as e:
-            raise error.Abort(_(b"git remote error: ") + str(e))
+            raise error.Abort(_(b"git remote error: ")
+                              + pycompat.sysbytes(str(e)))
 
     def push(self, remote, revs, force):
         self.export_commits()
@@ -1121,7 +1122,8 @@
                                 change_totals.get(Blob, 0)))
             return old_refs, new_refs
         except (HangupException, GitProtocolError) as e:
-            raise error.Abort(_(b"git remote error: ") + str(e))
+            raise error.Abort(_(b"git remote error: ")
+                              + pycompat.sysbytes(str(e)))
 
     def get_changed_refs(self, refs, exportable, force):
         new_refs = refs.copy()
@@ -1233,7 +1235,8 @@
 
             return ret
         except (HangupException, GitProtocolError) as e:
-            raise error.Abort(_(b"git remote error: ") + str(e))
+            raise error.Abort(_(b"git remote error: ")
+                              + pycompat.sysbytes(str(e)))
 
     # REFERENCES HANDLING