mercurial/logcmdutil.py
changeset 48553 3b6b43a7ace4
parent 48552 91017508a785
child 48875 6000f5b25c9b
child 49315 2f326ea19fbc
--- a/mercurial/logcmdutil.py	Thu Jan 06 22:03:21 2022 -0800
+++ b/mercurial/logcmdutil.py	Thu Jan 06 22:09:40 2022 -0800
@@ -831,7 +831,7 @@
                         # take the slow path.
                         found = slowpath = True
                 if not found:
-                    raise error.Abort(
+                    raise error.StateError(
                         _(
                             b'cannot follow file not in any of the specified '
                             b'revisions: "%s"'
@@ -847,7 +847,7 @@
                         slowpath = True
                         continue
                     else:
-                        raise error.Abort(
+                        raise error.StateError(
                             _(
                                 b'cannot follow file not in parent '
                                 b'revision: "%s"'
@@ -858,7 +858,7 @@
                 if not filelog:
                     # A file exists in wdir but not in history, which means
                     # the file isn't committed yet.
-                    raise error.Abort(
+                    raise error.StateError(
                         _(b'cannot follow nonexistent file: "%s"') % f
                     )
         else:
@@ -1138,7 +1138,7 @@
     linerangesbyrev = {}
     for fname, (fromline, toline) in _parselinerangeopt(repo, opts):
         if fname not in wctx:
-            raise error.Abort(
+            raise error.StateError(
                 _(b'cannot follow file not in parent revision: "%s"') % fname
             )
         fctx = wctx.filectx(fname)