# HG changeset patch # User Yuya Nishihara # Date 1489364203 25200 # Node ID 1c48a8278b2f015fca607dfc652823560a5ac580 # Parent fac5cd3b8673beaad35f52be09ee8358e133247c py3: fix slicing of bytes in revset.formatspec() diff -r fac5cd3b8673 -r 1c48a8278b2f mercurial/revsetlang.py --- a/mercurial/revsetlang.py Sun Mar 12 17:13:54 2017 -0700 +++ b/mercurial/revsetlang.py Sun Mar 12 17:16:43 2017 -0700 @@ -644,10 +644,10 @@ pos = 0 arg = 0 while pos < len(expr): - c = expr[pos] + c = expr[pos:pos + 1] if c == '%': pos += 1 - d = expr[pos] + d = expr[pos:pos + 1] if d == '%': ret += d elif d in 'dsnbr': @@ -656,7 +656,7 @@ elif d == 'l': # a list of some type pos += 1 - d = expr[pos] + d = expr[pos:pos + 1] ret += listexp(list(args[arg]), d) arg += 1 else: