tests/test-ssh
changeset 4291 35b2e02367a5
parent 3853 c0b449154a90
child 4298 58517f6eb1ad
equal deleted inserted replaced
4290:347766c2ff86 4291:35b2e02367a5
     1 #!/bin/sh
     1 #!/bin/sh
       
     2 
       
     3 cp "$TESTDIR"/printenv.py .
     2 
     4 
     3 # This test tries to exercise the ssh functionality with a dummy script
     5 # This test tries to exercise the ssh functionality with a dummy script
     4 
     6 
     5 cat <<'EOF' > dummyssh
     7 cat <<'EOF' > dummyssh
     6 #!/bin/sh
     8 #!/bin/sh
    31 echo this > fooO
    33 echo this > fooO
    32 hg ci -A -m "init" -d "1000000 0" foo fooO
    34 hg ci -A -m "init" -d "1000000 0" foo fooO
    33 echo '[server]' > .hg/hgrc
    35 echo '[server]' > .hg/hgrc
    34 echo 'uncompressed = True' >> .hg/hgrc
    36 echo 'uncompressed = True' >> .hg/hgrc
    35 echo '[hooks]' >> .hg/hgrc
    37 echo '[hooks]' >> .hg/hgrc
    36 echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc
    38 echo 'changegroup = python ../printenv.py changegroup-in-remote 0 ../dummylog' >> .hg/hgrc
    37 
    39 
    38 cd ..
    40 cd ..
    39 
    41 
    40 echo "# repo not found error"
    42 echo "# repo not found error"
    41 hg clone -e ./dummyssh ssh://user@dummy/nonexistent local
    43 hg clone -e ./dummyssh ssh://user@dummy/nonexistent local
    53 echo "# verify"
    55 echo "# verify"
    54 cd local
    56 cd local
    55 hg verify
    57 hg verify
    56 
    58 
    57 echo '[hooks]' >> .hg/hgrc
    59 echo '[hooks]' >> .hg/hgrc
    58 echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc
    60 echo 'changegroup = python ../printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc
    59 
    61 
    60 echo "# empty default pull"
    62 echo "# empty default pull"
    61 hg paths
    63 hg paths
    62 hg pull -e ../dummyssh
    64 hg pull -e ../dummyssh
    63 
    65