changeset 1448:3c113c097339

next: print some message when on a head with some aspiring children Being on a head does not necessary means that this is the end of the road. It is likely that some changesets could be evolve as children. We detect this case and provide a hint.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 24 Jun 2015 19:42:01 -0700
parents 09206bdc2db4
children 9be1cadf7a07
files hgext/evolve.py tests/test-prev-next.t
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Wed Jun 24 20:23:41 2015 -0700
+++ b/hgext/evolve.py	Wed Jun 24 19:42:01 2015 -0700
@@ -2043,6 +2043,11 @@
         result = 1
     else:
         ui.warn(_('no children\n'))
+        aspchildren = _aspiringchildren(repo, [repo['.'].rev()])
+        if aspchildren:
+            msg = _('(%i unstable changesets to be evolved here, '
+                    'do you want to evolve?)\n')
+            ui.warn(msg % len(aspchildren))
         result = 1
     return result
 
--- a/tests/test-prev-next.t	Wed Jun 24 20:23:41 2015 -0700
+++ b/tests/test-prev-next.t	Wed Jun 24 19:42:01 2015 -0700
@@ -147,6 +147,7 @@
   1 new unstable changesets
   $ hg next
   no children
+  (1 unstable changesets to be evolved here, do you want to evolve?)
   [1]
   $ hg evolve
   move:[2] added c
@@ -178,6 +179,7 @@
   2 new unstable changesets
   $ hg next
   no children
+  (2 unstable changesets to be evolved here, do you want to evolve?)
   [1]
   $ hg evolve
   abort: multiple evolve candidates