tests/test-ssh
changeset 2673 109a22f5434a
parent 2622 064aef9162cc
child 3012 fa4229c60dd7
equal deleted inserted replaced
2671:82864a2eb709 2673:109a22f5434a
    15 # check that we're in the right directory
    15 # check that we're in the right directory
    16 if [ ! -x dummyssh ] ; then
    16 if [ ! -x dummyssh ] ; then
    17 	exit -1
    17 	exit -1
    18 fi
    18 fi
    19 
    19 
       
    20 SSH_CLIENT='127.0.0.1 1 2'
       
    21 export SSH_CLIENT
    20 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog
    22 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog
    21 $2
    23 $2
    22 EOF
    24 EOF
    23 chmod +x dummyssh
    25 chmod +x dummyssh
    24 
    26 
    27 cd remote
    29 cd remote
    28 echo this > foo
    30 echo this > foo
    29 hg ci -A -m "init" -d "1000000 0" foo
    31 hg ci -A -m "init" -d "1000000 0" foo
    30 echo '[server]' > .hg/hgrc
    32 echo '[server]' > .hg/hgrc
    31 echo 'uncompressed = True' >> .hg/hgrc
    33 echo 'uncompressed = True' >> .hg/hgrc
       
    34 echo '[hooks]' >> .hg/hgrc
       
    35 echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc
    32 
    36 
    33 cd ..
    37 cd ..
    34 
    38 
    35 echo "# clone remote via stream"
    39 echo "# clone remote via stream"
    36 hg clone -e ./dummyssh --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \
    40 hg clone -e ./dummyssh --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \
    43 hg clone -e ./dummyssh ssh://user@dummy/remote local
    47 hg clone -e ./dummyssh ssh://user@dummy/remote local
    44 
    48 
    45 echo "# verify"
    49 echo "# verify"
    46 cd local
    50 cd local
    47 hg verify
    51 hg verify
       
    52 
       
    53 echo '[hooks]' >> .hg/hgrc
       
    54 echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc
    48 
    55 
    49 echo "# empty default pull"
    56 echo "# empty default pull"
    50 hg paths
    57 hg paths
    51 hg pull -e ../dummyssh
    58 hg pull -e ../dummyssh
    52 
    59