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