# HG changeset patch # User Augie Fackler # Date 2011-04-29 17:46:56 # Node ID 33e04d3d17f6a7e1f31dcdbb111734b347b39d40 # Parent d98af1420930ebe31a90a51fa2949852f1ffe004 test-contrib: add a test for shrink-revlog We only verify the extension runs and that verify passes at the end as constructing a test repository that would result in a shrink would be nontrivial. diff --git a/tests/test-contrib.t b/tests/test-contrib.t --- a/tests/test-contrib.t +++ b/tests/test-contrib.t @@ -104,6 +104,29 @@ Compare repos: [1] +Test shrink-revlog: + $ cd repo-a + $ hg --config extensions.shrink=$CONTRIBDIR/shrink-revlog.py shrink + shrinking $TESTTMP/repo-a/.hg/store/00manifest.i + reading revs + sorting revs + writing revs + old file size: 324 bytes ( 0.0 MiB) + new file size: 324 bytes ( 0.0 MiB) + shrinkage: 0.0% (1.0x) + note: old revlog saved in: + $TESTTMP/repo-a/.hg/store/00manifest.i.old + $TESTTMP/repo-a/.hg/store/00manifest.d.old + (You can delete those files when you are satisfied that your + repository is still sane. Running 'hg verify' is strongly recommended.) + $ hg verify + checking changesets + checking manifests + crosschecking files in changesets and manifests + checking files + 1 files, 3 changesets, 3 total revisions + $ cd .. + Test simplemerge command: $ cp "$CONTRIBDIR/simplemerge" .