Show More
@@ -631,7 +631,10 b' def formatspec(expr, *args):' | |||||
631 | break |
|
631 | break | |
632 | ret.append(expr[pos:q]) |
|
632 | ret.append(expr[pos:q]) | |
633 | pos = q + 1 |
|
633 | pos = q + 1 | |
634 | d = expr[pos] |
|
634 | try: | |
|
635 | d = expr[pos] | |||
|
636 | except IndexError: | |||
|
637 | raise error.ParseError(_('incomplete revspec format character')) | |||
635 | if d == '%': |
|
638 | if d == '%': | |
636 | ret.append(d) |
|
639 | ret.append(d) | |
637 | pos += 1 |
|
640 | pos += 1 | |
@@ -644,7 +647,10 b' def formatspec(expr, *args):' | |||||
644 | if d == 'l': |
|
647 | if d == 'l': | |
645 | # a list of some type |
|
648 | # a list of some type | |
646 | pos += 1 |
|
649 | pos += 1 | |
647 |
|
|
650 | try: | |
|
651 | d = expr[pos] | |||
|
652 | except IndexError: | |||
|
653 | raise error.ParseError(_('incomplete revspec format character')) | |||
648 | ret.append(listexp(list(arg), d)) |
|
654 | ret.append(listexp(list(arg), d)) | |
649 | else: |
|
655 | else: | |
650 | ret.append(argtype(d, arg)) |
|
656 | ret.append(argtype(d, arg)) |
@@ -4097,6 +4097,12 b' Invalid arguments passed to revset()' | |||||
4097 | $ hg log -T '{revset("%s", 0, 1)}\n' |
|
4097 | $ hg log -T '{revset("%s", 0, 1)}\n' | |
4098 | hg: parse error: too many revspec arguments specified |
|
4098 | hg: parse error: too many revspec arguments specified | |
4099 | [255] |
|
4099 | [255] | |
|
4100 | $ hg log -T '{revset("%", 0)}\n' | |||
|
4101 | hg: parse error: incomplete revspec format character | |||
|
4102 | [255] | |||
|
4103 | $ hg log -T '{revset("%l", 0)}\n' | |||
|
4104 | hg: parse error: incomplete revspec format character | |||
|
4105 | [255] | |||
4100 |
|
4106 | |||
4101 | Test files function |
|
4107 | Test files function | |
4102 |
|
4108 |
General Comments 0
You need to be logged in to leave comments.
Login now