comparison mercurial/server.py @ 40824:82210d88d814

commandserver: install logger to record server events through canonical API The global commandserver.log() will be replaced with this.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 10 Nov 2018 19:00:17 +0900
parents 368ecbf734af
children 2372284d9457
comparison
equal deleted inserted replaced
40823:368ecbf734af 40824:82210d88d814
156 mode = opts['cmdserver'] 156 mode = opts['cmdserver']
157 try: 157 try:
158 servicefn = _cmdservicemap[mode] 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) 161 commandserver.setuplogging(ui, repo)
162 return servicefn(ui, repo, opts) 162 return servicefn(ui, repo, opts)
163 163
164 def _createhgwebservice(ui, repo, opts): 164 def _createhgwebservice(ui, repo, opts):
165 # 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
166 if opts.get('port'): 166 if opts.get('port'):