changeset 14033:33e04d3d17f6

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.
author Augie Fackler <durin42@gmail.com>
date Fri, 29 Apr 2011 12:46:56 -0500
parents d98af1420930
children 1f667030b139
files tests/test-contrib.t
diffstat 1 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-contrib.t	Fri Apr 29 08:46:21 2011 -0500
+++ b/tests/test-contrib.t	Fri Apr 29 12:46:56 2011 -0500
@@ -104,6 +104,29 @@
   [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" .