Hi All,
Both ra_local and ra_svn returns 'SVN_ERR_FS_NOT_FOUND' when the
requested path does not exist in the repository.
ra_dav and ra_serf returns 'SVN_ERR_RA_DAV_PATH_NOT_FOUND'.
Both Dan and Myself feel not to have such a special case for ra_dav.
Find the attached patch and log.
With regards
Kamesh Jayachandran
[[[
No need to have a special 'path not found' error code for ra_dav.
'SVN_ERR_RA_DAV_PATH_NOT_FOUND' -> 'SVN_ERR_FS_NOT_FOUND'
* subversion/include/svn_error_codes.h
(): Remove definition of SVN_ERR_RA_DAV_PATH_NOT_FOUND.
* subversion/libsvn_ra_serf/update.c
(handle_stream):
* subversion/libsvn_ra_serf/commit.c
(checkout_dir, checkout_file):
* subversion/libsvn_ra_dav/props.c
(svn_ra_dav__search_for_starting_props, svn_ra_dav__do_check_path,
svn_ra_dav__do_stat):
* subversion/libsvn_ra_dav/commit.c
(commit_add_file):
* subversion/libsvn_ra_dav/fetch.c
(svn_ra_dav__get_locks):
* subversion/libsvn_ra_dav/util.c
(generate_error):
'SVN_ERR_RA_DAV_PATH_NOT_FOUND' -> 'SVN_ERR_FS_NOT_FOUND'
Suggested by: dlr
Patch by: kameshj
]]]
Index: subversion/include/svn_error_codes.h
===================================================================
--- subversion/include/svn_error_codes.h (revision 24227)
+++ subversion/include/svn_error_codes.h (working copy)
@@ -718,10 +718,6 @@
SVN_ERR_RA_DAV_CATEGORY_START + 6,
"Invalid configuration value")
- SVN_ERRDEF(SVN_ERR_RA_DAV_PATH_NOT_FOUND,
- SVN_ERR_RA_DAV_CATEGORY_START + 7,
- "HTTP Path Not Found")
-
SVN_ERRDEF(SVN_ERR_RA_DAV_PROPPATCH_FAILED,
SVN_ERR_RA_DAV_CATEGORY_START + 8,
"Failed to execute WebDAV PROPPATCH")
Index: subversion/libsvn_ra_serf/update.c
===================================================================
--- subversion/libsvn_ra_serf/update.c (revision 24227)
+++ subversion/libsvn_ra_serf/update.c (working copy)
@@ -934,7 +934,7 @@
if (sl.code == 404)
{
fetch_ctx->done = TRUE;
- fetch_ctx->err = svn_error_createf(SVN_ERR_RA_DAV_PATH_NOT_FOUND, NULL,
+ fetch_ctx->err = svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
"'%s' path not found",
fetch_ctx->info->name);
return svn_ra_serf__handle_discard_body(request, response, NULL, pool);
Index: subversion/libsvn_ra_serf/commit.c
===================================================================
--- subversion/libsvn_ra_serf/commit.c (revision 24227)
+++ subversion/libsvn_ra_serf/commit.c (working copy)
@@ -361,14 +361,14 @@
{
if (checkout_ctx->progress.status == 404)
{
- return svn_error_createf(SVN_ERR_RA_DAV_PATH_NOT_FOUND,
+ return svn_error_createf(SVN_ERR_FS_NOT_FOUND,
return_response_err(handler,
&checkout_ctx->progress),
_("Path '%s' not present"),
dir->name);
}
- return svn_error_createf(SVN_ERR_RA_DAV_PATH_NOT_FOUND,
+ return svn_error_createf(SVN_ERR_FS_NOT_FOUND,
return_response_err(handler,
&checkout_ctx->progress),
_("Your file or directory '%s' is probably out-of-date"),
@@ -422,14 +422,14 @@
{
if (file->checkout->progress.status == 404)
{
- return svn_error_createf(SVN_ERR_RA_DAV_PATH_NOT_FOUND,
+ return svn_error_createf(SVN_ERR_FS_NOT_FOUND,
return_response_err(handler,
&file->checkout->progress),
_("Path '%s' not present"),
file->name);
}
- return svn_error_createf(SVN_ERR_RA_DAV_PATH_NOT_FOUND,
+ return svn_error_createf(SVN_ERR_FS_NOT_FOUND,
return_response_err(handler,
&file->checkout->progress),
_("Your file or directory '%s' is probably out-of-date"),
Index: subversion/libsvn_ra_dav/props.c
===================================================================
--- subversion/libsvn_ra_dav/props.c (revision 24227)
+++ subversion/libsvn_ra_dav/props.c (working copy)
@@ -680,7 +680,7 @@
if (! err)
break; /* found an existing parent! */
- if (err->apr_err != SVN_ERR_RA_DAV_PATH_NOT_FOUND)
+ if (err->apr_err != SVN_ERR_FS_NOT_FOUND)
return err; /* found a _real_ error */
else
svn_error_clear(err);
@@ -1175,9 +1175,8 @@
else
*kind = svn_node_file;
}
- else if (err->apr_err == SVN_ERR_RA_DAV_PATH_NOT_FOUND)
+ else if (err->apr_err == SVN_ERR_FS_NOT_FOUND)
{
-
svn_error_clear(err);
*kind = svn_node_none;
return SVN_NO_ERROR;
@@ -1220,7 +1219,7 @@
url, revision, pool);
if (err)
{
- if (err->apr_err == SVN_ERR_RA_DAV_PATH_NOT_FOUND)
+ if (err->apr_err == SVN_ERR_FS_NOT_FOUND)
{
/* easy out: */
svn_error_clear(err);
@@ -1241,7 +1240,7 @@
NULL, NULL /* all props */, pool);
if (err)
{
- if (err->apr_err == SVN_ERR_RA_DAV_PATH_NOT_FOUND)
+ if (err->apr_err == SVN_ERR_FS_NOT_FOUND)
{
/* easy out: */
svn_error_clear(err);
Index: subversion/libsvn_ra_dav/commit.c
===================================================================
--- subversion/libsvn_ra_dav/commit.c (revision 24227)
+++ subversion/libsvn_ra_dav/commit.c (working copy)
@@ -994,7 +994,7 @@
_("File '%s' already exists"),
file->rsrc->url);
}
- else if (err->apr_err == SVN_ERR_RA_DAV_PATH_NOT_FOUND)
+ else if (err->apr_err == SVN_ERR_FS_NOT_FOUND)
{
svn_error_clear(err);
}
Index: subversion/libsvn_ra_dav/fetch.c
===================================================================
--- subversion/libsvn_ra_dav/fetch.c (revision 24227)
+++ subversion/libsvn_ra_dav/fetch.c (working copy)
@@ -1687,7 +1687,7 @@
svn_pool_destroy(baton.scratchpool);
- if (err && err->apr_err == SVN_ERR_RA_DAV_PATH_NOT_FOUND)
+ if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
{
svn_error_clear(err);
*locks = baton.lock_hash;
Index: subversion/libsvn_ra_dav/util.c
===================================================================
--- subversion/libsvn_ra_dav/util.c (revision 24227)
+++ subversion/libsvn_ra_dav/util.c (working copy)
@@ -459,7 +459,7 @@
switch (req->code)
{
case 404:
- return svn_error_create(SVN_ERR_RA_DAV_PATH_NOT_FOUND, NULL,
+ return svn_error_create(SVN_ERR_FS_NOT_FOUND, NULL,
apr_psprintf(pool, _("'%s' path not found"),
req->url));
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 28 16:37:55 2007