monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] weird monotone behavior


From: Nathaniel Smith
Subject: Re: [Monotone-devel] weird monotone behavior
Date: Sat, 15 Nov 2008 20:21:51 -0800

On Sat, Nov 15, 2008 at 6:35 PM, Timothy Brownawell <address@hidden> 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




reply via email to

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