[PATCH 06 of 10 ipv6 V2] dummyssh: use LOCALIP

Jun Wu quark at fb.com
Fri Feb 17 13:51:20 EST 2017


# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1487229843 28800
#      Wed Feb 15 23:24:03 2017 -0800
# Node ID bb7f41b2c8043a3115f242fb9b9f71ee461c93a9
# Parent  9222c925de31506ee513f58a913ddec0c3a8a9c5
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r bb7f41b2c804
dummyssh: use LOCALIP

This patch replaces hard-coded 127.0.0.1 with $LOCALIP in dummyssh.

diff --git a/tests/dummyssh b/tests/dummyssh
--- a/tests/dummyssh
+++ b/tests/dummyssh
@@ -11,5 +11,5 @@ if sys.argv[1] != "user at dummy":
     sys.exit(-1)
 
-os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
+os.environ["SSH_CLIENT"] = "%s 1 2" % os.environ.get('LOCALIP', '127.0.0.1')
 
 log = open("dummylog", "ab")


More information about the Mercurial-devel mailing list