next: properly report no children when --evolve is used
If no aspiring children exist, 'hg next --evolve' should properly issue an error
message instead of crashing.
--- a/hgext/evolve.py Mon Aug 10 00:24:15 2015 -0700
+++ b/hgext/evolve.py Mon Aug 10 00:41:18 2015 -0700
@@ -2063,7 +2063,7 @@
result = 1
else:
aspchildren = _aspiringchildren(repo, [repo['.'].rev()])
- if not opts['evolve']:
+ if not opts['evolve'] or not aspchildren:
ui.warn(_('no children\n'))
if aspchildren:
msg = _('(%i unstable changesets to be evolved here, '
--- a/tests/test-prev-next.t Mon Aug 10 00:24:15 2015 -0700
+++ b/tests/test-prev-next.t Mon Aug 10 00:41:18 2015 -0700
@@ -137,6 +137,9 @@
$ hg next
no children
[1]
+ $ hg next --evolve
+ no children
+ [1]
$ hg prev
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
[1] added b