From patchwork Fri Oct 9 16:23:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9184: py3: convert an exception message to bytes From: phabricator X-Patchwork-Id: 47421 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 9 Oct 2020 16:23:13 +0000 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 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