# HG changeset patch # User Augie Fackler # Date 2019-01-14 22:45:48 # Node ID 6242a19004cae09e3b0cd8926a3d1f3adc910613 # Parent 8633c716f90846470f90cb379cd35afafe1db83e # Parent fbd168455b26ddbcd0302cc3471ab7e252907677 merge with stable diff --git a/mercurial/destutil.py b/mercurial/destutil.py --- a/mercurial/destutil.py +++ b/mercurial/destutil.py @@ -381,6 +381,8 @@ def desthistedit(ui, repo): revs = stack.getstack(repo) elif default: revs = scmutil.revrange(repo, [default]) + else: + raise error.Abort(_("config option histedit.defaultrev can't be empty")) if revs: # Take the first revision of the revset as the root 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 @@ -112,6 +112,13 @@ Test config specified default > pick 08d98a8350f3 4 five > EOF +Test invalid config default +--------------------------- + + $ hg histedit --config "histedit.defaultrev=" + abort: config option histedit.defaultrev can't be empty + [255] + Run on a revision not descendants of the initial parent --------------------------------------------------------------------