Mercurial > public > mercurial-scm > hg-stable
diff mercurial/logcmdutil.py @ 48129:b74e128676d4
errors: raise InputError from revpair() iff revset provided by the user
Same reasoning as for `revrange()` in an earlier patch.
Differential Revision: https://phab.mercurial-scm.org/D11561
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 28 Sep 2021 13:59:01 -0700 |
parents | 5ced12cfa41b |
children | 5105a9975407 |
line wrap: on
line diff
--- a/mercurial/logcmdutil.py Tue Sep 28 08:47:11 2021 -0700 +++ b/mercurial/logcmdutil.py Tue Sep 28 13:59:01 2021 -0700 @@ -912,6 +912,18 @@ return None +def revpair(repo, revs): + """Resolves user-provided revset(s) into two revisions. + + This just wraps the lower-level scmutil.revpair() in order to raise an + exception indicating user error. + """ + try: + return scmutil.revpair(repo, revs) + except error.RepoLookupError as e: + raise error.InputError(e.args[0], hint=e.hint) + + def revrange(repo, specs, localalias=None): """Resolves user-provided revset(s).