cmdserver protocol questions

Kevin Bullock kbullock+mercurial at ringworld.org
Fri Jul 1 12:45:20 CDT 2011


On 1 Jul 2011, at 5:13 AM, Martin Geisler wrote:

> [...]
> It's not written anywhere that the headers are truely RFC 822 compliant,
> so people will natually wonder if they can let a email library parse
> them. I suggested declaring that the headers are RFC 822 complient,

Exactly what I was suggesting. I didn't mean to indicate that the existing spec says that. It doesn't (as of when I last wrote).

> but Augie commented on IRC that many email libraries are buggy.

E-mail libraries may be buggy, but there are plenty of solid, mature HTTP implementations. Frankly I'm not sure you _could_ use an existing e-mail library (or HTTP library) to implement a client to the cmdserver, but you could easily rip the header parsing out of any solid open-source implementation.

Hopefully when people see "oh, RFC 822-style headers", they'll think "hey, I bet someone has already implemented that correctly. Let me Google that." Or they'll just use an hglib in their language of choice...

But I see Idan has now defined the field format to what looks like a strict subset of RFC 822. Good by me.

>>> * Termination of server's hello block: how many 'o' channel writes
>>> can a client expect? The example shows several writes on the 'o'
>>> channel, but in practice it seems that there is only one and I think
>>> this was also mentioned somewhere on this mailinglist?
>> 
>> I thought we'd established that the hello block will always be sent in
>> a single chunk? <http://www.selenic.com/hg/rev/c19de7f32961>?
> 
> Yes, Idan confirmed this and updated the protocol documentation on the
> wiki. I'm sure we both agree that commit messages don't count as a
> protocol specification :-)

I'm always glad to see the spec updated to be as specific as implementation has been found to require. :)

pacem in terris / mir / shanti / salaam / heiwa
Kevin R. Bullock



More information about the Mercurial-devel mailing list