destutil: raise more specific error when histedit.defaultrev is empty
Differential Revision: https://phab.mercurial-scm.org/D9313
--- 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
--------------------------------------------------------------------