Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-validation Thu Feb 11 16:37:43 2010 -0600 @@ -0,0 +1,24 @@ +#!/bin/sh + +STRIP=`pwd` + +hg init test +cd test +cat > .hg/hgrc <<EOF +[server] +validate=1 +EOF +echo alpha > alpha +echo beta > beta +hg addr +hg ci -m 1 + +cd .. +hg clone test test-clone + +cd test-clone +cp .hg/store/data/beta.i tmp +echo blah >> beta +hg ci -m '2 (corrupt)' +mv tmp .hg/store/data/beta.i +hg push 2>&1 | sed "s%$STRIP%test-root%"