Show More
@@ -607,7 +607,7 b' def _formatlistexp(s, t):' | |||
|
607 | 607 | elif l == 1: |
|
608 | 608 | return _formatargtype(t, s[0]) |
|
609 | 609 | elif t == 'd': |
|
610 | return "_intlist('%s')" % "\0".join('%d' % int(a) for a in s) | |
|
610 | return _formatintlist(s) | |
|
611 | 611 | elif t == 's': |
|
612 | 612 | return "_list(%s)" % _quote("\0".join(s)) |
|
613 | 613 | elif t == 'n': |
@@ -621,6 +621,17 b' def _formatlistexp(s, t):' | |||
|
621 | 621 | m = l // 2 |
|
622 | 622 | return '(%s or %s)' % (_formatlistexp(s[:m], t), _formatlistexp(s[m:], t)) |
|
623 | 623 | |
|
624 | def _formatintlist(data): | |
|
625 | try: | |
|
626 | l = len(data) | |
|
627 | if l == 0: | |
|
628 | return "_list('')" | |
|
629 | elif l == 1: | |
|
630 | return _formatargtype('d', data[0]) | |
|
631 | return "_intlist('%s')" % "\0".join('%d' % int(a) for a in data) | |
|
632 | except (TypeError, ValueError): | |
|
633 | raise error.ParseError(_('invalid argument for revspec')) | |
|
634 | ||
|
624 | 635 | def _formatparamexp(args, t): |
|
625 | 636 | return ', '.join(_formatargtype(t, a) for a in args) |
|
626 | 637 |
General Comments 0
You need to be logged in to leave comments.
Login now