test-dumprevlog
61 lines
| 935 B
| text/plain
|
TextLexer
/ tests / test-dumprevlog
Adrian Buehlmann
|
r6465 | #!/bin/sh | ||
CONTRIBDIR=$TESTDIR/../contrib | ||||
Adrian Buehlmann
|
r7229 | echo % prepare repo-a | ||
Adrian Buehlmann
|
r6465 | 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 | ||||
Adrian Buehlmann
|
r7229 | echo | ||
echo % dumping revlog of file a to stdout | ||||
Adrian Buehlmann
|
r6465 | python $CONTRIBDIR/dumprevlog .hg/store/data/a.i | ||
Adrian Buehlmann
|
r7229 | echo % dumprevlog done | ||
Adrian Buehlmann
|
r6465 | |||
Adrian Buehlmann
|
r7229 | echo | ||
echo % dump all revlogs to file repo.dump | ||||
Adrian Buehlmann
|
r6516 | find .hg/store -name "*.i" | sort | xargs python $CONTRIBDIR/dumprevlog > ../repo.dump | ||
Adrian Buehlmann
|
r6465 | |||
cd .. | ||||
mkdir repo-b | ||||
cd repo-b | ||||
hg init | ||||
Adrian Buehlmann
|
r7229 | echo | ||
echo % undumping into repo-b | ||||
Adrian Buehlmann
|
r6465 | python $CONTRIBDIR/undumprevlog < ../repo.dump | ||
Adrian Buehlmann
|
r7229 | echo % undumping done | ||
cd .. | ||||
Adrian Buehlmann
|
r6465 | |||
Adrian Buehlmann
|
r7229 | 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 | ||||
Adrian Buehlmann
|
r6465 | hg verify | ||
cd .. | ||||
Adrian Buehlmann
|
r7229 | echo | ||
echo % comparing repos | ||||
hg -R repo-c incoming repo-a | ||||
hg -R repo-a incoming repo-c | ||||
Adrian Buehlmann
|
r6465 | |||
exit 0 | ||||