Mercurial > public > mercurial-scm > hg-stable
diff mercurial/server.py @ 40841:368ecbf734af
commandserver: enable logging when server process started
This allows us to keep track of server events before client connects to
the server.
Tests will be added later. Currently there's no log() call to check if
things are working well.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 10 Nov 2018 18:19:34 +0900 |
parents | e7aa113b14f7 |
children | 82210d88d814 |
line wrap: on
line diff
--- a/mercurial/server.py Sat Nov 10 18:16:33 2018 +0900 +++ b/mercurial/server.py Sat Nov 10 18:19:34 2018 +0900 @@ -155,9 +155,11 @@ def _createcmdservice(ui, repo, opts): mode = opts['cmdserver'] try: - return _cmdservicemap[mode](ui, repo, opts) + servicefn = _cmdservicemap[mode] except KeyError: raise error.Abort(_('unknown mode %s') % mode) + commandserver.setuplogging(ui) + return servicefn(ui, repo, opts) def _createhgwebservice(ui, repo, opts): # this way we can check if something was given in the command-line