view tests/test-bookmarks-current @ 7654:816b708f23af

store all heads of a branch in the branch cache All heads of branches will be stored in a new cache file 'branchheads.cache' within the .hg directory. The old 'branch.cache' file from older versions will be ignored. The new cache contents are formatted line-by-line as '{node} {branchtag}\n'. This is the same as the previous format. Now, every head is recorded in an oldest -> tipmost order. The localrepo.branchheads function is reworked to use the data from the cache.
author John Mulligan <phlogistonjohn@asynchrono.us>
date Wed, 14 Jan 2009 21:47:38 -0500
parents cab1cf26ca58
children f420eafe59cd
line wrap: on
line source

#!/bin/sh

echo "[extensions]" >> $HGRCPATH
echo "bookmarks=" >> $HGRCPATH

echo "[bookmarks]" >> $HGRCPATH
echo "track.current = True" >> $HGRCPATH

hg init

echo % no bookmarks
hg bookmarks

echo % set bookmark X
hg bookmark X

echo % update to bookmark X
hg update X

echo % list bookmarks
hg bookmarks

echo % rename
hg bookmark -m X Z

echo % list bookmarks
hg bookmarks

echo % new bookmark Y
hg bookmark Y

echo % list bookmarks
hg bookmark

echo % commit
echo 'b' > b
hg add b
hg commit -m'test'

echo % list bookmarks
hg bookmark