[PATCH 7 of 8 ipv6] dummyssh: use LOCALIP

Jun Wu quark at fb.com
Thu Feb 16 12:39:19 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 2bd74124ed8f3824f956f301d15a6816bfa5d483
# Parent  ce9f5e640bdfcc6270f0be98d7fc6520740ba464
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 2bd74124ed8f
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