Closed by commit rHGe54da18c421e: py3: fix exception display encoding in contrib/simplemerge.py (authored by touilleMan). This revision was automatically updated to reflect the committed changes.
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7191?vs=17445&id=17456 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7191/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7191 AFFECTED FILES contrib/simplemerge CHANGE DETAILS diff --git a/contrib/simplemerge b/contrib/simplemerge --- a/contrib/simplemerge +++ b/contrib/simplemerge @@ -18,6 +18,7 @@ ) from mercurial.utils import ( procutil, + stringutil ) options = [(b'L', b'label', [], _(b'labels to use on conflict markers')), @@ -75,8 +76,7 @@ context.arbitraryfilectx(other), **pycompat.strkwargs(opts))) except ParseError as e: - if pycompat.ispy3: - e = str(e).encode('utf8') + e = stringutil.forcebytestr(e) pycompat.stdout.write(b"%s: %s\n" % (sys.argv[0].encode('utf8'), e)) showhelp() sys.exit(1) To: touilleMan, #hg-reviewers, indygreg Cc: mjpieters, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel