tests/dummyssh
changeset 35570 3e3f4c03876b
parent 31007 bfdb0741f9f2
child 36121 3a763d7f40e1
equal deleted inserted replaced
35569:964212780daf 35570:3e3f4c03876b
    11     sys.exit(-1)
    11     sys.exit(-1)
    12 
    12 
    13 os.environ["SSH_CLIENT"] = "%s 1 2" % os.environ.get('LOCALIP', '127.0.0.1')
    13 os.environ["SSH_CLIENT"] = "%s 1 2" % os.environ.get('LOCALIP', '127.0.0.1')
    14 
    14 
    15 log = open("dummylog", "ab")
    15 log = open("dummylog", "ab")
    16 log.write("Got arguments")
    16 log.write(b"Got arguments")
    17 for i, arg in enumerate(sys.argv[1:]):
    17 for i, arg in enumerate(sys.argv[1:]):
    18     log.write(" %d:%s" % (i + 1, arg))
    18     log.write(b" %d:%s" % (i + 1, arg))
    19 log.write("\n")
    19 log.write("\n")
    20 log.close()
    20 log.close()
    21 hgcmd = sys.argv[2]
    21 hgcmd = sys.argv[2]
    22 if os.name == 'nt':
    22 if os.name == 'nt':
    23     # hack to make simple unix single quote quoting work on windows
    23     # hack to make simple unix single quote quoting work on windows