diff -r 6b52cffd8d0a -r e2f7b2695ba1 mercurial/merge.py --- a/mercurial/merge.py Tue Mar 02 00:05:22 2021 +0100 +++ b/mercurial/merge.py Thu Mar 18 18:24:59 2021 -0400 @@ -20,6 +20,7 @@ nullrev, ) from .thirdparty import attr +from .utils import stringutil from . import ( copies, encoding, @@ -1343,7 +1344,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