diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -20,6 +20,7 @@ nullrev, ) from .thirdparty import attr +from .utils import stringutil from . import ( copies, encoding, @@ -1341,7 +1342,7 @@ except OSError as inst: repo.ui.warn( _(b"update failed to remove %s: %s!\n") - % (f, pycompat.bytestr(inst.strerror)) + % (f, stringutil.forcebytestr(inst.strerror)) ) if i == 100: yield i, f