##// END OF EJS Templates
bookmarks: fix _bookmarks/lookup() reentrancy issue (issue2016)...
bookmarks: fix _bookmarks/lookup() reentrancy issue (issue2016) _bookmarks is loaded lazily and calls super.lookup(). Unfortunately, branch and tags caches initializations also recurse in lookup() and end up trying to access _bookmarks again. Massive confusion ensues. I considered fixing all branches and tags cache loading to avoid recursing in lookup() but it would add complexity to otherwise working code provided lookups are performed on nodes or revnums.

File last commit:

r12392:74129048 stable
r12392:74129048 stable
Show More
test-bookmarks-strip
60 lines | 838 B | text/plain | TextLexer
/ tests / test-bookmarks-strip
David Soria Parra
bookmarks: Use dirstate to determine the current node in addchangegroup...
r7316 #!/bin/sh
Yuya Nishihara
tests: fix bashism to load helpers.sh...
r11208 . $TESTDIR/helpers.sh
David Soria Parra
bookmarks: Use dirstate to determine the current node in addchangegroup...
r7316 echo "[extensions]" >> $HGRCPATH
echo "bookmarks=" >> $HGRCPATH
echo "mq=" >> $HGRCPATH
hg init
echo qqq>qqq.txt
echo % add file
hg add
echo % commit first revision
hg ci -m 1 -u user -d "1 0"
echo % set bookmark
hg book test
echo www>>qqq.txt
echo % commit second revision
hg ci -m 2 -u usr -d "1 0"
echo % set bookmark
hg book test2
echo % update to -2
hg update -r -2
echo eee>>qqq.txt
echo % commit new head
hg ci -m 3 -u user -d "1 0"
echo % bookmarks updated?
hg book
echo % strip to revision 1
Matt Mackall
strip: improve full backup message
r11200 hg strip 1 | hidebackup
David Soria Parra
bookmarks: Use dirstate to determine the current node in addchangegroup...
r7316
echo % list bookmarks
hg book
Patrick Mezard
bookmarks: fix _bookmarks/lookup() reentrancy issue (issue2016)...
r12392 echo '% test immediate rollback and reentrancy issue'
echo "mq=!" >> $HGRCPATH
hg init repo
cd repo
echo a > a
hg ci -Am adda
echo b > b
hg ci -Am addb
hg bookmarks markb
hg rollback
hg bookmarks
hg bookmarks markb
hg bookmarks
cd ..