From patchwork Thu Nov 12 16:39:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9313: destutil: raise more specific error when histedit.defaultrev is empty From: phabricator X-Patchwork-Id: 47585 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 12 Nov 2020 16:39:38 +0000 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 To: martinvonz, durin42, #hg-reviewers Cc: mercurial-patches, mercurial-devel 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") )