Mercurial > hg
diff tests/test-share-bookmarks.t @ 42325:526750cdd02d
bookmarks: keep bookmarks in .hg/store if new config set
Bookmarks storage consists of two parts: (1) the set of bookmarks and
their positions, and (2) the current bookmark. The former can get
updated by exchange, while the latter cannot. However, they are both
stored in directly .hg/ and protected by repo.wlock(). As a result,
ugly workarounds were needed. This patch introduces a new config
option to store the set of bookmarks and their positions in .hg/store/
but still storing the current bookmark directory in .hg/. The config
option only takes effect at repo creation time. It results in a new
requirement being set.
Differential Revision: https://phab.mercurial-scm.org/D6387
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 15 May 2019 22:09:02 -0700 |
parents | 314056e438a9 |
children | dc457177dbc1 |
line wrap: on
line diff
--- a/tests/test-share-bookmarks.t Thu May 16 08:15:20 2019 +0900 +++ b/tests/test-share-bookmarks.t Wed May 15 22:09:02 2019 -0700 @@ -1,6 +1,13 @@ +#testcases vfs svfs + $ echo "[extensions]" >> $HGRCPATH $ echo "share = " >> $HGRCPATH +#if svfs + $ echo "[format]" >> $HGRCPATH + $ echo "bookmarks-in-store = yes " >> $HGRCPATH +#endif + prepare repo1 $ hg init repo1 @@ -33,17 +40,21 @@ $ cd ../repo2 $ hg book bm2 $ hg bookmarks + bm1 2:c2e0ac586386 (svfs !) * bm2 2:c2e0ac586386 $ cd ../repo3 $ hg bookmarks bm1 2:c2e0ac586386 + bm2 2:c2e0ac586386 (svfs !) $ hg book bm3 $ hg bookmarks bm1 2:c2e0ac586386 + bm2 2:c2e0ac586386 (svfs !) * bm3 2:c2e0ac586386 $ cd ../repo1 $ hg bookmarks * bm1 2:c2e0ac586386 + bm2 2:c2e0ac586386 (svfs !) bm3 2:c2e0ac586386 check whether HG_PENDING makes pending changes only in relatd @@ -70,14 +81,18 @@ $ hg --config hooks.pretxnclose="sh $TESTTMP/checkbookmarks.sh" -q book bmX @repo1 bm1 2:c2e0ac586386 + bm2 2:c2e0ac586386 (svfs !) bm3 2:c2e0ac586386 * bmX 2:c2e0ac586386 @repo2 + bm1 2:c2e0ac586386 (svfs !) * bm2 2:c2e0ac586386 + bm3 2:c2e0ac586386 (svfs !) @repo3 bm1 2:c2e0ac586386 + bm2 2:c2e0ac586386 (svfs !) * bm3 2:c2e0ac586386 - bmX 2:c2e0ac586386 + bmX 2:c2e0ac586386 (vfs !) transaction abort! rollback completed abort: pretxnclose hook exited with status 1 @@ -92,11 +107,15 @@ $ hg --config hooks.pretxnclose="sh $TESTTMP/checkbookmarks.sh" -q book bmX @repo1 * bm1 2:c2e0ac586386 + bm2 2:c2e0ac586386 (svfs !) bm3 2:c2e0ac586386 @repo2 + bm1 2:c2e0ac586386 (svfs !) * bm2 2:c2e0ac586386 + bm3 2:c2e0ac586386 (svfs !) @repo3 bm1 2:c2e0ac586386 + bm2 2:c2e0ac586386 (svfs !) bm3 2:c2e0ac586386 * bmX 2:c2e0ac586386 transaction abort! @@ -105,6 +124,11 @@ [255] $ hg book bm3 +clean up bm2 since it's uninteresting (not shared in the vfs case and +same as bm3 in the svfs case) + $ cd ../repo2 + $ hg book -d bm2 + $ cd ../repo1 test that commits work