2010-08-14 05:00:22 +04:00
|
|
|
$ echo "[extensions]" >> $HGRCPATH
|
|
|
|
$ echo "mq=" >> $HGRCPATH
|
|
|
|
|
|
|
|
$ hg init
|
|
|
|
|
|
|
|
$ echo qqq>qqq.txt
|
|
|
|
|
2011-01-27 04:58:48 +03:00
|
|
|
rollback dry run without rollback information
|
|
|
|
|
|
|
|
$ hg rollback
|
|
|
|
no rollback information available
|
|
|
|
[1]
|
|
|
|
|
2010-08-14 05:00:22 +04:00
|
|
|
add file
|
|
|
|
|
|
|
|
$ hg add
|
|
|
|
adding qqq.txt
|
|
|
|
|
|
|
|
commit first revision
|
|
|
|
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg ci -m 1
|
2010-08-14 05:00:22 +04:00
|
|
|
|
|
|
|
set bookmark
|
|
|
|
|
|
|
|
$ hg book test
|
|
|
|
|
|
|
|
$ echo www>>qqq.txt
|
|
|
|
|
|
|
|
commit second revision
|
|
|
|
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg ci -m 2
|
2010-08-14 05:00:22 +04:00
|
|
|
|
|
|
|
set bookmark
|
|
|
|
|
|
|
|
$ hg book test2
|
|
|
|
|
2012-08-18 00:58:18 +04:00
|
|
|
update to -2 (deactivates the active bookmark)
|
2010-08-14 05:00:22 +04:00
|
|
|
|
|
|
|
$ hg update -r -2
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2014-05-14 23:49:55 +04:00
|
|
|
(leaving bookmark test2)
|
2010-08-14 05:00:22 +04:00
|
|
|
|
|
|
|
$ echo eee>>qqq.txt
|
|
|
|
|
|
|
|
commit new head
|
|
|
|
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg ci -m 3
|
2010-08-14 05:00:22 +04:00
|
|
|
created new head
|
|
|
|
|
|
|
|
bookmarks updated?
|
|
|
|
|
|
|
|
$ hg book
|
2010-09-03 01:22:51 +04:00
|
|
|
test 1:25e1ee7a0081
|
|
|
|
test2 1:25e1ee7a0081
|
2010-08-14 05:00:22 +04:00
|
|
|
|
|
|
|
strip to revision 1
|
|
|
|
|
2010-08-16 05:58:03 +04:00
|
|
|
$ hg strip 1
|
2010-10-09 07:36:10 +04:00
|
|
|
saved backup bundle to $TESTTMP/.hg/strip-backup/*-backup.hg (glob)
|
2010-08-14 05:00:22 +04:00
|
|
|
|
|
|
|
list bookmarks
|
|
|
|
|
|
|
|
$ hg book
|
2012-07-27 01:57:50 +04:00
|
|
|
test 0:5c9ad3787638
|
|
|
|
test2 0:5c9ad3787638
|
2010-08-14 05:00:22 +04:00
|
|
|
|
2010-09-24 02:17:04 +04:00
|
|
|
immediate rollback and reentrancy issue
|
|
|
|
|
|
|
|
$ echo "mq=!" >> $HGRCPATH
|
|
|
|
$ hg init repo
|
|
|
|
$ cd repo
|
|
|
|
$ echo a > a
|
|
|
|
$ hg ci -Am adda
|
|
|
|
adding a
|
|
|
|
$ echo b > b
|
|
|
|
$ hg ci -Am addb
|
|
|
|
adding b
|
|
|
|
$ hg bookmarks markb
|
|
|
|
$ hg rollback
|
2011-02-10 11:03:06 +03:00
|
|
|
repository tip rolled back to revision 0 (undo commit)
|
|
|
|
working directory now based on revision 0
|
2010-09-24 02:17:04 +04:00
|
|
|
|
|
|
|
are you there?
|
|
|
|
|
|
|
|
$ hg bookmarks
|
|
|
|
no bookmarks set
|
|
|
|
|
2011-03-13 16:36:47 +03:00
|
|
|
can we commit? (issue2692)
|
|
|
|
|
|
|
|
$ echo c > c
|
|
|
|
$ hg ci -Am rockon
|
|
|
|
adding c
|
|
|
|
|
2010-09-24 02:17:04 +04:00
|
|
|
can you be added again?
|
|
|
|
|
|
|
|
$ hg bookmarks markb
|
|
|
|
$ hg bookmarks
|
2011-03-13 16:36:47 +03:00
|
|
|
* markb 1:fdb34407462c
|
2011-01-27 04:58:48 +03:00
|
|
|
|
|
|
|
rollback dry run with rollback information
|
|
|
|
|
2011-03-13 16:36:47 +03:00
|
|
|
$ hg rollback -n
|
|
|
|
repository tip rolled back to revision 0 (undo commit)
|
|
|
|
$ hg bookmarks
|
|
|
|
* markb 1:fdb34407462c
|
|
|
|
|
|
|
|
rollback dry run with rollback information and no commit undo
|
|
|
|
|
|
|
|
$ rm .hg/store/undo
|
2011-01-27 04:58:48 +03:00
|
|
|
$ hg rollback -n
|
2011-02-10 22:46:27 +03:00
|
|
|
no rollback information available
|
|
|
|
[1]
|
2011-01-27 04:58:48 +03:00
|
|
|
$ hg bookmarks
|
2011-03-13 16:36:47 +03:00
|
|
|
* markb 1:fdb34407462c
|
2011-01-27 04:58:48 +03:00
|
|
|
|
2010-09-24 02:17:04 +04:00
|
|
|
$ cd ..
|
|
|
|
|