mirror of
https://github.com/facebook/sapling.git
synced 2024-12-29 08:02:24 +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,11 +180,14 @@ def _patchchgserver():
|
||||
"""patch chgserver so we can backup tty fds before they are replaced if
|
||||
chg starts the pager.
|
||||
"""
|
||||
chgserver = None
|
||||
try:
|
||||
from mercurial import chgserver
|
||||
except ImportError:
|
||||
try:
|
||||
chgserver = extensions.find('chgserver')
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
server = getattr(chgserver, 'chgcmdserver', None)
|
||||
if server and 'attachio' in server.capabilities:
|
||||
orig = server.attachio
|
||||
|
Loading…
Reference in New Issue
Block a user