From patchwork Tue Feb 13 06:03:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2221: convcmd: pass encoding name as a sysstr From: phabricator X-Patchwork-Id: 27811 Message-Id: <9188af90fcfe32dffeaff9f481bf90f9@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Tue, 13 Feb 2018 06:03:16 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG6df206ef4b10: convcmd: pass encoding name as a sysstr (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2221?vs=5620&id=5624 REVISION DETAIL https://phab.mercurial-scm.org/D2221 AFFECTED FILES hgext/convert/convcmd.py CHANGE DETAILS To: durin42, #hg-reviewers, indygreg Cc: mercurial-devel diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py --- a/hgext/convert/convcmd.py +++ b/hgext/convert/convcmd.py @@ -16,6 +16,7 @@ encoding, error, hg, + pycompat, scmutil, util, ) @@ -55,9 +56,10 @@ def recode(s): if isinstance(s, unicode): - return s.encode(orig_encoding, 'replace') + return s.encode(pycompat.sysstr(orig_encoding), 'replace') else: - return s.decode('utf-8').encode(orig_encoding, 'replace') + return s.decode('utf-8').encode( + pycompat.sysstr(orig_encoding), 'replace') def mapbranch(branch, branchmap): '''