Mercurial > public > mercurial-scm > hg
comparison mercurial/server.py @ 40823: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 |
comparison
equal
deleted
inserted
replaced
40822:6a75363f834a | 40823:368ecbf734af |
---|---|
153 } | 153 } |
154 | 154 |
155 def _createcmdservice(ui, repo, opts): | 155 def _createcmdservice(ui, repo, opts): |
156 mode = opts['cmdserver'] | 156 mode = opts['cmdserver'] |
157 try: | 157 try: |
158 return _cmdservicemap[mode](ui, repo, opts) | 158 servicefn = _cmdservicemap[mode] |
159 except KeyError: | 159 except KeyError: |
160 raise error.Abort(_('unknown mode %s') % mode) | 160 raise error.Abort(_('unknown mode %s') % mode) |
161 commandserver.setuplogging(ui) | |
162 return servicefn(ui, repo, opts) | |
161 | 163 |
162 def _createhgwebservice(ui, repo, opts): | 164 def _createhgwebservice(ui, repo, opts): |
163 # this way we can check if something was given in the command-line | 165 # this way we can check if something was given in the command-line |
164 if opts.get('port'): | 166 if opts.get('port'): |
165 opts['port'] = util.getport(opts.get('port')) | 167 opts['port'] = util.getport(opts.get('port')) |