changeset 45843:c7abdbc8fd47

destutil: raise more specific error when histedit.defaultrev is empty Differential Revision: https://phab.mercurial-scm.org/D9313
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 10 Nov 2020 09:14:01 -0800
parents 1bf1dcbc9950
children 3175b0e0058b
files mercurial/destutil.py tests/test-histedit-arguments.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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
 --------------------------------------------------------------------