monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] "" is invalid file_path?


From: Stephen Leake
Subject: Re: [Monotone-devel] "" is invalid file_path?
Date: Tue, 09 Sep 2008 03:31:39 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt)

"Nathaniel Smith" <address@hidden> writes:

> On Mon, Sep 8, 2008 at 12:59 AM, Stephen Leake
> <address@hidden> wrote:
>
>> <snip>
>>
>> One fix is to delete that line from normalize_external_path.
>
> <snip>
> 
> So if you remove that check, "mtn add ''" will be
> valid (well, or more likely will give a weird assertion failed error
> instead of the useful error it gives now).

To address this point in detail, observe:

$ echo "foo" > foo
$ mtn add foo
mtn: adding foo to workspace manifest
$ mtn add foo
mtn: skipping foo, already accounted for in workspace

    That's a nice error message. Now try adding a directory:

$ mkdir bar
$ echo "barfoo" > bar/foo
$ mtn add "bar"
mtn: warning: Non-recursive add: Files in the directory 'bar' will not be added 
automatically.
mtn: adding bar to workspace manifest
$ mtn add "bar"
mtn: warning: Non-recursive add: Files in the directory 'bar' will not be added 
automatically.
mtn: skipping bar, already accounted for in workspace

    Again, nice message. Now the root directory:

$ mtn add ""
mtn: misuse: empty path '' is invalid
$ mtn add "."
mtn: warning: Non-recursive add: Files in the directory '' will not be
added automatically.

    Not so nice, but not really a problem. Now with the check for ""
    removed from paths.cc normalize_external_path:

$ /Gnu/monotone.resolve_conflicts-build_mingw/mtn.exe add ""
mtn: warning: Non-recursive add: Files in the directory '' will not be added 
automatically.

    Nicer, since consistent with the other ways of naming the root
    directory.

-- 
-- Stephe




reply via email to

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