On Sat, Nov 15, 2008 at 6:35 PM, Timothy Brownawell <[EMAIL PROTECTED]> wrote:
> There's no closing '"' on the database line, so really the options file
> is already invalid. It *should* give an error when trying to parse
> _MTN/options (and then not overwrite it), and in fact it *does* give an
> error if I try the same thing with
>  branch "x"
> instead of
>  branch "0"
> . So apparently the basic_io parser can fail to detect certain error
> conditions...

I bet this is the bit where the basic_io code was partly designed for
files that mix multiple basic_io formats, and you need to greedily eat
all you can of one format and then cleanly return for the next guy in
the chain to keep going (think of e.g., extracting a changeset from a
revision).  So it saw a string
"/local_home/hugo/neurospaces_project/MTN/neurospaces-developer.mtn\n
branch", followed by an unrecognized token "0", and since that was
unrecognized, stopped parsing there.  So it thought that the branch
was just unspecified, which is legal, and that's what it wrote back
out.

Guess we need a "assert that's the end of the file" operation in the
basic_io interface.

-- Nathaniel


_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to