tests/test-ssh
changeset 12156 4c94b6d0fb1c
parent 6266 9f76df0edb7d
child 12409 0eaf7d32a5d8
equal deleted inserted replaced
12155:94ad12aa0530 12156:4c94b6d0fb1c
    35 echo "# creating 'remote'"
    35 echo "# creating 'remote'"
    36 hg init remote
    36 hg init remote
    37 cd remote
    37 cd remote
    38 echo this > foo
    38 echo this > foo
    39 echo this > fooO
    39 echo this > fooO
    40 hg ci -A -m "init" -d "1000000 0" foo fooO
    40 hg ci -A -m "init" foo fooO
    41 echo '[server]' > .hg/hgrc
    41 echo '[server]' > .hg/hgrc
    42 echo 'uncompressed = True' >> .hg/hgrc
    42 echo 'uncompressed = True' >> .hg/hgrc
    43 echo '[hooks]' >> .hg/hgrc
    43 echo '[hooks]' >> .hg/hgrc
    44 echo 'changegroup = python ../printenv.py changegroup-in-remote 0 ../dummylog' >> .hg/hgrc
    44 echo 'changegroup = python ../printenv.py changegroup-in-remote 0 ../dummylog' >> .hg/hgrc
    45 
    45 
    69 hg paths
    69 hg paths
    70 hg pull -e "python ../dummyssh"
    70 hg pull -e "python ../dummyssh"
    71 
    71 
    72 echo "# local change"
    72 echo "# local change"
    73 echo bleah > foo
    73 echo bleah > foo
    74 hg ci -m "add" -d "1000000 0"
    74 hg ci -m "add"
    75 
    75 
    76 echo "# updating rc"
    76 echo "# updating rc"
    77 echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
    77 echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
    78 echo "[ui]" >> .hg/hgrc
    78 echo "[ui]" >> .hg/hgrc
    79 echo "ssh = python ../dummyssh" >> .hg/hgrc
    79 echo "ssh = python ../dummyssh" >> .hg/hgrc
    93 hg tip
    93 hg tip
    94 hg verify
    94 hg verify
    95 hg cat -r tip foo
    95 hg cat -r tip foo
    96 
    96 
    97 echo z > z
    97 echo z > z
    98 hg ci -A -m z -d '1000001 0' z
    98 hg ci -A -m z z
    99 # a bad, evil hook that prints to stdout
    99 # a bad, evil hook that prints to stdout
   100 echo 'changegroup.stdout = python ../badhook' >> .hg/hgrc
   100 echo 'changegroup.stdout = python ../badhook' >> .hg/hgrc
   101 
   101 
   102 cd ../local
   102 cd ../local
   103 echo r > r
   103 echo r > r
   104 hg ci -A -m z -d '1000002 0' r
   104 hg ci -A -m z r
   105 
   105 
   106 echo "# push should succeed even though it has an unexpected response"
   106 echo "# push should succeed even though it has an unexpected response"
   107 hg push
   107 hg push
   108 hg -R ../remote heads
   108 hg -R ../remote heads
   109 
   109