tests/test-bookmarks-strip
author Sol Jerome <sol.jerome@gmail.com>
Tue, 17 Aug 2010 17:38:19 -0500
branchstable
changeset 12051 ff5cec76b1c5
parent 11208 2313dc4d9817
child 12392 741290486877
permissions -rwxr-xr-x
util: avoid using hashlib on Python < 2.5 (issue2278) The following patch allows the use of python2.4 with a standalone hashlib rather than assuming that python2.5 is in use when hashlib is imported successfully.

#!/bin/sh

. $TESTDIR/helpers.sh
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
hg strip 1 | hidebackup

echo % list bookmarks
hg book