monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] monotone checkout error message


From: Benoît Dejean
Subject: [Monotone-devel] monotone checkout error message
Date: Sat, 18 Jun 2005 16:34:00 +0200

Hi, i'm using monotone 0.19.

$ >notadir
$ monotone --db=~/benoit.db --branch=xxxxxxxxxxx co notadir
$ monotone: misuse: could not create directory: /tmp/notadir: Success

the error message is wrong.

I looked at boost::filesystem and made a small test case i've attached :

$ ./my_mkdir notadir
boost::filesystem::create_directory: "notadir": path exists and is not a
directory
native_error = 0, error = 8, errno = 17, strerror(errno) = "File exists"

i'm surprised that error != errno. that may be the reason why
strerror(err.native_error()) in /app_state.cc gives a wrong error
message.

If using fs::create_directories :

$ ./my_mkdir_p notadir
boost::filesystem::create_directories: "/tmp/notadir": path exists and
is not a directory
native_error = 0, error = 8, errno = 0, strerror(errno) = "Success"

error is meaningfull but errno is 0 (see boost impl for detail).

So, it looks to me that error is not errno (because boost does not set
errno) and that strerror(error) gives wrong messages.
fs::filesystem_error::what() gives a good error message even if the
boost::... prefix is not user friendly.

$ monotone --db=~/benoit.db --branch=xxxxxxxxxxx co notadir
monotone: misuse: could not create directory:
boost::filesystem::create_directories: "/tmp/notadir": path exists and
is not a directory

Thanks.

Attachment: error.diff
Description: Text Data

Attachment: my_mkdir.cpp
Description: Text Data


reply via email to

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