Hello.
On Sun 2002-09-22 at 16:28:19 +0100, Philip Martin wrote:
> Benjamin Pflugmann <benjamin-svn-dev@pflugmann.de> writes:
[...]
> > + if (entry->kind == svn_node_dir)
> > + {
> > + SVN_ERR (svn_io_check_path (fullpath, &kind, pool));
> > + if (kind != svn_node_dir)
> > + {
> > + /* When the directory itself is missing in the WC, the WC
> > + cannot be reverted, because the base files were part of
> > + the missing directory. */
> > + err = svn_error_createf (SVN_ERR_UNSUPPORTED_FEATURE, 0, NULL, pool,
>
> I don't think this is the correct error. I think UNSUPPORTED_FEATURE
> is for things we would like to do, but but which have not yet been
> implemented.
So I thought, too. I used it because there is the "--force" flag
pending.
> In this case the behaviour is something we think is correct.
> Perhaps SVN_ERR_WC_NOT_DIRECTORY would be better?
In this case, I had thought of SVN_ERR_ILLEGAL_TARGET ("Illegal target
for the requested operation"). What do you think?
I am fine with either, I am simply not sure whether the "--force" flag
is agreed upon or not.
> Or perhaps a new error?
See below.
> > + "try instead: svn update '%s'", fullpath);
> > + return revert_error (err, fullpath, "using subcommand", pool);
>
> The libsvn_wc library cannot refer to the command line client. The
> library should simply report something like "directory missing '%s'".
> The command line client itself can regonise the particular error and
> it can add the "try update" message if required.
Ugh. Of course.
Hm. If the client has to recognize this, a new error code would
prevent that the error is (or later becomes) ambiguous to the
client. OTOH, currently SVN_ERR_ILLEGAL_TARGET is not used in
conjuntion with revert anywhere, AFAICS.
Bye,
Benjamin.
PS: Because my spare time is quite measured currently, I probably
won't be able to post an updated patch until later this week.
- application/pgp-signature attachment: stored
Received on Mon Sep 23 23:42:22 2002