# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1491629557 -19800 # Node ID 994b0b1c77d608e937bca2b6647d57030de7b8f1 # Parent 4d504e541d3d1a139f8ebbf8c405291140fd1853 py3: use encoding.unitolocal instead of .encode(encoding.encoding) diff -r 4d504e541d3d -r 994b0b1c77d6 mercurial/scmutil.py --- a/mercurial/scmutil.py Wed May 03 10:43:59 2017 -0700 +++ b/mercurial/scmutil.py Sat Apr 08 11:02:37 2017 +0530 @@ -212,7 +212,7 @@ reason = inst.reason if isinstance(reason, unicode): # SSLError of Python 2.7.9 contains a unicode - reason = reason.encode(encoding.encoding, 'replace') + reason = encoding.unitolocal(reason) ui.warn(_("abort: error: %s\n") % reason) elif (util.safehasattr(inst, "args") and inst.args and inst.args[0] == errno.EPIPE):