destutil: raise more specific error when histedit.defaultrev is empty
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 10 Nov 2020 09:14:01 -0800
changeset 45843 c7abdbc8fd47
parent 45842 1bf1dcbc9950
child 45844 3175b0e0058b
destutil: raise more specific error when histedit.defaultrev is empty Differential Revision: https://phab.mercurial-scm.org/D9313
mercurial/destutil.py
tests/test-histedit-arguments.t
--- a/mercurial/destutil.py	Tue Oct 20 08:56:00 2020 -0700
+++ b/mercurial/destutil.py	Tue Nov 10 09:14:01 2020 -0800
@@ -405,7 +405,7 @@
     elif default:
         revs = scmutil.revrange(repo, [default])
     else:
-        raise error.Abort(
+        raise error.ConfigError(
             _(b"config option histedit.defaultrev can't be empty")
         )
 
--- a/tests/test-histedit-arguments.t	Tue Oct 20 08:56:00 2020 -0700
+++ b/tests/test-histedit-arguments.t	Tue Nov 10 09:14:01 2020 -0800
@@ -127,7 +127,7 @@
 
   $ hg histedit --config "histedit.defaultrev="
   abort: config option histedit.defaultrev can't be empty
-  [255]
+  [30]
 
 Run on a revision not descendants of the initial parent
 --------------------------------------------------------------------