tests/test-rollback.t
changeset 50067 059910ac7b76
parent 50066 ebb8648483db
child 50068 b35fb0e5b8d6
equal deleted inserted replaced
50066:ebb8648483db 50067:059910ac7b76
    63   M a
    63   M a
    64   $ hg bookmark foo
    64   $ hg bookmark foo
    65   $ hg commit -m'modify a again'
    65   $ hg commit -m'modify a again'
    66   $ echo b > b
    66   $ echo b > b
    67   $ hg bookmark bar -r default #making bar active, before the transaction
    67   $ hg bookmark bar -r default #making bar active, before the transaction
       
    68   $ hg log -G --template '{rev}  [{branch}] ({bookmarks}) {desc|firstline}\n'
       
    69   @  1  [test] (foo) modify a again
       
    70   |
       
    71   o  0  [default] (bar) add a again
       
    72   
    68   $ hg commit -Am'add b'
    73   $ hg commit -Am'add b'
    69   adding b
    74   adding b
    70   $ hg log --template '{rev}  {branch}  {desc|firstline}\n'
    75   $ hg log -G --template '{rev}  [{branch}] ({bookmarks}) {desc|firstline}\n'
    71   2  test  add b
    76   @  2  [test] (foo) add b
    72   1  test  modify a again
    77   |
    73   0  default  add a again
    78   o  1  [test] () modify a again
       
    79   |
       
    80   o  0  [default] (bar) add a again
       
    81   
    74   $ hg update bar
    82   $ hg update bar
    75   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
    83   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
    76   (activating bookmark bar)
    84   (activating bookmark bar)
    77   $ cat .hg/undo.branch ; echo
    85   $ cat .hg/undo.branch ; echo
    78   test
    86   test
       
    87   $ hg log -G --template '{rev}  [{branch}] ({bookmarks}) {desc|firstline}\n'
       
    88   o  2  [test] (foo) add b
       
    89   |
       
    90   o  1  [test] () modify a again
       
    91   |
       
    92   @  0  [default] (bar) add a again
       
    93   
    79   $ hg rollback
    94   $ hg rollback
    80   abort: rollback of last commit while not checked out may lose data
    95   abort: rollback of last commit while not checked out may lose data
    81   (use -f to force)
    96   (use -f to force)
    82   [255]
    97   [255]
    83   $ hg rollback -f
    98   $ hg rollback -f
    84   repository tip rolled back to revision 1 (undo commit)
    99   repository tip rolled back to revision 1 (undo commit)
    85   $ hg id -n
   100   $ hg id -n
    86   0
   101   0
       
   102   $ hg log -G --template '{rev}  [{branch}] ({bookmarks}) {desc|firstline}\n'
       
   103   o  1  [test] (foo) modify a again
       
   104   |
       
   105   @  0  [default] (bar) add a again
       
   106   
    87   $ hg branch
   107   $ hg branch
    88   default
   108   default
    89   $ cat .hg/bookmarks.current ; echo
   109   $ cat .hg/bookmarks.current ; echo
    90   bar
   110   bar
    91   $ hg bookmark --delete foo bar
   111   $ hg bookmark --delete foo bar