Mercurial > hg
diff tests/test-dumprevlog @ 6465:9b340e725c11
add tests for contrib/dumprevlog and undumprevlog
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Thu, 03 Apr 2008 17:17:39 +0200 |
parents | |
children | f65ac37f0a15 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-dumprevlog Thu Apr 03 17:17:39 2008 +0200 @@ -0,0 +1,47 @@ +#!/bin/sh + +CONTRIBDIR=$TESTDIR/../contrib + +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 dumping revlog of file a to stdout: +python $CONTRIBDIR/dumprevlog .hg/store/data/a.i +echo dumprevlog done + +# dump all revlogs to file repo.dump +find .hg/store/ -name "*.i" | xargs python $CONTRIBDIR/dumprevlog > ../repo.dump + +cd .. + +mkdir repo-b +cd repo-b +hg init + +echo undumping: +python $CONTRIBDIR/undumprevlog < ../repo.dump +echo undumping done + +hg verify + +cd .. + +echo comparing repos: +hg -R repo-b incoming repo-a +hg -R repo-a incoming repo-b +echo comparing done + +exit 0