[Top][All Lists]
[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: |
Tue, 17 May 2005 14:34:08 -0700 |
On 5/17/05, Joel Crisp <address@hidden> wrote:
> Yep, a number at the beginning of each line. It lets you detect the start of
> the next header, distinguish different types of output
> easily, handle optional or repeated blocks of output etc. It also allows you
> to detect badly or prematurely terminated blocks, since
> the start of the next command will cause a reset.
Hmm...
200 success
250 output
290 done (successful)
400 error/general
410 error/syntax
420 error/unknown command
450 error text
490 done (not successful)
> I think the change to the existing commands should be fairly minor, an extra
> %s at the start of the printf which is either "201 " or
> "" for each line.
After poking around a bit, it turns out to be even easier. Pass the
command a stringstream instead of the real output, and run
"prefix_lines_with" (transforms.hh) on it before printing.
> I don't think stripping line prefixes is an insurmountable problem - after
> all, there are many other protocols which do something
> similar.
>
> Read the RFC for dict (http://www.faqs.org/rfcs/rfc2229.html) or the mailing
> list expansion in SMTP
> (http://www.faqs.org/rfcs/rfc821.html) for more examples
- [Monotone-devel] monotone automate stdio, Timothy Brownawell, 2005/05/13
- Re: [Monotone-devel] monotone automate stdio, Joel Crisp, 2005/05/15
- Re: [Monotone-devel] monotone automate stdio, Jerome Fisher, 2005/05/18
- Re: [Monotone-devel] monotone automate stdio, Timothy Brownawell, 2005/05/18
- Re: [Monotone-devel] monotone automate stdio, Sebastian Spaeth, 2005/05/19
- Re: [Monotone-devel] monotone automate stdio, Timothy Brownawell, 2005/05/19
- Re: [Monotone-devel] monotone automate stdio, jc007b6093, 2005/05/20
- Re: [Monotone-devel] monotone automate stdio, Matthew A. Nicholson, 2005/05/20
Re: [Monotone-devel] monotone automate stdio, Nathaniel Smith, 2005/05/18