# HG changeset patch # User Pierre-Yves David # Date 1677085826 -3600 # Node ID bf27727e6c7805bd2b4d83147ce38552c02c6f63 # Parent b90899794ced3bf60a7ab91e4fe7f0e5f628942d transaction: tests we don't overwrite bookmark activation on abort We actually do not! Great. diff -r b90899794ced -r bf27727e6c78 tests/test-transaction-wc-rollback-race.t --- 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' + = =