[PATCH 4 of 4 stateful-chg] commandserver: allow service to process handler's heartbeat result
Yuya Nishihara
yuya at tcha.org
Tue May 9 09:57:23 EDT 2017
On Sat, 6 May 2017 16:39:17 -0700, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1493533827 25200
> # Sat Apr 29 23:30:27 2017 -0700
> # Node ID e5de933e2325dcc8bbaeab17c91b08c203afbdf8
> # Parent ba6bc72d245d779c8951d50eddca1bea9b1b802a
> # Available At https://bitbucket.org/quark-zju/hg-draft
> # hg pull https://bitbucket.org/quark-zju/hg-draft -r e5de933e2325
> commandserver: allow service to process handler's heartbeat result
>
> This will be useful for chg where chg handler could tell service to replace
> its socket.
>
> diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py
> --- a/mercurial/commandserver.py
> +++ b/mercurial/commandserver.py
> @@ -491,5 +491,5 @@ class unixforkingservice(object):
> exiting = True
> else:
> - h.heartbeat()
> + self._handleheartbeat(h.heartbeat())
> try:
> ready = select.select([self._sock], [], [], h.pollinterval)[0]
> @@ -524,4 +524,7 @@ class unixforkingservice(object):
> os._exit(255)
>
> + def _handleheartbeat(self, value):
> + pass
Does it mean we can't avoid sub-classing the service class?
More information about the Mercurial-devel
mailing list