Mercurial > public > mercurial-scm > hg-stable
diff mercurial/fileset.py @ 36503:ab5f18a9dcac
py3: slice over bytes or use startswith() to prevent getting ascii values
Differential Revision: https://phab.mercurial-scm.org/D2496
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 28 Feb 2018 19:54:10 +0530 |
parents | 7b2b82f891bf |
children | db33c5bc781f |
line wrap: on
line diff
--- a/mercurial/fileset.py Wed Feb 28 10:38:09 2018 -0800 +++ b/mercurial/fileset.py Wed Feb 28 19:54:10 2018 +0530 @@ -392,7 +392,7 @@ elif expr.startswith(">"): a = util.sizetoint(expr[1:]) return lambda x: x > a - elif expr[0].isdigit or expr[0] == '.': + elif expr[0:1].isdigit or expr.startswith('.'): a = util.sizetoint(expr) b = _sizetomax(expr) return lambda x: x >= a and x <= b