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

login
register
mail settings
Submitter Matt Harbison
Date Sept. 30, 2018, 5:46 a.m.
Message ID <e2b23a432bcf799a5126.1538286383@Envy>
Download mbox | patch
Permalink /patch/35214/
State Accepted
Headers show

Comments

Matt Harbison - Sept. 30, 2018, 5:46 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@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

Patch

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(), \