monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] review of nvm.automate_out_of_band


From: Thomas Keller
Subject: Re: [Monotone-devel] review of nvm.automate_out_of_band
Date: Fri, 27 Nov 2009 01:23:42 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.1.4pre) Gecko/20090915 Lightning/1.0pre Thunderbird/3.0b4

Am 22.11.09 20:26, schrieb Thomas Keller:
>> ...hm, how much do we care about keeping stdio output compatible? Right
>> now the error indicator distinguishes between normal output and error
>> messages and doubles as the return code, and the more/last indicator is
>> just an EOF marker. So the most compatible thing might be to leave the
>> more/last indicator alone, and indicate alternate streams by setting the
>> 'error' field to something silly, like 128 and over (and then just set
>> the actual exit code for the last (empty) packet). But then if frontends
>> actually error out on unknown interface_version's this doesn't really
>> matter.
> 
> I don't think its actually feasible to have multiple meanings of the
> error indicator within the output of a single call (after all, the
> program either executes successfully or fails with an specific code). If
> we don't care about breaking stdio, we could catch two flies: Make the
> 'l' stream really the last thing every command issues (without any more
> payload) and encode the return code of the command as payload of this
> stream. This would then also mean that we could remove the individual
> error indicator from all other streams, i.e.
> 
>       l5:headse
> 
> would lead to
> 
>       0:m:41:503c40cda521bbba7dd971110d50b265681979cb
>       0:l:1:0
> 
> instead of
> 
>       0:0:l:41:503c40cda521bbba7dd971110d50b265681979cb

This has been implemented in 6848a33ed9bbffebbfa5654648af1d5ce36b041a -
of course this breaks BC with earlier monotone versions, but its only a
small change in everyone's stdio parser implementation (we have three or
four, including my own one for guitone, Thomas Moschny's for TracMTN,
ViewMTN's [which might be actually the same since its Python as well]
and the one from mtn-browse, which is Perl, iirc) and it makes the whole
thing much clearer and straight-forward (actually I think we should have
done this right from the start).

What do you think?

Thomas.

-- 
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]