dev/chroot-test/action/test2
branchdebian
changeset 277 265b258904d2
parent 275 2e781d52f76e
equal deleted inserted replaced
261:b6e65bddda7c 277:265b258904d2
       
     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 [ -e nested/content ]
       
    18 echo "and I'm adding something" >> content
       
    19 hg commit -u test2 -m "Added something to the file"
       
    20 echo "This push should succeed"
       
    21 hg push
       
    22 echo "And it did"
       
    23 echo "This should fail" >> denied/cantwrite
       
    24 hg commit -u test2 -m "WONTPUSH"
       
    25 # Fail only if this succeeds
       
    26 echo "About to do bad push"
       
    27 hg push && false
       
    28 echo "really checking now"
       
    29 hg outgoing --template '{desc}' | grep -q WONTPUSH
       
    30 echo "done"