equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 set -e |
|
4 |
|
5 cd |
|
6 |
|
7 cat > .ssh/config <<__END__ |
|
8 Host chroothg |
|
9 Hostname localhost |
|
10 User hg |
|
11 Port 2222 |
|
12 __END__ |
|
13 |
|
14 echo "Pulling real project" |
|
15 hg clone ssh://chroothg/real/project |
|
16 cd project |
|
17 echo "and I'm adding something" >> content |
|
18 hg commit -u test2 -m "Added something to the file" |
|
19 echo "This push should succeed" |
|
20 hg push |
|
21 echo "And it did" |
|
22 echo "This should fail" >> denied/cantwrite |
|
23 hg commit -u test2 -m "WONTPUSH" |
|
24 # Fail only if this succeeds |
|
25 echo "About to do bad push" |
|
26 hg push && false |
|
27 echo "really checking now" |
|
28 hg outgoing --template '{desc}' | grep -q WONTPUSH |
|
29 echo "done" |