Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/fileset.py @ 38334:5cb39a368c80
py3: cast bytes encoding name to str in fileset.py
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 16 Jun 2018 16:56:38 +0900 |
parents | 5f2dc1b71cf1 |
children | 8783f128048e |
comparison
equal
deleted
inserted
replaced
38333:c924e7dbcd0f | 38334:5cb39a368c80 |
---|---|
425 | 425 |
426 s = [] | 426 s = [] |
427 for f in mctx.existing(): | 427 for f in mctx.existing(): |
428 d = mctx.ctx[f].data() | 428 d = mctx.ctx[f].data() |
429 try: | 429 try: |
430 d.decode(enc) | 430 d.decode(pycompat.sysstr(enc)) |
431 except LookupError: | 431 except LookupError: |
432 raise error.Abort(_("unknown encoding '%s'") % enc) | 432 raise error.Abort(_("unknown encoding '%s'") % enc) |
433 except UnicodeDecodeError: | 433 except UnicodeDecodeError: |
434 continue | 434 continue |
435 s.append(f) | 435 s.append(f) |