CommandServer design question

Johan Samyn johan.samyn at gmail.com
Fri Sep 7 03:12:45 CDT 2012


Hi,

On the wikipage for the Hg CommandServer I read that the results of
"runcommand" are sent through the "o"utput channel, and then the final
return code through the "r"esult channel. But the result of
"getencoding" is sent through the "r"esult channel immediately. Is there
any special reasoning behind that decision, cause I find it
inconsequent, and kind of breaks the protocol imho.

As I have started working on a client lib, I had to take special
measurements for this difference, because for runcommand the "r" channel
only contains "channel + returncode", but for getencoding it contains
"channel + length + data".  So what is sent over the "r" channel after
getencoding looks exactly like what is returned on the "o" channel after
runcommand. So why not send it over the "o" channel then?

And I'm pretty sure the small example program at the end of the
CommandServer wikipage doesn't cope with this neither.

Has none of the other lib implementors asked a question about this ? Is
there any chance this can be 'fixed' yet ? Or am I missing something
completely ?

Johan

________________________________________________________________________
"Perfection seems to be achieved, not when there is nothing more to add,
but when there is nothing left to take away." - A. de Saint-Exupéry



More information about the Mercurial-devel mailing list