diff -r ad15646dc61c -r a150173da1c1 mercurial/sshserver.py --- a/mercurial/sshserver.py Sun Dec 18 01:34:41 2016 +0530 +++ b/mercurial/sshserver.py Sun Dec 18 01:46:39 2016 +0530 @@ -8,11 +8,11 @@ from __future__ import absolute_import -import os import sys from .i18n import _ from . import ( + encoding, error, hook, util, @@ -131,5 +131,5 @@ return cmd != '' def _client(self): - client = os.environ.get('SSH_CLIENT', '').split(' ', 1)[0] + client = encoding.environ.get('SSH_CLIENT', '').split(' ', 1)[0] return 'remote:ssh:' + client