Construction
- public function __construct($working_copy) — Build a new server. This server is bound to a working copy. The server is inactive until you @{method:start} it.
Configuration
- public function setQuiet($quiet) — Disable status messages to stdout. Controlled with `--quiet`.
- public function setClientLimit($limit) — Configure a client limit. After serving this many clients, the server will exit. Controlled with `--client-limit`.
- public function setIdleLimit($limit) — Configure an idle time limit. After this many seconds idle, the server will exit. Controlled with `--idle-limit`.
- public function setSkipHello($skip) — When clients connect, do not send the "capabilities" message expected by the Mercurial protocol. This deviates from the protocol and will only work if the clients are also configured not to expect the message, but slightly improves performance. Controlled with --skip-hello.
- public function setDoNotDaemonize($do_not_daemonize) — Configure whether the server runs in the foreground or daemonizes. Controlled by --do-not-daemonize. Primarily useful for debugging.
Serving Requests
- public function start() — Start the server. This method returns after the client limit or idle limit are exceeded. If neither limit is configured, this method does not exit.
- private function updateClient($client, $hg) — Update one client, processing any commands it has sent us. We fully process all commands we've received here before returning to the main server loop.
Managing Clients
- public static function getPathToSocket($working_copy)
- private function startWorkingCopySocket()
- private function acceptNewClient($socket)
Managing Mercurial
- private function startMercurialProcess() — Starts a Mercurial process which can actually handle requests.
Internals
- public function __destruct() — Close and remove the unix domain socket in the working copy.
Other Methods
- public function __get($name)
- public function __set($name, $value)
- public function current()
- public function key()
- public function next()
- public function rewind()
- public function valid()
- private function throwOnAttemptedIteration()
- public function getPhobjectClassConstant($key, $byte_limit) — Read the value of a class constant.
- private function closeSocket()
- private function log($client, $message)
- private function daemonize()