Patchwork D9184: py3: convert an exception message to bytes

login
register
mail settings
Submitter phabricator
Date Oct. 9, 2020, 4:23 p.m.
Message ID <differential-rev-PHID-DREV-p76h2reuvfwjff2skocp-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47421/
State Superseded
Headers show

Comments

phabricator - Oct. 9, 2020, 4:23 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  One of our users ran into this (unrelated to my recent work on
  more specific errors).

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9184

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1309,7 +1309,8 @@ 
             wctx[f].remove(ignoremissing=True)
         except OSError as inst:
             repo.ui.warn(
-                _(b"update failed to remove %s: %s!\n") % (f, inst.strerror)
+                _(b"update failed to remove %s: %s!\n")
+                % (f, pycompat.bytestr(inst.strerror))
             )
         if i == 100:
             yield i, f