py3: slice over bytes or use startswith() to prevent getting ascii values
Differential Revision: https://phab.mercurial-scm.org/D2496
--- 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