sapling/hgext3rd/remoteid.py
Jun Wu a97e026674 remoteid: move to hgext3rd
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
2017-05-23 11:47:04 -07:00

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)