[PATCH 1 of 8] py3: cast bytes encoding name to str in fileset.py

Yuya Nishihara yuya at tcha.org
Sat Jun 16 11:06:07 UTC 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1529135798 -32400
#      Sat Jun 16 16:56:38 2018 +0900
# Node ID 5cb39a368c803683fd8bc944480486a618ab785a
# Parent  c924e7dbcd0ff8bf2f7ab9e5bde5f6679d70a894
py3: cast bytes encoding name to str in fileset.py

diff --git a/mercurial/fileset.py b/mercurial/fileset.py
--- a/mercurial/fileset.py
+++ b/mercurial/fileset.py
@@ -427,7 +427,7 @@ def encoding(mctx, x):
     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:


More information about the Mercurial-devel mailing list