changeset 41215:6242a19004ca

merge with stable
author Augie Fackler <augie@google.com>
date Mon, 14 Jan 2019 17:45:48 -0500
parents 8633c716f908 (current diff) fbd168455b26 (diff)
children 5cc5a5561c3f
files
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/destutil.py	Sun Jan 13 17:56:02 2019 +0530
+++ b/mercurial/destutil.py	Mon Jan 14 17:45:48 2019 -0500
@@ -381,6 +381,8 @@
         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
--- a/tests/test-histedit-arguments.t	Sun Jan 13 17:56:02 2019 +0530
+++ b/tests/test-histedit-arguments.t	Mon Jan 14 17:45:48 2019 -0500
@@ -112,6 +112,13 @@
   > 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
 --------------------------------------------------------------------