Mercurial > hg
changeset 50173:bf27727e6c78 stable
transaction: tests we don't overwrite bookmark activation on abort
We actually do not! Great.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 22 Feb 2023 18:10:26 +0100 |
parents | b90899794ced |
children | 596a6b9b0570 964a913343a2 |
files | tests/test-transaction-wc-rollback-race.t |
diffstat | 1 files changed, 54 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-transaction-wc-rollback-race.t Wed Feb 22 18:09:12 2023 +0100 +++ b/tests/test-transaction-wc-rollback-race.t Wed Feb 22 18:10:26 2023 +0100 @@ -211,3 +211,57 @@ $ hg purge --no-confirm $ hg up --quiet babar + +Activating a bookmark +--------------------- +(without going through the bookmark command) + +Show the activation/desactivation pattern that exist without taking the store +lock. + + $ hg log -r . -T '= {activebookmark} =\n' + = = + $ hg up bar + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + (activating bookmark bar) + $ hg log -r . -T '= {activebookmark} =\n' + = bar = + $ hg up . + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + (leaving bookmark bar) + $ hg log -r . -T '= {activebookmark} =\n' + = = + +Activating the bookmark during a transaction + + $ hg up . --quiet + $ hg log -r . -T '= {activebookmark} =\n' + = = + $ hg phase --public --rev 0 2> ../log.err & + $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting + $ hg up bar + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + (activating bookmark bar) + $ hg log -r . -T '= {activebookmark} =\n' + = bar = + $ touch $TESTTMP/transaction-continue + $ wait + $ hg log -r . -T '= {activebookmark} =\n' + = bar = + +Deactivating the bookmark + + $ hg up bar --quiet + $ hg log -r . -T '= {activebookmark} =\n' + = bar = + $ hg phase --public --rev 0 2> ../log.err & + $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting + $ hg up . + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + (leaving bookmark bar) + $ hg log -r . -T '= {activebookmark} =\n' + = = + $ touch $TESTTMP/transaction-continue + $ wait + $ hg log -r . -T '= {activebookmark} =\n' + = =