Show More
@@ -620,7 +620,7 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 |
ret = |
|
|
623 | ret = [] | |
|
624 | 624 | pos = 0 |
|
625 | 625 | arg = 0 |
|
626 | 626 | while pos < len(expr): |
@@ -629,24 +629,24 b' def formatspec(expr, *args):' | |||
|
629 | 629 | pos += 1 |
|
630 | 630 | d = expr[pos] |
|
631 | 631 | if d == '%': |
|
632 |
ret |
|
|
632 | ret.append(d) | |
|
633 | 633 | elif d in 'dsnbr': |
|
634 |
ret |
|
|
634 | ret.append(argtype(d, args[arg])) | |
|
635 | 635 | arg += 1 |
|
636 | 636 | elif d == 'l': |
|
637 | 637 | # a list of some type |
|
638 | 638 | pos += 1 |
|
639 | 639 | d = expr[pos] |
|
640 |
ret |
|
|
640 | ret.append(listexp(list(args[arg]), d)) | |
|
641 | 641 | arg += 1 |
|
642 | 642 | else: |
|
643 | 643 | raise error.Abort(_('unexpected revspec format character %s') |
|
644 | 644 | % d) |
|
645 | 645 | else: |
|
646 |
ret |
|
|
646 | ret.append(c) | |
|
647 | 647 | pos += 1 |
|
648 | 648 | |
|
649 | return ret | |
|
649 | return ''.join(ret) | |
|
650 | 650 | |
|
651 | 651 | def prettyformat(tree): |
|
652 | 652 | return parser.prettyformat(tree, ('string', 'symbol')) |
General Comments 0
You need to be logged in to leave comments.
Login now