Mercurial > hg
comparison tests/test-push-validation @ 10418:5fc090ba08a6
localrepo: add optional validation (defaults to off) for incoming changes
This verifies that all manifests are present for incoming changes,
and all files for those manifests are also present. This is a simple
first-pass, and could be better, but seems like a valuable thing to
have, as I've seen pushes in the past that propagated revlog corruption.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 11 Feb 2010 16:37:43 -0600 |
parents | |
children | b26c4a89a143 |
comparison
equal
deleted
inserted
replaced
10416:4cfd0d56be6d | 10418:5fc090ba08a6 |
---|---|
1 #!/bin/sh | |
2 | |
3 STRIP=`pwd` | |
4 | |
5 hg init test | |
6 cd test | |
7 cat > .hg/hgrc <<EOF | |
8 [server] | |
9 validate=1 | |
10 EOF | |
11 echo alpha > alpha | |
12 echo beta > beta | |
13 hg addr | |
14 hg ci -m 1 | |
15 | |
16 cd .. | |
17 hg clone test test-clone | |
18 | |
19 cd test-clone | |
20 cp .hg/store/data/beta.i tmp | |
21 echo blah >> beta | |
22 hg ci -m '2 (corrupt)' | |
23 mv tmp .hg/store/data/beta.i | |
24 hg push 2>&1 | sed "s%$STRIP%test-root%" |