Mercurial > hg
comparison tests/test-bookmarks.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 | 6084926366b9 |
children | 95dc4b009f60 |
comparison
equal
deleted
inserted
replaced
25743:ce45bfe8f953 | 25744:e78a80f8f51e |
---|---|
401 db815d6d32e6 tip Y/Z/x y | 401 db815d6d32e6 tip Y/Z/x y |
402 | 402 |
403 test rollback | 403 test rollback |
404 | 404 |
405 $ echo foo > f1 | 405 $ echo foo > f1 |
406 $ hg bookmark tmp-rollback | |
406 $ hg ci -Amr | 407 $ hg ci -Amr |
407 adding f1 | 408 adding f1 |
408 $ hg bookmark -f Y -r 1 | 409 $ hg bookmarks |
409 $ hg bookmark -f Z -r 1 | 410 X2 1:925d80f479bb |
411 Y 2:db815d6d32e6 | |
412 Z 2:db815d6d32e6 | |
413 * tmp-rollback 3:2bf5cfec5864 | |
414 x y 2:db815d6d32e6 | |
410 $ hg rollback | 415 $ hg rollback |
411 repository tip rolled back to revision 2 (undo commit) | 416 repository tip rolled back to revision 2 (undo commit) |
412 working directory now based on revision 2 | 417 working directory now based on revision 2 |
413 $ hg bookmarks | 418 $ hg bookmarks |
414 X2 1:925d80f479bb | 419 X2 1:925d80f479bb |
415 Y 2:db815d6d32e6 | 420 Y 2:db815d6d32e6 |
416 Z 2:db815d6d32e6 | 421 Z 2:db815d6d32e6 |
417 x y 2:db815d6d32e6 | 422 * tmp-rollback 2:db815d6d32e6 |
423 x y 2:db815d6d32e6 | |
424 $ hg bookmark -f Z -r 1 | |
425 $ hg rollback | |
426 repository tip rolled back to revision 2 (undo bookmark) | |
427 $ hg bookmarks | |
428 X2 1:925d80f479bb | |
429 Y 2:db815d6d32e6 | |
430 Z 2:db815d6d32e6 | |
431 * tmp-rollback 2:db815d6d32e6 | |
432 x y 2:db815d6d32e6 | |
433 $ hg bookmark -d tmp-rollback | |
418 | 434 |
419 activate bookmark on working dir parent without --force | 435 activate bookmark on working dir parent without --force |
420 | 436 |
421 $ hg bookmark --inactive Z | 437 $ hg bookmark --inactive Z |
422 $ hg bookmark Z | 438 $ hg bookmark Z |