# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1498360011 -19800 # Node ID db8531c459532f7bb78eb9c0424e0a9d25806bdf # Parent 1b6946f87c5068a30a5a2591ada67c35ce087ce6 py3: slice over bytes to prevent getting it's ascii value diff -r 1b6946f87c50 -r db8531c45953 mercurial/fancyopts.py --- a/mercurial/fancyopts.py Tue Jun 27 00:23:32 2017 +0530 +++ b/mercurial/fancyopts.py Sun Jun 25 08:36:51 2017 +0530 @@ -39,7 +39,7 @@ args = [] while parseargs: arg = parseargs.pop(0) - if arg and arg[0] == '-' and len(arg) > 1: + if arg and arg[0:1] == '-' and len(arg) > 1: parseargs.insert(0, arg) topts, newparseargs = pycompat.getoptb(parseargs,\ options, longoptions) diff -r 1b6946f87c50 -r db8531c45953 setup.py --- a/setup.py Tue Jun 27 00:23:32 2017 +0530 +++ b/setup.py Sun Jun 25 08:36:51 2017 +0530 @@ -182,7 +182,7 @@ if os.path.isdir('.hg'): cmd = [sys.executable, 'hg', 'log', '-r', '.', '--template', '{tags}\n'] - numerictags = [t for t in runhg(cmd, env).split() if t[0].isdigit()] + numerictags = [t for t in runhg(cmd, env).split() if t[0:1].isdigit()] hgid = runhg([sys.executable, 'hg', 'id', '-i'], env).strip() if numerictags: # tag(s) found version = numerictags[-1]