tests/test-dumprevlog
author John Mulligan <phlogistonjohn@asynchrono.us>
Wed, 14 Jan 2009 21:47:38 -0500
changeset 7655 cce37dab7ad6
parent 7229 7946503ec76e
child 8167 6c82beaaa11a
permissions -rwxr-xr-x
branch closing: mark closed branches with a 'close' extra Adds a --close-branch option to commit. When --close-branch is present the commit will mark the changeset with close=1 in the changeset extras field. If a regular changeset is added on top of a closed head the branch is no longer considered closed, and thus re-opened.

#!/bin/sh

CONTRIBDIR=$TESTDIR/../contrib

echo % prepare repo-a
mkdir repo-a
cd repo-a
hg init

echo this is file a > a
hg add a
hg commit -m first -d '0 0'

echo adding to file a >> a
hg commit -m second -d '0 0'

echo adding more to file a >> a
hg commit -m third -d '0 0'

hg verify

echo
echo % dumping revlog of file a to stdout
python $CONTRIBDIR/dumprevlog .hg/store/data/a.i
echo % dumprevlog done

echo
echo % dump all revlogs to file repo.dump
find .hg/store -name "*.i" | sort | xargs python $CONTRIBDIR/dumprevlog > ../repo.dump

cd ..

mkdir repo-b
cd repo-b
hg init

echo
echo % undumping into repo-b
python $CONTRIBDIR/undumprevlog < ../repo.dump
echo % undumping done

cd ..

echo
echo % clone --pull repo-b repo-c  to rebuild fncache
hg clone --pull -U repo-b repo-c

cd repo-c

echo
echo % verify repo-c
hg verify

cd ..

echo
echo % comparing repos
hg -R repo-c incoming repo-a
hg -R repo-a incoming repo-c

exit 0