D9313: destutil: raise more specific error when histedit.defaultrev is empty
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Thu Nov 12 16:39:38 UTC 2020
martinvonz created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D9313
AFFECTED FILES
mercurial/destutil.py
tests/test-histedit-arguments.t
CHANGE DETAILS
diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t
--- a/tests/test-histedit-arguments.t
+++ b/tests/test-histedit-arguments.t
@@ -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
--------------------------------------------------------------------
diff --git a/mercurial/destutil.py b/mercurial/destutil.py
--- a/mercurial/destutil.py
+++ b/mercurial/destutil.py
@@ -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")
)
To: martinvonz, durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list