[PATCH 4 of 6] add test-verify

Adrian Buehlmann adrian at cadifra.com
Thu Jul 31 04:47:05 CDT 2008


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1217491888 -7200
# Node ID 3299dc704f6d8dbaabeab2ac345705bfaba86f9f
# Parent  4f2b2f2cdf0282a69bde64eae0f35883ddf83aa9
add test-verify

diff --git a/tests/test-verify b/tests/test-verify
new file mode 100755
--- /dev/null
+++ b/tests/test-verify
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+echo % prepare repo
+hg init
+echo "some text" > FOO.txt
+echo "another text" > bar.txt
+echo "more text" > QUICK.txt
+hg add
+hg ci -d '0 0' -mtest1
+
+echo
+echo % verify
+hg verify
+
+echo
+echo % introduce some bugs in repo
+cd .hg/store/data
+mv _f_o_o.txt.i X_f_o_o.txt.i
+mv bar.txt.i xbar.txt.i
+rm _q_u_i_c_k.txt.i
+
+echo
+echo % verify
+hg verify
+
+return 0
diff --git a/tests/test-verify.out b/tests/test-verify.out
new file mode 100644
--- /dev/null
+++ b/tests/test-verify.out
@@ -0,0 +1,34 @@
+% prepare repo
+adding FOO.txt
+adding QUICK.txt
+adding bar.txt
+
+% verify
+checking changesets
+checking manifests
+crosschecking files in changesets and manifests
+checking files
+3 files, 1 changesets, 3 total revisions
+
+% introduce some bugs in repo
+
+% verify
+checking changesets
+checking manifests
+crosschecking files in changesets and manifests
+checking files
+ ?: cannot decode filename 'data/X_f_o_o.txt.i'
+ data/FOO.txt.i at 0: missing revlog!
+ 0: empty or missing FOO.txt
+ FOO.txt at 0: f62022d3d590 in manifests not found
+ data/QUICK.txt.i at 0: missing revlog!
+ 0: empty or missing QUICK.txt
+ QUICK.txt at 0: 88b857db8eba in manifests not found
+ data/bar.txt.i at 0: missing revlog!
+ 0: empty or missing bar.txt
+ bar.txt at 0: 256559129457 in manifests not found
+warning: orphan revlog 'data/xbar.txt.i'
+3 files, 1 changesets, 0 total revisions
+1 warnings encountered!
+10 integrity errors encountered!
+(first damaged changeset appears to be 0)


More information about the Mercurial-devel mailing list