diff tests/test-rollback.t @ 25744:e78a80f8f51e

bookmarks: change bookmark within a transaction For some time, bookmark can and should be moved in the transaction. This changeset migrates the 'hg bookmarks' commands to use a transaction. Tests regarding rollback and transaction hooks are impacted for obvious reasons. Some have to be slightly updated to keep testing the same things. Some can just be dropped because they do not make sense anymore.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sun, 28 Sep 2014 00:49:36 -0700
parents 4dd9f606d0a6
children 4414d500604f
line wrap: on
line diff
--- a/tests/test-rollback.t	Wed Jul 01 01:09:57 2015 -0700
+++ b/tests/test-rollback.t	Sun Sep 28 00:49:36 2014 -0700
@@ -74,16 +74,16 @@
   $ hg bookmark foo
   $ hg commit -m'modify a again'
   $ echo b > b
+  $ hg bookmark bar -r default #making bar active, before the transaction
   $ hg commit -Am'add b'
   adding b
   $ hg log --template '{rev}  {branch}  {desc|firstline}\n'
   2  test  add b
   1  test  modify a again
   0  default  add a again
-  $ hg update default
+  $ hg update bar
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  (leaving bookmark foo)
-  $ hg bookmark bar
+  (activating bookmark bar)
   $ cat .hg/undo.branch ; echo
   test
   $ hg rollback -f
@@ -94,7 +94,7 @@
   default
   $ cat .hg/bookmarks.current ; echo
   bar
-  $ hg bookmark --delete foo
+  $ hg bookmark --delete foo bar
 
 rollback by pretxncommit saves commit message (issue1635)