Show More
@@ -2082,19 +2082,11 b' def removes(repo, subset, x):' | |||
|
2082 | 2082 | |
|
2083 | 2083 | @predicate(b'rev(number)', safe=True) |
|
2084 | 2084 | def rev(repo, subset, x): |
|
2085 | """Revision with the given numeric identifier. | |
|
2086 | """ | |
|
2087 | # i18n: "rev" is a keyword | |
|
2088 | l = getargs(x, 1, 1, _(b"rev requires one argument")) | |
|
2085 | """Revision with the given numeric identifier.""" | |
|
2089 | 2086 | try: |
|
2090 | # i18n: "rev" is a keyword | |
|
2091 | l = int(getstring(l[0], _(b"rev requires a number"))) | |
|
2092 | except (TypeError, ValueError): | |
|
2093 | # i18n: "rev" is a keyword | |
|
2094 | raise error.ParseError(_(b"rev expects a number")) | |
|
2095 | if l not in repo.changelog and l not in _virtualrevs: | |
|
2087 | return _rev(repo, subset, x) | |
|
2088 | except error.RepoLookupError: | |
|
2096 | 2089 | return baseset() |
|
2097 | return subset & baseset([l]) | |
|
2098 | 2090 | |
|
2099 | 2091 | |
|
2100 | 2092 | @predicate(b'_rev(number)', safe=True) |
General Comments 0
You need to be logged in to leave comments.
Login now