[PATCH 3 of 3] add test-verify

Adrian Buehlmann adrian at cadifra.com
Sun Jul 27 13:08:03 CDT 2008


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1217181626 -7200
# Node ID 9365f87d936b17179651a84851663699fe186db4
# Parent  977c8bb9760998964da2344c7fa1d573422f16dc
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,27 @@
+#!/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
+echo xxx > _g_r_e_e_n.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,35 @@
+% 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 file 'data/_f_o_o.txt.i' for 'FOO.txt'
+ FOO.txt at 0: f62022d3d590 in manifests not found
+ 0: empty or missing QUICK.txt
+ store: missing file 'data/_q_u_i_c_k.txt.i' for 'QUICK.txt'
+ QUICK.txt at 0: 88b857db8eba in manifests not found
+ 0: empty or missing bar.txt
+ store: missing file 'data/bar.txt.i' for 'bar.txt'
+ bar.txt at 0: 256559129457 in manifests not found
+warning: orphaned store file 'data/_g_r_e_e_n.txt.i' (decodes to 'data/GREEN.txt.i')
+warning: orphaned store file 'data/xbar.txt.i'
+3 files, 1 changesets, 0 total revisions
+2 warnings encountered!
+10 integrity errors encountered!
+(first damaged changeset appears to be 0)


More information about the Mercurial-devel mailing list