Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 20650:e811b93f2cb1
cmdserver: allow to start server without repository
Typical use case is to clone repository through command server. Clone may
require user interaction, so command-server protocol is beneficial over
raw stdio channels.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 03 Mar 2014 23:21:24 +0900 |
parents | 7cd956ace1f4 |
children | 19e9478c1a22 |
comparison
equal
deleted
inserted
replaced
20649:9524938c8ff8 | 20650:e811b93f2cb1 |
---|---|
5166 checkrepo() | 5166 checkrepo() |
5167 s = sshserver.sshserver(ui, repo) | 5167 s = sshserver.sshserver(ui, repo) |
5168 s.serve_forever() | 5168 s.serve_forever() |
5169 | 5169 |
5170 if opts["cmdserver"]: | 5170 if opts["cmdserver"]: |
5171 checkrepo() | |
5172 s = commandserver.server(ui, repo, opts["cmdserver"]) | 5171 s = commandserver.server(ui, repo, opts["cmdserver"]) |
5173 return s.serve() | 5172 return s.serve() |
5174 | 5173 |
5175 # this way we can check if something was given in the command-line | 5174 # this way we can check if something was given in the command-line |
5176 if opts.get('port'): | 5175 if opts.get('port'): |