2008-04-03 19:17:39 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
CONTRIBDIR=$TESTDIR/../contrib
|
|
|
|
|
2008-10-19 21:12:07 +04:00
|
|
|
echo % prepare repo-a
|
2008-04-03 19:17:39 +04:00
|
|
|
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
|
|
|
|
|
2008-10-19 21:12:07 +04:00
|
|
|
echo
|
|
|
|
echo % dumping revlog of file a to stdout
|
2008-04-03 19:17:39 +04:00
|
|
|
python $CONTRIBDIR/dumprevlog .hg/store/data/a.i
|
2008-10-19 21:12:07 +04:00
|
|
|
echo % dumprevlog done
|
2008-04-03 19:17:39 +04:00
|
|
|
|
2008-10-19 21:12:07 +04:00
|
|
|
echo
|
|
|
|
echo % dump all revlogs to file repo.dump
|
2008-04-11 11:27:28 +04:00
|
|
|
find .hg/store -name "*.i" | sort | xargs python $CONTRIBDIR/dumprevlog > ../repo.dump
|
2008-04-03 19:17:39 +04:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
mkdir repo-b
|
|
|
|
cd repo-b
|
|
|
|
hg init
|
|
|
|
|
2008-10-19 21:12:07 +04:00
|
|
|
echo
|
|
|
|
echo % undumping into repo-b
|
2008-04-03 19:17:39 +04:00
|
|
|
python $CONTRIBDIR/undumprevlog < ../repo.dump
|
2008-10-19 21:12:07 +04:00
|
|
|
echo % undumping done
|
2008-04-03 19:17:39 +04:00
|
|
|
|
2008-10-19 21:12:07 +04:00
|
|
|
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
|
2008-04-03 19:17:39 +04:00
|
|
|
hg verify
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
2008-10-19 21:12:07 +04:00
|
|
|
echo
|
|
|
|
echo % comparing repos
|
|
|
|
hg -R repo-c incoming repo-a
|
|
|
|
hg -R repo-a incoming repo-c
|
2008-04-03 19:17:39 +04:00
|
|
|
|
|
|
|
exit 0
|