Patchwork D9313: destutil: raise more specific error when histedit.defaultrev is empty

login
register
mail settings
Submitter phabricator
Date Nov. 12, 2020, 4:39 p.m.
Message ID <differential-rev-PHID-DREV-bk67b2xqtuwtvira6hdc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47585/
State Superseded
Headers show

Comments

phabricator - Nov. 12, 2020, 4:39 p.m.
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

Patch

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")
         )