monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] monotone automate stdio


From: Timothy Brownawell
Subject: Re: [Monotone-devel] monotone automate stdio
Date: Thu, 19 May 2005 11:29:31 -0500

On 5/19/05, Sebastian Spaeth <address@hidden> wrote:
> >>> Just a small comment; maybe a format using the numeric prefix
> >>> familiar to us all from RFCs like
> >>>
> >>> 200 OK UNKNOWN test/foo
> >>> 201 foo.h
> >>> 201 foo.c
> 
> I know it makes sense to add something like this in general.
> But I am against it.
> 
> The beauty of "automate" (in my eyes) is its simplicity. You run a
> command. You get back a simple list of information. That's it.
> I propose to give other feedback (an error occured, the query was
> non-sensical) through an error code when mt exits, or through stderr.
> This makes it darn easy to parse it with some scripts without the need
> to have delimiters, escape delimiters, ...

I like the simplicity, yes. But there does need to be *some* extra
info, such as telling when the output for one command ends and the
next begins. I'd think having this in the same data stream would be
the best way.

I like the type of format Nathaniel suggested, maybe with an extra
field for an error code: <command number> colon <error code> colon
<more/done> colon <byte count> colon <output> , with <command number>
being incremented by one for each command. That should be enough extra
data to know how to react to the output.

Tim




reply via email to

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