Add branchtags function with cache
- cache stores tipmost node and rev and node,label pairs
- if cache is out of date, scan new changesets
- write new cache out after scan
#!/bin/sh
echo "[extensions]" >> $HGRCPATH
echo "mq=" >> $HGRCPATH
hg init a
cd a
echo 'base' > base
hg ci -Ambase -d '1 0'
hg qnew -mmqbase mqbase
hg qsave
hg qrestore 2