rebase: disable rollback after rebasing
authorStefano Tortarolo <stefano.tortarolo@gmail.com>
Sat, 18 Oct 2008 17:00:28 +0200
changeset 7130 204c7850c158
parent 7129 7e6a3bae0e8e
child 7131 23bd7383891c
rebase: disable rollback after rebasing
hgext/rebase.py
tests/test-rebase-parameters
tests/test-rebase-parameters.out
--- a/hgext/rebase.py	Sat Oct 18 16:51:26 2008 +0200
+++ b/hgext/rebase.py	Sat Oct 18 17:00:28 2008 +0200
@@ -105,6 +105,8 @@
 
         clearstatus(repo)
         ui.status(_("rebase completed\n"))
+        if os.path.exists(repo.sjoin('undo')):
+            util.unlink(repo.sjoin('undo'))
         if skipped:
             ui.note(_("%d revisions have been skipped\n") % len(skipped))
     finally:
--- a/tests/test-rebase-parameters	Sat Oct 18 16:51:26 2008 +0200
+++ b/tests/test-rebase-parameters	Sat Oct 18 17:00:28 2008 +0200
@@ -64,6 +64,9 @@
 hg update -C 5
 hg rebase 2>&1 | sed 's/\(saving bundle to \).*/\1/'
 
+echo "% Try to rollback after a rebase (fail)"
+hg rollback
+
 createrepo > /dev/null 2>&1
 echo
 echo "% Rebase with base == '.' => same as no arguments (from 3 onto 7)"
--- a/tests/test-rebase-parameters.out	Sat Oct 18 16:51:26 2008 +0200
+++ b/tests/test-rebase-parameters.out	Sat Oct 18 17:00:28 2008 +0200
@@ -126,6 +126,8 @@
 adding file changes
 added 5 changesets with 5 changes to 5 files
 rebase completed
+% Try to rollback after a rebase (fail)
+no rollback information available
 
 % Rebase with base == '.' => same as no arguments (from 3 onto 7)
 3 files updated, 0 files merged, 3 files removed, 0 files unresolved