mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 14:58:03 +03:00
add TCP support to fsmonitor
Summary: This is part of proof-of-concept to test Watchman over TCP, a means to accelerate hg workflows for the ASIC teams within Facebook. For more context, refer to master task T55191832 Reviewed By: xavierd Differential Revision: D18482107 fbshipit-source-id: 08ba3641854d81fe2a1cd8739bb4e9abcbc700ed
This commit is contained in:
parent
aebbe4937f
commit
1b504b8c93
@ -81,6 +81,11 @@ class client(object):
|
||||
self._sockpath = sockpath
|
||||
repo.ui.debug("watchman sockpath is set as %s\n" % sockpath)
|
||||
|
||||
self._transport = None
|
||||
if repo.ui.configbool("fsmonitor", "tcp", False):
|
||||
self._transport = "tcp"
|
||||
self._tcp_host = repo.ui.config("fsmonitor", "tcp-host", "::1")
|
||||
self._tcp_port = repo.ui.configint("fsmonitor", "tcp-port", 12300)
|
||||
self._timeout = timeout
|
||||
self._watchmanclient = None
|
||||
self._root = repo.root
|
||||
@ -123,6 +128,8 @@ class client(object):
|
||||
self._firsttime = False
|
||||
self._watchmanclient = pywatchman.client(
|
||||
sockpath=self._sockpath,
|
||||
transport=self._transport,
|
||||
tcpAddress=(self._tcp_host, self._tcp_port),
|
||||
timeout=self._timeout,
|
||||
recvEncoding="bser-v1",
|
||||
sendEncoding="bser-v1",
|
||||
|
@ -215,6 +215,9 @@ configitem("fsmonitor", "walk_on_invalidate", default=False)
|
||||
configitem("fsmonitor", "watchman-changed-file-threshold", default=200)
|
||||
configitem("fsmonitor", "warn-fresh-instance", default=False)
|
||||
configitem("fsmonitor", "fallback-on-watchman-exception", default=True)
|
||||
configitem("fsmonitor", "tcp", default=False)
|
||||
configitem("fsmonitor", "tcp-host", default="::1")
|
||||
configitem("fsmonitor", "tcp-port", default=12300)
|
||||
|
||||
# This extension is incompatible with the following blacklisted extensions
|
||||
# and will disable itself when encountering one of these:
|
||||
|
@ -60,6 +60,9 @@ New errors are not allowed. Warnings are strongly discouraged.
|
||||
undocumented: fbscmquery.gitcallsigns (list)
|
||||
undocumented: fbscmquery.reponame (str)
|
||||
undocumented: format.usehgsql (bool)
|
||||
undocumented: fsmonitor.tcp (bool)
|
||||
undocumented: fsmonitor.tcp-host (str) ["::1"]
|
||||
undocumented: fsmonitor.tcp-port (int) [12300]
|
||||
undocumented: git.public (list)
|
||||
undocumented: grep.biggrepcorpus (str)
|
||||
undocumented: grep.biggreptier (str) ["biggrep.master"]
|
||||
|
Loading…
Reference in New Issue
Block a user