merge with stable
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 25 Jan 2017 16:50:19 +0100
changeset 1785 f22120b12715
parent 1783 9480e13ee59a (current diff)
parent 1784 c3741a5adbb0 (diff)
child 1787 e553fc96447d
merge with stable
README
hgext/evolve.py
tests/test-evolve.t
--- a/README	Mon Jan 23 16:09:16 2017 +0100
+++ b/README	Wed Jan 25 16:50:19 2017 +0100
@@ -46,7 +46,7 @@
 say in $HGSRC:
 
     cd tests
-    python $HGSRC/tests/run-tests.py --with-hg=$HGSRC/hg
+    python $HGSRC/tests/run-tests.py
 
 (evolve's stable and default branches correspond to Mercurial's stable
 and default branches. So to test evolve from default, you need
@@ -62,6 +62,10 @@
  - improvement of prune error message.
  - fold: require --from flag for folding revisions to working copy
 
+5.5.1 --
+
+ - fix crash when trying to fold an empty revision set (issue5453)
+
 5.5.0 -- 2016-10-30
 
  - The {obsolete} template now yield "obsolete" or "".
--- a/hgext/evolve.py	Mon Jan 23 16:09:16 2017 +0100
+++ b/hgext/evolve.py	Wed Jan 25 16:50:19 2017 +0100
@@ -3133,7 +3133,10 @@
     else:
         raise error.Abort(_('must specify either --from or --exact'))
 
-    if len(revs) == 1:
+    if not revs:
+        raise error.Abort(_('specified revisions evaluate to an empty set'),
+                          hint=_('use different revision arguments'))
+    elif len(revs) == 1:
         ui.write_err(_('single revision specified, nothing to fold\n'))
         return 1
 
--- a/tests/test-evolve.t	Mon Jan 23 16:09:16 2017 +0100
+++ b/tests/test-evolve.t	Wed Jan 25 16:50:19 2017 +0100
@@ -701,6 +701,10 @@
   abort: cannot fold non-linear revisions
   (given revisions are unrelated to parent of working directory)
   [255]
+  $ hg fold --exact -r "4 and not 4"
+  abort: specified revisions evaluate to an empty set
+  (use different revision arguments)
+  [255]
   $ hg phase --public 0
   $ hg fold --from -r 0
   abort: cannot fold public revisions