changeset 3859:6e3d844b56f2

rewind: add a message about the rewinded changesets This helps to understand what happened.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 17 Jun 2018 00:57:09 +0200
parents bb4f5ad63877
children fa184c5edfe8
files hgext3rd/evolve/rewind.py tests/test-rewind.t
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/rewind.py	Sat Jun 16 23:11:52 2018 +0200
+++ b/hgext3rd/evolve/rewind.py	Sun Jun 17 00:57:09 2018 +0200
@@ -41,6 +41,7 @@
         with repo.transaction('rewind'):
             for rev in rewinded:
                 _revive_revision(unfi, rev)
+    repo.ui.status(_('rewinded to %d changesets\n') % len(rewinded))
 
 def _revive_revision(unfi, rev):
     """rewind a single revision rev.
--- a/tests/test-rewind.t	Sat Jun 16 23:11:52 2018 +0200
+++ b/tests/test-rewind.t	Sun Jun 17 00:57:09 2018 +0200
@@ -84,6 +84,7 @@
 `````````````
 
   $ hg rewind --hidden --to 'desc("c_B0")'
+  rewinded to 1 changesets
   $ hg debugobsolete
   7e594302a05d3769b27be88fc3cdfd39d7498498 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   7e594302a05d3769b27be88fc3cdfd39d7498498 073989a581cf430a844192364fa37606357cbbc2 4 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}
@@ -156,6 +157,7 @@
   $ hg prune 'desc("c_B0")'
   1 changesets pruned
   $ hg rewind --hidden --to 'min(desc("c_B0"))'
+  rewinded to 1 changesets
   $ hg debugobsolete
   7e594302a05d3769b27be88fc3cdfd39d7498498 0 {579f120ba91885449adc92eedf48ef3569742cee} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'prune', 'user': 'test'}
   7e594302a05d3769b27be88fc3cdfd39d7498498 073989a581cf430a844192364fa37606357cbbc2 4 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '2', 'operation': 'rewind', 'user': 'test'}