Commit Graph

7 Commits

Author SHA1 Message Date
Idan Kamara
b66cd482a9 cmdserver: assign repo.baseui before running commands
There are places in the code that use localrepository.baseui (see hg.remoteui),
we need the ui descriptors (and possibly other things) to be set
correctly on it, so output written to the remoteui descriptors ends up at the
right place.

Before this change, tests such as 'test-bookmarks-pushpull.t' didn't work.
2011-06-24 19:44:17 +03:00
Idan Kamara
29b1c451dc cmdserver: copy repo.ui before running commands 2011-06-24 19:43:59 +03:00
Idan Kamara
f916e19611 cmdserver: fix read-loop string concatenation 2011-06-24 16:36:24 +03:00
Idan Kamara
046eba79ef cmdserver: write the hello message as one chunk on the 'o' channel
This is a guaranteed by the protocol: clients know they need to read one chunk
off of the 'o' channel and treat that as the hello message.

They should ignore fields they don't recognize so they stay compatible with
new versions of the server in case we decide to add something.
2011-06-22 17:13:04 +03:00
Idan Kamara
29341e1294 cmdserver, runcommand: properly handle the client sending no arguments
No real reason for a client to do this, but still possible.

Previously if the client sent no arguments, a list with an empty string ['']
would be used as the arguments to dispatch, which would cause hg to complain
about an ambiguous command.

Instead, we simply check for no arguments and use an empty list instead (which
is equivalent to invoking hg with no args on the command line).
2011-06-21 15:38:10 +03:00
Idan Kamara
1d2537f10a cmdserver: don't raise EOFError when trying to read 0 bytes from the client 2011-06-21 15:13:39 +03:00
Idan Kamara
40027596a8 serve: add --cmdserver option to communicate with hg over a pipe 2011-06-03 17:27:41 +03:00