[PATCH 3 of 5] add test-verify

Adrian Buehlmann adrian at cadifra.com
Wed Jul 30 13:48:15 CDT 2008


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1217441566 -7200
# Node ID 91e2878421f5dcb13da92366c9864431e35b79d8
# Parent  fa1ac9289da2241e51d5c43de19d5011064b774d
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,32 @@
+% 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
+ store: cannot decode filename 'data/X_f_o_o.txt.i'
+ 0: empty or missing FOO.txt
+ store: missing entry 'FOO.txt'
+ FOO.txt at 0: f62022d3d590 in manifests not found
+ 0: empty or missing QUICK.txt
+ store: missing entry 'QUICK.txt'
+ QUICK.txt at 0: 88b857db8eba in manifests not found
+ 0: empty or missing bar.txt
+ store: missing entry 'bar.txt'
+ bar.txt at 0: 256559129457 in manifests not found
+3 files, 1 changesets, 0 total revisions
+10 integrity errors encountered!
+(first damaged changeset appears to be 0)


More information about the Mercurial-devel mailing list