Show More
@@ -217,7 +217,7 b' def ancestorspec(repo, subset, x, n):' | |||||
217 | """ |
|
217 | """ | |
218 | try: |
|
218 | try: | |
219 | n = int(n[1]) |
|
219 | n = int(n[1]) | |
220 | except ValueError: |
|
220 | except (TypeError, ValueError): | |
221 | raise error.ParseError(_("~ expects a number")) |
|
221 | raise error.ParseError(_("~ expects a number")) | |
222 | ps = set() |
|
222 | ps = set() | |
223 | cl = repo.changelog |
|
223 | cl = repo.changelog | |
@@ -521,7 +521,7 b' def limit(repo, subset, x):' | |||||
521 | try: |
|
521 | try: | |
522 | # i18n: "limit" is a keyword |
|
522 | # i18n: "limit" is a keyword | |
523 | lim = int(getstring(l[1], _("limit requires a number"))) |
|
523 | lim = int(getstring(l[1], _("limit requires a number"))) | |
524 | except ValueError: |
|
524 | except (TypeError, ValueError): | |
525 | # i18n: "limit" is a keyword |
|
525 | # i18n: "limit" is a keyword | |
526 | raise error.ParseError(_("limit expects a number")) |
|
526 | raise error.ParseError(_("limit expects a number")) | |
527 | ss = set(subset) |
|
527 | ss = set(subset) | |
@@ -537,7 +537,7 b' def last(repo, subset, x):' | |||||
537 | try: |
|
537 | try: | |
538 | # i18n: "last" is a keyword |
|
538 | # i18n: "last" is a keyword | |
539 | lim = int(getstring(l[1], _("last requires a number"))) |
|
539 | lim = int(getstring(l[1], _("last requires a number"))) | |
540 | except ValueError: |
|
540 | except (TypeError, ValueError): | |
541 | # i18n: "last" is a keyword |
|
541 | # i18n: "last" is a keyword | |
542 | raise error.ParseError(_("last expects a number")) |
|
542 | raise error.ParseError(_("last expects a number")) | |
543 | ss = set(subset) |
|
543 | ss = set(subset) | |
@@ -676,7 +676,7 b' def parentspec(repo, subset, x, n):' | |||||
676 | n = int(n[1]) |
|
676 | n = int(n[1]) | |
677 | if n not in (0, 1, 2): |
|
677 | if n not in (0, 1, 2): | |
678 | raise ValueError |
|
678 | raise ValueError | |
679 | except ValueError: |
|
679 | except (TypeError, ValueError): | |
680 | raise error.ParseError(_("^ expects a number 0, 1, or 2")) |
|
680 | raise error.ParseError(_("^ expects a number 0, 1, or 2")) | |
681 | ps = set() |
|
681 | ps = set() | |
682 | cl = repo.changelog |
|
682 | cl = repo.changelog | |
@@ -718,7 +718,7 b' def rev(repo, subset, x):' | |||||
718 | try: |
|
718 | try: | |
719 | # i18n: "rev" is a keyword |
|
719 | # i18n: "rev" is a keyword | |
720 | l = int(getstring(l[0], _("rev requires a number"))) |
|
720 | l = int(getstring(l[0], _("rev requires a number"))) | |
721 | except ValueError: |
|
721 | except (TypeError, ValueError): | |
722 | # i18n: "rev" is a keyword |
|
722 | # i18n: "rev" is a keyword | |
723 | raise error.ParseError(_("rev expects a number")) |
|
723 | raise error.ParseError(_("rev expects a number")) | |
724 | return [r for r in subset if r == l] |
|
724 | return [r for r in subset if r == l] |
General Comments 0
You need to be logged in to leave comments.
Login now