##// END OF EJS Templates
py3: use bytestr wrapper in revsetlang.formatspec()...
Yuya Nishihara -
r31440:f784ba18 default
parent child Browse files
Show More
@@ -640,14 +640,15 b' def formatspec(expr, *args):'
640 640 m = l // 2
641 641 return '(%s or %s)' % (listexp(s[:m], t), listexp(s[m:], t))
642 642
643 expr = pycompat.bytestr(expr)
643 644 ret = ''
644 645 pos = 0
645 646 arg = 0
646 647 while pos < len(expr):
647 c = expr[pos:pos + 1]
648 c = expr[pos]
648 649 if c == '%':
649 650 pos += 1
650 d = expr[pos:pos + 1]
651 d = expr[pos]
651 652 if d == '%':
652 653 ret += d
653 654 elif d in 'dsnbr':
@@ -656,7 +657,7 b' def formatspec(expr, *args):'
656 657 elif d == 'l':
657 658 # a list of some type
658 659 pos += 1
659 d = expr[pos:pos + 1]
660 d = expr[pos]
660 661 ret += listexp(list(args[arg]), d)
661 662 arg += 1
662 663 else:
General Comments 0
You need to be logged in to leave comments. Login now