tests/test-ssh
changeset 5978 7939c71f3132
parent 4298 58517f6eb1ad
child 6266 9f76df0edb7d
equal deleted inserted replaced
5977:e82dd2dd6276 5978:7939c71f3132
    23     log.write(" %d:%s" % (i+1, arg))
    23     log.write(" %d:%s" % (i+1, arg))
    24 log.write("\n")
    24 log.write("\n")
    25 log.close()
    25 log.close()
    26 r = os.system(sys.argv[2])
    26 r = os.system(sys.argv[2])
    27 sys.exit(bool(r))
    27 sys.exit(bool(r))
       
    28 EOF
       
    29 
       
    30 cat <<EOF > badhook
       
    31 import sys
       
    32 sys.stdout.write("KABOOM")
    28 EOF
    33 EOF
    29 
    34 
    30 echo "# creating 'remote'"
    35 echo "# creating 'remote'"
    31 hg init remote
    36 hg init remote
    32 cd remote
    37 cd remote
    89 hg verify
    94 hg verify
    90 hg cat -r tip foo
    95 hg cat -r tip foo
    91 
    96 
    92 echo z > z
    97 echo z > z
    93 hg ci -A -m z -d '1000001 0' z
    98 hg ci -A -m z -d '1000001 0' z
       
    99 # a bad, evil hook that prints to stdout
       
   100 echo 'changegroup.stdout = python ../badhook' >> .hg/hgrc
    94 
   101 
    95 cd ../local
   102 cd ../local
    96 echo r > r
   103 echo r > r
    97 hg ci -A -m z -d '1000002 0' r
   104 hg ci -A -m z -d '1000002 0' r
    98 
   105 
    99 echo "# push should succeed"
   106 echo "# push should succeed even though it has an unexpected response"
   100 hg push
   107 hg push
       
   108 hg -R ../remote heads
   101 
   109 
   102 cd ..
   110 cd ..
   103 cat dummylog
   111 cat dummylog