[PATCH 4 of 6] py3: use util.forcebytestr() to convert push lock error to bytes

Matt Harbison mharbison72 at gmail.com
Sun Sep 30 01:46:23 EDT 2018


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1538279520 14400
#      Sat Sep 29 23:52:00 2018 -0400
# Node ID e2b23a432bcf799a5126a558d6b10a4c96929a2a
# Parent  96752a0137b4b08677f3205362ece3c2e7fde057
py3: use util.forcebytestr() to convert push lock error to bytes

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -522,7 +522,8 @@ def push(repo, remote, force=False, revs
         # source repo cannot be locked.
         # We do not abort the push, but just disable the local phase
         # synchronisation.
-        msg = 'cannot lock source repository: %s\n' % err
+        msg = ('cannot lock source repository: %s\n'
+               % stringutil.forcebytestr(err))
         pushop.ui.debug(msg)
 
     with wlock or util.nullcontextmanager(), \


More information about the Mercurial-devel mailing list