hgext/evolve.py
changeset 196 dea67dae27a4
parent 178 3f18a6580d14
child 211 69a37d56c7fb
--- a/hgext/evolve.py	Thu Mar 29 17:18:43 2012 +0200
+++ b/hgext/evolve.py	Wed Mar 28 21:13:46 2012 +0200
@@ -374,6 +374,13 @@
             if not old.phase():
                 raise util.Abort(_("can not rewrite immutable changeset %s") % old)
 
+            # store the amount of unstable prior update
+            if old.children():
+                priorunstables = len(repo.revs('unstable()'))
+            else:
+                #no children mean no change for unstable changeset
+                priorunstables = None
+
             # commit current changes as update
             # code copied from commands.commit to avoid noisy messages
             ciopts = dict(opts)
@@ -401,6 +408,8 @@
                     raise error.Abort(_('no updates found'))
             updates = [repo[n] for n in updatenodes]
 
+
+
             # perform amend
             if opts.get('edit'):
                 opts['force_editor'] = True
@@ -410,6 +419,11 @@
             # reroute the working copy parent to the new changeset
             phases.retractboundary(repo, old.phase(), [newid])
             repo.dirstate.setparents(newid, node.nullid)
+
+            if priorunstables is not None:
+                newunstables = len(repo.revs('unstable()')) - priorunstables
+                if newunstables > 0:
+                    ui.warn(_('%i new unstables changesets\n') % newunstables)
         finally:
             wlock.release()
     finally: