Patchwork D3489: cvsps: convert encoding name to sysstr

login
register
mail settings
Submitter phabricator
Date May 10, 2018, 10:42 a.m.
Message ID <d39809a96662f2a704499587113e414d@localhost.localdomain>
Download mbox | patch
Permalink /patch/31440/
State Not Applicable
Headers show

Comments

phabricator - May 10, 2018, 10:42 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG120c343c38b7: cvsps: convert encoding name to sysstr (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3489?vs=8541&id=8598

REVISION DETAIL
  https://phab.mercurial-scm.org/D3489

AFFECTED FILES
  hgext/convert/cvsps.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/convert/cvsps.py b/hgext/convert/cvsps.py
--- a/hgext/convert/cvsps.py
+++ b/hgext/convert/cvsps.py
@@ -510,7 +510,8 @@ 
             comment = entry.comment
             for e in encodings:
                 try:
-                    entry.comment = comment.decode(e).encode('utf-8')
+                    entry.comment = comment.decode(
+                        pycompat.sysstr(e)).encode('utf-8')
                     if ui.debugflag:
                         ui.debug("transcoding by %s: %s of %s\n" %
                                  (e, revstr(entry.revision), entry.file))