#!/bin/sh # This test tries to exercise the ssh functionality with a dummy script cat < dummyssh import sys import os os.chdir(os.path.dirname(sys.argv[0])) if sys.argv[1] != "user@dummy": sys.exit(-1) if not os.path.exists("dummyssh"): sys.exit(-1) os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" log = open("dummylog", "ab") log.write("Got arguments") for i, arg in enumerate(sys.argv[1:]): log.write(" %d:%s" % (i+1, arg)) log.write("\n") log.close() r = os.system(sys.argv[2]) sys.exit(bool(r)) EOF hg init remote cd remote echo "# creating 'remote'" cat >>afile <>afile <>afile <>afile <>afile <>afile <fred <>afile <&1 if cd test-"$i"; then hg verify cd .. fi done cd test-8 hg pull ../test-7 hg verify cd .. cd test-1 hg pull -e "python ../dummyssh" -r 4 ssh://user@dummy/remote 2>&1 hg verify hg pull -e "python ../dummyssh" ssh://user@dummy/remote 2>&1 cd .. cd test-2 hg pull -e "python ../dummyssh" -r 5 ssh://user@dummy/remote 2>&1 hg verify hg pull -e "python ../dummyssh" ssh://user@dummy/remote 2>&1 hg verify cd ..