dev/chroot-test/action/test2
author Paul Crowley <paul@lshift.net>
Fri, 24 Aug 2012 13:51:36 +0100
changeset 367 e2278af2c962
parent 275 2e781d52f76e
permissions -rwxr-xr-x
Added tag release_1.3, debian_1.3-1 for changeset 660f5631013e

#!/bin/sh

set -e

cd

cat > .ssh/config <<__END__
Host chroothg
Hostname localhost
User hg
Port 2222
__END__

echo "Pulling real project"
hg clone ssh://chroothg/real/project
cd project
[ -e nested/content ]
echo "and I'm adding something" >> content
hg commit -u test2 -m "Added something to the file"
echo "This push should succeed"
hg push
echo "And it did"
echo "This should fail" >> denied/cantwrite
hg commit -u test2 -m "WONTPUSH"
# Fail only if this succeeds
echo "About to do bad push"
hg push && false
echo "really checking now"
hg outgoing --template '{desc}' | grep -q WONTPUSH
echo "done"