changeset 7290:a3871028aacf

add test-fncache
author Adrian Buehlmann <adrian@cadifra.com>
date Wed, 29 Oct 2008 13:37:35 +0100
parents ddab62b2fec4
children 1493d1e05ca3
files tests/test-fncache tests/test-fncache.out
diffstat 2 files changed, 94 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-fncache	Wed Oct 29 13:37:35 2008 +0100
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+echo "% init repo1"
+hg init repo1
+cd repo1
+
+echo
+echo "% add a; ci"
+echo "some text" > a
+hg add
+hg ci -d '0 0' -m first
+
+echo
+echo "% cat .hg/store/fncache"
+cat .hg/store/fncache
+
+echo
+echo "% add a.i/b; ci"
+mkdir a.i
+echo "some other text" > a.i/b
+hg add
+hg ci -d '0 0' -m second
+
+echo
+echo "% cat .hg/store/fncache"
+cat .hg/store/fncache
+
+echo
+echo "% add a.i.hg/c; ci"
+mkdir a.i.hg
+echo "yet another text" > a.i.hg/c
+hg add
+hg ci -d '0 0' -m third
+
+echo
+echo "% cat .hg/store/fncache"
+cat .hg/store/fncache
+
+echo
+echo "% hg verify"
+hg verify
+
+echo
+echo "% rm .hg/store/fncache"
+rm .hg/store/fncache
+
+echo
+echo "% hg verify"
+hg verify
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-fncache.out	Wed Oct 29 13:37:35 2008 +0100
@@ -0,0 +1,43 @@
+% init repo1
+
+% add a; ci
+adding a
+
+% cat .hg/store/fncache
+data/a.i
+
+% add a.i/b; ci
+adding a.i/b
+
+% cat .hg/store/fncache
+data/a.i
+data/a.i.hg/b.i
+
+% add a.i.hg/c; ci
+adding a.i.hg/c
+
+% cat .hg/store/fncache
+data/a.i
+data/a.i.hg/b.i
+data/a.i.hg.hg/c.i
+
+% hg verify
+checking changesets
+checking manifests
+crosschecking files in changesets and manifests
+checking files
+3 files, 3 changesets, 3 total revisions
+
+% rm .hg/store/fncache
+
+% hg verify
+checking changesets
+checking manifests
+crosschecking files in changesets and manifests
+checking files
+ data/a.i@0: missing revlog!
+ data/a.i.hg.hg/c.i@0: missing revlog!
+ data/a.i.hg/b.i@0: missing revlog!
+3 files, 3 changesets, 3 total revisions
+3 integrity errors encountered!
+(first damaged changeset appears to be 0)