On Fri, 2005-10-28 at 14:51 -0400, Daniel Berlin wrote:
> While confusing users is always fun, saying "Cannot replace directory
> from within" when someone attempts and svn switch to a directory path
> that doesn't exist is not very helpful.
>
> The attached special cases the error for when the target entry is
> non-existent, so that it says "Target path does not exist" instead.
>
> [[[
>
> Use more informative error when trying to deal with a target path
> that doesn't exist.
>
> * subversion/libsvn_repos/reporter.c
> (drive): Check !t_entry first and give more useful message
> when it is NULL.
> ]]]
>
>
I just found a case where this check fails in some cases (though not in
regression tests). It seems it needs to be:
+ /* Check if the target path exists first. */
+ if (!*b->s_operand && !t_entry)
+ return svn_error_create (SVN_ERR_FS_PATH_SYNTAX, NULL,
+ _("Target path does not exist"));
instead of
+ /* Check if the target path exists first. */
+ if (!t_entry)
+ return svn_error_create (SVN_ERR_FS_PATH_SYNTAX, NULL,
+ _("Target path does not exist"));
The patch and CL has been updated accordingly (the broken version was
never checked in).
[[[
Use more informative error when trying to deal with a target path
that doesn't exist.
* subversion/libsvn_repos/reporter.c
(drive): Check !b->src_operand && !t_entry first and give more useful
message when both are NULL.
]]]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 28 21:13:51 2005