mercurial/logcmdutil.py
changeset 48118 5105a9975407
parent 48117 b74e128676d4
child 48552 91017508a785
--- a/mercurial/logcmdutil.py	Tue Sep 28 13:59:01 2021 -0700
+++ b/mercurial/logcmdutil.py	Tue Sep 28 15:11:22 2021 -0700
@@ -912,6 +912,18 @@
     return None
 
 
+def revsingle(repo, revspec, default=b'.', localalias=None):
+    """Resolves user-provided revset(s) into a single revision.
+
+    This just wraps the lower-level scmutil.revsingle() in order to raise an
+    exception indicating user error.
+    """
+    try:
+        return scmutil.revsingle(repo, revspec, default, localalias)
+    except error.RepoLookupError as e:
+        raise error.InputError(e.args[0], hint=e.hint)
+
+
 def revpair(repo, revs):
     """Resolves user-provided revset(s) into two revisions.