mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
a97e026674
Summary: This is what extensions should belong to. Test Plan: Changed existing test. Reviewers: #mercurial, rmcelroy Reviewed By: rmcelroy Subscribers: mjpieters Differential Revision: https://phabricator.intern.facebook.com/D5113042 Signature: t1:5113042:1495561987:d1af0f7cebfdb8b0c1a6bb71cdc826d817a4e441
17 lines
445 B
Python
17 lines
445 B
Python
# Copyright 2016-present Facebook. All Rights Reserved.
|
|
#
|
|
# print server fqdn during a remote session
|
|
|
|
import socket
|
|
|
|
from mercurial import wireproto
|
|
from mercurial.extensions import wrapfunction
|
|
from mercurial.i18n import _
|
|
|
|
def extsetup(ui):
|
|
def printhostname(orig, *args, **kwargs):
|
|
ui.warn(_('hostname') + ': ' + socket.getfqdn())
|
|
return orig(*args, **kwargs)
|
|
|
|
wrapfunction(wireproto, '_capabilities', printhostname)
|