comparison mercurial/commands.py @ 22988:32b77aba2772

cmdserver: wrap 'pipe' mode server by service object This is the stub for new mode that will listen for connections on unix domain socket. Though --daemon option is not banned in 'pipe' mode, it is useless because the detached 'pipe' mode server exits immediately due to null stdin. Should it abort if --daemon is specified with --cmdserver pipe or --stdio?
author Yuya Nishihara <yuya@tcha.org>
date Sat, 27 Sep 2014 14:52:09 +0900
parents 8792ac090e3b
children dc8803ce3dfe
comparison
equal deleted inserted replaced
22987:e6d890e1ed4f 22988:32b77aba2772
5534 " (.hg not found)")) 5534 " (.hg not found)"))
5535 s = sshserver.sshserver(ui, repo) 5535 s = sshserver.sshserver(ui, repo)
5536 s.serve_forever() 5536 s.serve_forever()
5537 5537
5538 if opts["cmdserver"]: 5538 if opts["cmdserver"]:
5539 s = commandserver.server(ui, repo, opts["cmdserver"]) 5539 service = commandserver.pipeservice(ui, repo, opts)
5540 return s.serve() 5540 return cmdutil.service(opts, initfn=service.init, runfn=service.run)
5541 5541
5542 # this way we can check if something was given in the command-line 5542 # this way we can check if something was given in the command-line
5543 if opts.get('port'): 5543 if opts.get('port'):
5544 opts['port'] = util.getport(opts.get('port')) 5544 opts['port'] = util.getport(opts.get('port'))
5545 5545