Mercurial > hg > mercurial-source
changeset 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 | e6d890e1ed4f |
children | dc8803ce3dfe |
files | mercurial/commands.py mercurial/commandserver.py |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5536,8 +5536,8 @@ s.serve_forever() if opts["cmdserver"]: - s = commandserver.server(ui, repo, opts["cmdserver"]) - return s.serve() + service = commandserver.pipeservice(ui, repo, opts) + return cmdutil.service(opts, initfn=service.init, runfn=service.run) # this way we can check if something was given in the command-line if opts.get('port'):