From patchwork Sat Jun 16 11:06:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,8] py3: cast bytes encoding name to str in fileset.py From: Yuya Nishihara X-Patchwork-Id: 32187 Message-Id: <5cb39a368c803683fd8b.1529147167@mimosa> To: mercurial-devel@mercurial-scm.org Date: Sat, 16 Jun 2018 20:06:07 +0900 # HG changeset patch # User Yuya Nishihara # 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: