From patchwork Fri Mar 2 16:18:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2551: match: some minimal pycompat fixes guided by test-hgignore.t From: phabricator X-Patchwork-Id: 28697 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Fri, 2 Mar 2018 16:18:54 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG9adfa48792a7: match: some minimal pycompat fixes guided by test-hgignore.t (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2551?vs=6347&id=6361 REVISION DETAIL https://phab.mercurial-scm.org/D2551 AFFECTED FILES mercurial/match.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/match.py b/mercurial/match.py --- a/mercurial/match.py +++ b/mercurial/match.py @@ -16,6 +16,7 @@ encoding, error, pathutil, + pycompat, util, ) @@ -226,7 +227,7 @@ except IOError as inst: if warn: warn(_("skipping unreadable pattern file '%s': %s\n") % - (pat, inst.strerror)) + (pat, util.forcebytestr(inst.strerror))) continue # else: re or relre - which cannot be normalized kindpats.append((kind, pat, '')) @@ -428,7 +429,7 @@ @encoding.strmethod def __repr__(self): - return ('' % self._pats) + return ('' % pycompat.bytestr(self._pats)) class exactmatcher(basematcher): '''Matches the input files exactly. They are interpreted as paths, not