# HG changeset patch # User Yuya Nishihara # Date 1446297425 -32400 # Node ID dfdac09b57dd629198731fb94a71352d287f091b # Parent d73f23344dc78bd7904f8c1ec5f9be40e3c82c0b serve: unify cmdutil.service() calls of commandserver and hgweb diff -r d73f23344dc7 -r dfdac09b57dd mercurial/commands.py --- a/mercurial/commands.py Sat Oct 31 22:15:16 2015 +0900 +++ b/mercurial/commands.py Sat Oct 31 22:17:05 2015 +0900 @@ -5972,10 +5972,9 @@ if opts["cmdserver"]: import commandserver service = commandserver.createservice(ui, repo, opts) - return cmdutil.service(opts, initfn=service.init, runfn=service.run) - - service = hgweb.createservice(ui, repo, opts) - cmdutil.service(opts, initfn=service.init, runfn=service.run) + else: + service = hgweb.createservice(ui, repo, opts) + return cmdutil.service(opts, initfn=service.init, runfn=service.run) @command('^status|st', [('A', 'all', None, _('show status of all files')),