Mercurial > hg
changeset 36473: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 | d0d5eef57fb0 |
children | d139eb308358 |
files | mercurial/commands.py mercurial/fileset.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Feb 28 10:38:09 2018 -0800 +++ b/mercurial/commands.py Wed Feb 28 19:54:10 2018 +0530 @@ -4482,7 +4482,7 @@ for f in ms: if not m(f): continue - flags = ''.join(['-%s ' % o[0] for o in flaglist + flags = ''.join(['-%s ' % o[0:1] for o in flaglist if opts.get(o)]) hint = _("(try: hg resolve %s%s)\n") % ( flags,
--- 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