cvsps: convert encoding name to sysstr
authorAugie Fackler <augie@google.com>
Fri, 27 Apr 2018 01:32:21 -0400
changeset 37918 120c343c38b7
parent 37917 c6904da6ab15
child 37919 7a97a622244d
cvsps: convert encoding name to sysstr Differential Revision: https://phab.mercurial-scm.org/D3489
hgext/convert/cvsps.py
--- a/hgext/convert/cvsps.py	Wed May 09 13:46:31 2018 -0700
+++ b/hgext/convert/cvsps.py	Fri Apr 27 01:32:21 2018 -0400
@@ -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))