py3: cast bytes encoding name to str in fileset.py
authorYuya Nishihara <yuya@tcha.org>
Sat, 16 Jun 2018 16:56:38 +0900
changeset 38325 5cb39a368c80
parent 38324 c924e7dbcd0f
child 38326 8783f128048e
py3: cast bytes encoding name to str in fileset.py
mercurial/fileset.py
--- a/mercurial/fileset.py	Thu Jun 14 15:12:28 2018 -0700
+++ b/mercurial/fileset.py	Sat Jun 16 16:56:38 2018 +0900
@@ -427,7 +427,7 @@
     for f in mctx.existing():
         d = mctx.ctx[f].data()
         try:
-            d.decode(enc)
+            d.decode(pycompat.sysstr(enc))
         except LookupError:
             raise error.Abort(_("unknown encoding '%s'") % enc)
         except UnicodeDecodeError: