Show More
@@ -620,9 +620,9 b' def formatspec(expr, *args):' | |||
|
620 | 620 | return '(%s or %s)' % (listexp(s[:m], t), listexp(s[m:], t)) |
|
621 | 621 | |
|
622 | 622 | expr = pycompat.bytestr(expr) |
|
623 | argiter = iter(args) | |
|
623 | 624 | ret = [] |
|
624 | 625 | pos = 0 |
|
625 | arg = 0 | |
|
626 | 626 | while pos < len(expr): |
|
627 | 627 | q = expr.find('%', pos) |
|
628 | 628 | if q < 0: |
@@ -634,14 +634,12 b' def formatspec(expr, *args):' | |||
|
634 | 634 | if d == '%': |
|
635 | 635 | ret.append(d) |
|
636 | 636 | elif d in 'dsnbr': |
|
637 |
ret.append(argtype(d, |
|
|
638 | arg += 1 | |
|
637 | ret.append(argtype(d, next(argiter))) | |
|
639 | 638 | elif d == 'l': |
|
640 | 639 | # a list of some type |
|
641 | 640 | pos += 1 |
|
642 | 641 | d = expr[pos] |
|
643 |
ret.append(listexp(list( |
|
|
644 | arg += 1 | |
|
642 | ret.append(listexp(list(next(argiter)), d)) | |
|
645 | 643 | else: |
|
646 | 644 | raise error.Abort(_('unexpected revspec format character %s') % d) |
|
647 | 645 | pos += 1 |
General Comments 0
You need to be logged in to leave comments.
Login now