mirror of
https://github.com/facebook/sapling.git
synced 2024-12-28 15:44:27 +03:00
build: fix build errors caused by chgserver moved to core
Test Plan: `arc diff` Reviewers: #sourcecontrol, mjpieters Reviewed By: mjpieters Subscribers: mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4244233 Signature: t1:4244233:1480432440:104d3b082b9affddf1d44bb3cfc5f997eb7e9afa
This commit is contained in:
parent
240a2db67b
commit
38e3389cbb
@ -26,7 +26,10 @@ will not load them for you
|
||||
|
||||
from mercurial import extensions
|
||||
from mercurial import error
|
||||
from hgext import chgserver
|
||||
try:
|
||||
from mercurial import chgserver
|
||||
except ImportError:
|
||||
from hgext import chgserver
|
||||
chgserver._configsections.append('extorder')
|
||||
|
||||
testedwith = 'internal'
|
||||
|
@ -180,15 +180,18 @@ def _patchchgserver():
|
||||
"""patch chgserver so we can backup tty fds before they are replaced if
|
||||
chg starts the pager.
|
||||
"""
|
||||
chgserver = None
|
||||
try:
|
||||
chgserver = extensions.find('chgserver')
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
server = getattr(chgserver, 'chgcmdserver', None)
|
||||
if server and 'attachio' in server.capabilities:
|
||||
orig = server.attachio
|
||||
server.capabilities['attachio'] = extensions.bind(_attachio, orig)
|
||||
from mercurial import chgserver
|
||||
except ImportError:
|
||||
try:
|
||||
chgserver = extensions.find('chgserver')
|
||||
except KeyError:
|
||||
pass
|
||||
server = getattr(chgserver, 'chgcmdserver', None)
|
||||
if server and 'attachio' in server.capabilities:
|
||||
orig = server.attachio
|
||||
server.capabilities['attachio'] = extensions.bind(_attachio, orig)
|
||||
|
||||
def uisetup(ui):
|
||||
# _validaterepo runs ssh and needs to be wrapped
|
||||
|
Loading…
Reference in New Issue
Block a user