You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2015/09/11 17:51:34 UTC
svn commit: r1702504 [15/19] - in /subversion/branches/reuse-ra-session: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/hook-scripts/ notes/ subversion/bindings/ctypes-python/csvn/ext/
subversion/bindings/javahl/native/ ...
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-location-segments.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-location-segments.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-location-segments.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-location-segments.c Fri Sep 11 15:51:30 2015
@@ -124,12 +124,12 @@ dav_svn__get_location_segments_report(co
/* Sanity check. */
if (!resource->info->repos_path)
- return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not specify a repository path");
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
if (ns == -1)
{
- return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not contain the 'svn:' "
"namespace, so it is not going to have "
"certain required elements");
@@ -175,7 +175,7 @@ dav_svn__get_location_segments_report(co
/* Check that all parameters are present and valid. */
if (! abs_path)
- return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"Not all parameters passed");
/* No START_REV or PEG_REVISION? We'll use HEAD. */
@@ -202,12 +202,12 @@ dav_svn__get_location_segments_report(co
if (end_rev > start_rev)
return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST,
- SVN_ERR_FS_NO_SUCH_REVISION,
+ SVN_ERR_FS_NO_SUCH_REVISION, 0,
"End revision must not be younger than "
"start revision");
if (start_rev > peg_revision)
return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST,
- SVN_ERR_FS_NO_SUCH_REVISION,
+ SVN_ERR_FS_NO_SUCH_REVISION, 0,
"Start revision must not be younger than "
"peg revision");
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-locations.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-locations.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-locations.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-locations.c Fri Sep 11 15:51:30 2015
@@ -107,12 +107,12 @@ dav_svn__get_locations_report(const dav_
/* Sanity check. */
if (!resource->info->repos_path)
- return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not specify a repository path");
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
if (ns == -1)
{
- return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not contain the 'svn:' "
"namespace, so it is not going to have "
"certain required elements");
@@ -152,7 +152,7 @@ dav_svn__get_locations_report(const dav_
/* Check that all parameters are present and valid. */
if (! (abs_path && SVN_IS_VALID_REVNUM(peg_revision)))
- return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"Not all parameters passed");
/* Build an authz read baton */
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-locks.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-locks.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-locks.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/get-locks.c Fri Sep 11 15:51:30 2015
@@ -190,7 +190,7 @@ dav_svn__get_locks_report(const dav_reso
/* The request URI should be a public one representing an fs path. */
if ((! resource->info->repos_path)
|| (! resource->info->repos->repos))
- return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"get-locks-report run on resource which doesn't "
"represent a path within a repository.");
@@ -207,7 +207,7 @@ dav_svn__get_locks_report(const dav_reso
(depth != svn_depth_files) &&
(depth != svn_depth_immediates) &&
(depth != svn_depth_infinity))
- return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"Invalid 'depth' specified in "
"get-locks-report request.");
continue;
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/inherited-props.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/inherited-props.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/inherited-props.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/inherited-props.c Fri Sep 11 15:51:30 2015
@@ -65,12 +65,12 @@ dav_svn__get_inherited_props_report(cons
/* Sanity check. */
if (!resource->info->repos_path)
- return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not specify a repository path");
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
if (ns == -1)
{
- return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not contain the 'svn:' "
"namespace, so it is not going to have "
"certain required elements");
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/log.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/log.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/log.c Fri Sep 11 15:51:30 2015
@@ -355,12 +355,12 @@ dav_svn__log_report(const dav_resource *
/* Sanity check. */
if (!resource->info->repos_path)
- return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not specify a repository path");
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
if (ns == -1)
{
- return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not contain the 'svn:' "
"namespace, so it is not going to have "
"certain required elements");
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/mergeinfo.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/mergeinfo.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/mergeinfo.c Fri Sep 11 15:51:30 2015
@@ -68,12 +68,12 @@ dav_svn__get_mergeinfo_report(const dav_
/* Sanity check. */
if (!resource->info->repos_path)
- return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not specify a repository path");
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
if (ns == -1)
{
- return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not contain the 'svn:' "
"namespace, so it is not going to have "
"certain required elements");
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/replay.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/replay.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/replay.c Fri Sep 11 15:51:30 2015
@@ -401,7 +401,7 @@ make_editor(const svn_delta_editor_t **e
static dav_error *
malformed_element_error(const char *tagname, apr_pool_t *pool)
{
- return dav_svn__new_error_svn(pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(pool, HTTP_BAD_REQUEST, 0, 0,
apr_pstrcat(pool,
"The request's '", tagname,
"' element is malformed; there "
@@ -455,7 +455,7 @@ dav_svn__replay_report(const dav_resourc
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
if (ns == -1)
- return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not contain the 'svn:' "
"namespace, so it is not going to have an "
"svn:revision element. That element is "
@@ -519,12 +519,12 @@ dav_svn__replay_report(const dav_resourc
if (! SVN_IS_VALID_REVNUM(rev))
return dav_svn__new_error_svn
- (resource->pool, HTTP_BAD_REQUEST, 0,
+ (resource->pool, HTTP_BAD_REQUEST, 0, 0,
"Request was missing the revision argument");
if (! SVN_IS_VALID_REVNUM(low_water_mark))
return dav_svn__new_error_svn
- (resource->pool, HTTP_BAD_REQUEST, 0,
+ (resource->pool, HTTP_BAD_REQUEST, 0, 0,
"Request was missing the low-water-mark argument");
if (! base_dir)
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/update.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/reports/update.c Fri Sep 11 15:51:30 2015
@@ -904,7 +904,7 @@ malformed_element_error(const char *tagn
"' element is malformed; there "
"is a problem with the client.",
SVN_VA_NULL);
- return dav_svn__new_error_svn(pool, HTTP_BAD_REQUEST, 0, errstr);
+ return dav_svn__new_error_svn(pool, HTTP_BAD_REQUEST, 0, 0, errstr);
}
@@ -988,14 +988,14 @@ dav_svn__update_report(const dav_resourc
if ((resource->info->restype != DAV_SVN_RESTYPE_VCC)
&& (resource->info->restype != DAV_SVN_RESTYPE_ME))
- return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT, 0, 0,
"This report can only be run against "
"a VCC or root-stub URI");
ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
if (ns == -1)
{
- return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request does not contain the 'svn:' "
"namespace, so it is not going to have an "
"svn:target-revision element. That element "
@@ -1191,7 +1191,7 @@ dav_svn__update_report(const dav_resourc
if (! src_path)
{
return dav_svn__new_error_svn
- (resource->pool, HTTP_BAD_REQUEST, 0,
+ (resource->pool, HTTP_BAD_REQUEST, 0, 0,
"The request did not contain the '<src-path>' element.\n"
"This may indicate that your client is too old");
}
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/repos.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/repos.c Fri Sep 11 15:51:30 2015
@@ -929,14 +929,14 @@ prep_working(dav_resource_combined *comb
if (txn_name == NULL)
{
if (!comb->priv.root.activity_id)
- return dav_svn__new_error(comb->res.pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(comb->res.pool, HTTP_BAD_REQUEST, 0, 0,
"The request did not specify an activity ID");
txn_name = dav_svn__get_txn(comb->priv.repos,
comb->priv.root.activity_id);
if (txn_name == NULL)
{
- return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0, 0,
"An unknown activity was specified in the "
"URL. This is generally caused by a "
"problem in the client software.");
@@ -952,7 +952,7 @@ prep_working(dav_resource_combined *comb
if (serr->apr_err == SVN_ERR_FS_NO_SUCH_TRANSACTION)
{
svn_error_clear(serr);
- return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0, 0,
"An activity was specified and found, but "
"the corresponding SVN FS transaction was "
"not found.");
@@ -1012,7 +1012,7 @@ prep_working(dav_resource_combined *comb
}
else if (!svn_string_compare(current_author, &request_author))
{
- return dav_svn__new_error(pool, HTTP_NOT_IMPLEMENTED, 0,
+ return dav_svn__new_error(pool, HTTP_NOT_IMPLEMENTED, 0, 0,
"Multi-author commits not supported.");
}
}
@@ -1067,7 +1067,7 @@ prep_activity(dav_resource_combined *com
const char *txn_name;
if (!comb->priv.root.activity_id)
- return dav_svn__new_error(comb->res.pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(comb->res.pool, HTTP_BAD_REQUEST, 0, 0,
"The request did not specify an activity ID");
txn_name = dav_svn__get_txn(comb->priv.repos, comb->priv.root.activity_id);
@@ -1094,7 +1094,7 @@ prep_private(dav_resource_combined *comb
/* Open the named transaction. */
if (comb->priv.root.txn_name == NULL)
- return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0, 0,
"An unknown txn name was specified in the "
"URL.");
@@ -1107,7 +1107,7 @@ prep_private(dav_resource_combined *comb
{
svn_error_clear(serr);
comb->res.exists = FALSE;
- return dav_svn__new_error(pool, HTTP_NOT_FOUND, 0,
+ return dav_svn__new_error(pool, HTTP_NOT_FOUND, 0, 0,
"Named transaction doesn't exist.");
}
return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
@@ -1158,7 +1158,7 @@ prep_resource(dav_resource_combined *com
return (*scan->prep)(comb);
}
- return dav_svn__new_error(comb->res.pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ return dav_svn__new_error(comb->res.pool, HTTP_INTERNAL_SERVER_ERROR, 0, 0,
"DESIGN FAILURE: unknown resource type");
}
@@ -1256,7 +1256,7 @@ dav_svn_split_uri2(request_rec *r,
{
/* ### are SVN_ERR_APMOD codes within the right numeric space? */
return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR,
- SVN_ERR_APMOD_MISSING_PATH_TO_FS,
+ SVN_ERR_APMOD_MISSING_PATH_TO_FS, 0,
"The server is misconfigured: "
"either an SVNPath or SVNParentPath "
"directive is required to specify the location "
@@ -1339,7 +1339,7 @@ dav_svn_split_uri2(request_rec *r,
{
/* ### are SVN_ERR_APMOD codes within the right numeric space? */
return dav_svn__new_error(pool, HTTP_FORBIDDEN,
- SVN_ERR_APMOD_MALFORMED_URI,
+ SVN_ERR_APMOD_MALFORMED_URI, 0,
"The URI does not contain the name "
"of a repository.");
}
@@ -1387,7 +1387,7 @@ dav_svn_split_uri2(request_rec *r,
{
/* relative is just "!svn", which is malformed. */
return dav_svn__new_error(pool, HTTP_NOT_FOUND,
- SVN_ERR_APMOD_MALFORMED_URI,
+ SVN_ERR_APMOD_MALFORMED_URI, 0,
"Nothing follows the svn special_uri.");
}
else
@@ -1414,7 +1414,7 @@ dav_svn_split_uri2(request_rec *r,
else
return dav_svn__new_error(
pool, HTTP_NOT_FOUND,
- SVN_ERR_APMOD_MALFORMED_URI,
+ SVN_ERR_APMOD_MALFORMED_URI, 0,
"Missing info after special_uri.");
}
else if (relative[len3] == '/')
@@ -1438,7 +1438,7 @@ dav_svn_split_uri2(request_rec *r,
if (j != (defn->numcomponents - 1))
return dav_svn__new_error(
pool, HTTP_NOT_FOUND,
- SVN_ERR_APMOD_MALFORMED_URI,
+ SVN_ERR_APMOD_MALFORMED_URI, 0,
"Not enough components after "
"special_uri.");
@@ -1458,7 +1458,7 @@ dav_svn_split_uri2(request_rec *r,
{
return
dav_svn__new_error(pool, HTTP_NOT_FOUND,
- SVN_ERR_APMOD_MALFORMED_URI,
+ SVN_ERR_APMOD_MALFORMED_URI, 0,
"Unknown data after special_uri.");
}
@@ -1469,7 +1469,7 @@ dav_svn_split_uri2(request_rec *r,
if (defn->name == NULL)
return
dav_svn__new_error(pool, HTTP_NOT_FOUND,
- SVN_ERR_APMOD_MALFORMED_URI,
+ SVN_ERR_APMOD_MALFORMED_URI, 0,
"Couldn't match subdir after special_uri.");
}
}
@@ -1571,7 +1571,7 @@ get_parentpath_resource(request_rec *r,
"/", SVN_VA_NULL);
apr_table_setn(r->headers_out, "Location",
ap_construct_url(r->pool, new_uri, r));
- return dav_svn__new_error(r->pool, HTTP_MOVED_PERMANENTLY, 0,
+ return dav_svn__new_error(r->pool, HTTP_MOVED_PERMANENTLY, 0, 0,
"Requests for a collection must have a "
"trailing slash on the URI.");
}
@@ -1994,7 +1994,7 @@ parse_querystring(request_rec *r, const
prevstr++;
peg_rev = SVN_STR_TO_REV(prevstr);
if (!SVN_IS_VALID_REVNUM(peg_rev))
- return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0, 0,
"invalid peg rev in query string");
}
else
@@ -2013,7 +2013,7 @@ parse_querystring(request_rec *r, const
wrevstr++;
working_rev = SVN_STR_TO_REV(wrevstr);
if (!SVN_IS_VALID_REVNUM(working_rev))
- return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0, 0,
"invalid working rev in query string");
}
else
@@ -2027,7 +2027,7 @@ parse_querystring(request_rec *r, const
Our node-tracing algorithms can't handle that scenario, so we'll
disallow it here. */
if (working_rev > peg_rev)
- return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0, 0,
"working rev greater than peg rev.");
/* If WORKING_REV and PEG_REV are equivalent, we want to return the
@@ -2067,9 +2067,9 @@ parse_querystring(request_rec *r, const
return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
"Couldn't trace history.", pool);
- newpath = apr_hash_get(locations, &working_rev, sizeof(svn_revnum_t));
+ newpath = apr_hash_get(locations, &working_rev, sizeof(working_rev));
if (! newpath)
- return dav_svn__new_error(pool, HTTP_NOT_FOUND, 0,
+ return dav_svn__new_error(pool, HTTP_NOT_FOUND, 0, 0,
"path doesn't exist in that revision.");
/* Redirect folks to a canonical, peg-revision-only location.
@@ -2089,7 +2089,7 @@ parse_querystring(request_rec *r, const
return dav_svn__new_error(r->pool,
prevstr ? HTTP_MOVED_PERMANENTLY
: HTTP_MOVED_TEMPORARILY,
- 0, "redirecting to canonical location");
+ 0, 0, "redirecting to canonical location");
}
return NULL;
@@ -2149,7 +2149,7 @@ get_resource(request_rec *r,
/* Marshall the error back to the client by generating by
* way of the dav_svn__error_response_tag trick. */
err = dav_svn__new_error(r->pool, HTTP_METHOD_NOT_ALLOWED,
- SVN_ERR_APMOD_MALFORMED_URI,
+ SVN_ERR_APMOD_MALFORMED_URI, 0,
"The URI does not contain the name "
"of a repository.");
/* can't use r->allowed since the default handler isn't called */
@@ -2550,7 +2550,7 @@ get_resource(request_rec *r,
SVN_VA_NULL);
apr_table_setn(r->headers_out, "Location",
ap_construct_url(r->pool, new_path, r));
- return dav_svn__new_error(r->pool, HTTP_MOVED_PERMANENTLY, 0,
+ return dav_svn__new_error(r->pool, HTTP_MOVED_PERMANENTLY, 0, 0,
"Requests for a collection must have a "
"trailing slash on the URI.");
}
@@ -2575,7 +2575,7 @@ get_resource(request_rec *r,
/* ### pick something other than HTTP_INTERNAL_SERVER_ERROR */
/* ### are SVN_ERR_APMOD codes within the right numeric space? */
return dav_svn__new_error(r->pool, HTTP_INTERNAL_SERVER_ERROR,
- SVN_ERR_APMOD_MALFORMED_URI,
+ SVN_ERR_APMOD_MALFORMED_URI, 0,
"The URI indicated a resource within Subversion's "
"special resource area, but does not exist. This "
"is generally caused by a problem in the client "
@@ -2684,7 +2684,7 @@ get_parent_resource(const dav_resource *
/* If we didn't create parent resource above, complain. */
if (! *parent_resource)
- return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0, 0,
apr_psprintf(resource->pool,
"get_parent_resource was called for "
"%s (type %d)",
@@ -2792,7 +2792,8 @@ open_stream(const dav_resource *resource
{
if (resource->type != DAV_RESOURCE_TYPE_WORKING)
{
- return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED, 0,
+ return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED,
+ 0, 0,
"Resource body changes may only be made to "
"working resources (at this time).");
}
@@ -2801,7 +2802,7 @@ open_stream(const dav_resource *resource
/* ### TODO: Can we support range writes someday? */
if (mode == DAV_MODE_WRITE_SEEKABLE)
{
- return dav_svn__new_error(resource->pool, HTTP_NOT_IMPLEMENTED, 0,
+ return dav_svn__new_error(resource->pool, HTTP_NOT_IMPLEMENTED, 0, 0,
"Resource body writes cannot use ranges "
"(at this time).");
}
@@ -2995,7 +2996,7 @@ seek_stream(dav_stream *stream, apr_off_
{
/* ### fill this in */
- return dav_svn__new_error(stream->res->pool, HTTP_NOT_IMPLEMENTED, 0,
+ return dav_svn__new_error(stream->res->pool, HTTP_NOT_IMPLEMENTED, 0, 0,
"Resource body read/write cannot use ranges "
"(at this time)");
}
@@ -3301,7 +3302,7 @@ deliver(const dav_resource *resource, ap
&& resource->type != DAV_RESOURCE_TYPE_WORKING
&& resource->info->restype != DAV_SVN_RESTYPE_PARENTPATH_COLLECTION))
{
- return dav_svn__new_error(resource->pool, HTTP_CONFLICT, 0,
+ return dav_svn__new_error(resource->pool, HTTP_CONFLICT, 0, 0,
"Cannot GET this type of resource.");
}
@@ -3642,7 +3643,8 @@ deliver(const dav_resource *resource, ap
bkt = apr_bucket_eos_create(output->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, bkt);
if ((status = ap_pass_brigade(output, bb)) != APR_SUCCESS)
- return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
+ 0, status,
"Could not write EOS to filter.");
return NULL;
@@ -3689,7 +3691,7 @@ deliver(const dav_resource *resource, ap
"is really a file",
resource->pool);
if (!is_file)
- return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
apr_psprintf(resource->pool,
"the delta base of '%s' does not refer "
"to a file in revision %ld",
@@ -3850,9 +3852,9 @@ deliver(const dav_resource *resource, ap
output->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, bkt);
if ((status = ap_pass_brigade(output, bb)) != APR_SUCCESS) {
- /* ### what to do with status; and that HTTP code... */
+ /* ### that HTTP code... */
return dav_svn__new_error(resource->pool,
- HTTP_INTERNAL_SERVER_ERROR, 0,
+ HTTP_INTERNAL_SERVER_ERROR, 0, status,
"Could not write data to filter.");
}
}
@@ -3862,9 +3864,9 @@ deliver(const dav_resource *resource, ap
bkt = apr_bucket_eos_create(output->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, bkt);
if ((status = ap_pass_brigade(output, bb)) != APR_SUCCESS) {
- /* ### what to do with status; and that HTTP code... */
+ /* ### that HTTP code... */
return dav_svn__new_error(resource->pool,
- HTTP_INTERNAL_SERVER_ERROR, 0,
+ HTTP_INTERNAL_SERVER_ERROR, 0, status,
"Could not write EOS to filter.");
}
@@ -3882,7 +3884,7 @@ create_collection(dav_resource *resource
if (resource->type != DAV_RESOURCE_TYPE_WORKING
&& resource->type != DAV_RESOURCE_TYPE_REGULAR)
{
- return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED, 0,
+ return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED, 0, 0,
"Collections can only be created within a "
"working or regular collection (at this "
"time).");
@@ -3891,7 +3893,7 @@ create_collection(dav_resource *resource
/* ...regular resources allowed only if autoversioning is turned on. */
if (resource->type == DAV_RESOURCE_TYPE_REGULAR
&& ! (resource->info->repos->autoversioning))
- return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED, 0,
+ return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED, 0, 0,
"MKCOL called on regular resource, but "
"autoversioning is not active.");
@@ -3963,12 +3965,12 @@ copy_resource(const dav_resource *src,
a new baseline afterwards. We need to safeguard here that nobody
is calling COPY with the baseline as a Destination! */
if (dst->baselined && dst->type == DAV_RESOURCE_TYPE_VERSION)
- return dav_svn__new_error(src->pool, HTTP_PRECONDITION_FAILED, 0,
+ return dav_svn__new_error(src->pool, HTTP_PRECONDITION_FAILED, 0, 0,
"Illegal: COPY Destination is a baseline.");
if (dst->type == DAV_RESOURCE_TYPE_REGULAR
&& !(dst->info->repos->autoversioning))
- return dav_svn__new_error(dst->pool, HTTP_METHOD_NOT_ALLOWED, 0,
+ return dav_svn__new_error(dst->pool, HTTP_METHOD_NOT_ALLOWED, 0, 0,
"COPY called on regular resource, but "
"autoversioning is not active.");
@@ -3998,7 +4000,7 @@ copy_resource(const dav_resource *src,
if (!serr && (strcmp(src_repos_path, dst_repos_path) != 0))
return dav_svn__new_error_svn(
- dst->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ dst->pool, HTTP_INTERNAL_SERVER_ERROR, 0, 0,
"Copy source and destination are in different repositories");
}
else
@@ -4044,13 +4046,13 @@ remove_resource(dav_resource *resource,
|| resource->type == DAV_RESOURCE_TYPE_ACTIVITY
|| (resource->type == DAV_RESOURCE_TYPE_PRIVATE
&& resource->info->restype == DAV_SVN_RESTYPE_TXN_COLLECTION)))
- return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED, 0,
+ return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED, 0, 0,
"DELETE called on invalid resource type.");
/* ...and regular resources only if autoversioning is turned on. */
if (resource->type == DAV_RESOURCE_TYPE_REGULAR
&& ! (resource->info->repos->autoversioning))
- return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED, 0,
+ return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED, 0, 0,
"DELETE called on regular resource, but "
"autoversioning is not active.");
@@ -4208,7 +4210,7 @@ move_resource(dav_resource *src,
if (src->type != DAV_RESOURCE_TYPE_REGULAR
|| dst->type != DAV_RESOURCE_TYPE_REGULAR
|| !(src->info->repos->autoversioning))
- return dav_svn__new_error(dst->pool, HTTP_METHOD_NOT_ALLOWED, 0,
+ return dav_svn__new_error(dst->pool, HTTP_METHOD_NOT_ALLOWED, 0, 0,
"MOVE only allowed on two public URIs, and "
"autoversioning must be active.");
@@ -4307,7 +4309,7 @@ do_walk(walker_ctx_t *ctx,
/* ### need to allow more walking in the future */
if (params->root->type != DAV_RESOURCE_TYPE_REGULAR)
{
- return dav_svn__new_error(params->pool, HTTP_METHOD_NOT_ALLOWED, 0,
+ return dav_svn__new_error(params->pool, HTTP_METHOD_NOT_ALLOWED, 0, 0,
"Walking the resource hierarchy can only be "
"done on 'regular' resources [at this time].");
}
@@ -4630,7 +4632,7 @@ dav_svn__create_version_resource(dav_res
result = parse_version_uri(comb, uri, NULL, 0);
if (result != 0)
- return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0, 0,
"Could not parse version resource uri.");
err = prep_version(comb);
@@ -4658,11 +4660,11 @@ handle_post_request(request_rec *r,
status = dav_svn__parse_request_skel(&request_skel, r, pool);
if (status != OK)
- return dav_svn__new_error(pool, status, 0,
+ return dav_svn__new_error(pool, status, 0, 0,
"Error parsing skel POST request body.");
if (svn_skel__list_length(request_skel) < 1)
- return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0, 0,
"Unable to identify skel POST request flavor.");
post_skel = request_skel->children;
@@ -4680,7 +4682,7 @@ handle_post_request(request_rec *r,
request_skel, output);
}
- return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0, 0,
"Unsupported skel POST request flavor.");
}
@@ -4733,7 +4735,7 @@ int dav_svn__method_post(request_rec *r)
}
else
{
- derr = dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ derr = dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"Unsupported POST request type.");
}
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/util.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/util.c Fri Sep 11 15:51:30 2015
@@ -46,6 +46,7 @@ dav_error *
dav_svn__new_error(apr_pool_t *pool,
int status,
int error_id,
+ apr_status_t aprerr,
const char *desc)
{
if (error_id == 0)
@@ -59,10 +60,10 @@ dav_svn__new_error(apr_pool_t *pool,
* > 2.2 below perpetuates this.
*/
#if AP_MODULE_MAGIC_AT_LEAST(20091119,0)
- return dav_new_error(pool, status, error_id, 0, desc);
+ return dav_new_error(pool, status, error_id, aprerr, desc);
#else
- errno = 0; /* For the same reason as in dav_svn__new_error_svn */
+ errno = aprerr; /* For the same reason as in dav_svn__new_error_svn */
return dav_new_error(pool, status, error_id, desc);
#endif
@@ -72,20 +73,22 @@ dav_error *
dav_svn__new_error_svn(apr_pool_t *pool,
int status,
int error_id,
+ apr_status_t aprerr,
const char *desc)
{
if (error_id == 0)
error_id = SVN_ERR_RA_DAV_REQUEST_FAILED;
#if AP_MODULE_MAGIC_AT_LEAST(20091119,0)
- return dav_new_error_tag(pool, status, error_id, 0,
+ return dav_new_error_tag(pool, status, error_id, aprerr,
desc, SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
#else
- /* dav_new_error_tag will record errno but Subversion makes no attempt
- to ensure that it is valid. We reset it to avoid putting incorrect
- information into the error log, at the expense of possibly removing
- valid information. */
- errno = 0;
+ /* dav_new_error_tag will record errno so we use it to pass aprerr.
+ This overrwites any existing errno value but since Subversion
+ makes no attempt to avoid system calls after a failed system call
+ there is no guarantee that any existing errno represents a
+ relevant error. */
+ errno = aprerr;
return dav_new_error_tag(pool, status, error_id, desc,
SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
@@ -101,7 +104,7 @@ build_error_chain(apr_pool_t *pool, svn_
char buffer[128];
const char *msg = svn_err_best_message(err, buffer, sizeof(buffer));
- dav_error *derr = dav_svn__new_error_svn(pool, status, err->apr_err,
+ dav_error *derr = dav_svn__new_error_svn(pool, status, err->apr_err, 0,
apr_pstrdup(pool, msg));
if (err->child)
@@ -540,7 +543,7 @@ dav_svn__test_canonical(const char *path
/* Otherwise, generate a generic HTTP_BAD_REQUEST error. */
return dav_svn__new_error_svn(
- pool, HTTP_BAD_REQUEST, 0,
+ pool, HTTP_BAD_REQUEST, 0, 0,
apr_psprintf(pool,
"Path '%s' is not canonicalized; "
"there is a problem with the client.", path));
@@ -658,7 +661,7 @@ dav_svn__final_flush_or_error(request_re
{
apr_status_t apr_err = ap_fflush(output, bb);
if (apr_err && (! derr))
- derr = dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ derr = dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0, apr_err,
"Error flushing brigade.");
}
return derr;
@@ -743,7 +746,7 @@ request_body_to_string(svn_string_t **re
int seen_eos;
apr_status_t status;
apr_off_t total_read = 0;
- apr_off_t limit_req_body = ap_get_limit_req_body(r);
+ apr_off_t limit_req_body = ap_get_limit_xml_body(r);
int result = HTTP_BAD_REQUEST;
const char *content_length_str;
char *endp;
Modified: subversion/branches/reuse-ra-session/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/mod_dav_svn/version.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/reuse-ra-session/subversion/mod_dav_svn/version.c Fri Sep 11 15:51:30 2015
@@ -88,7 +88,7 @@ set_auto_revprops(dav_resource *resource
if (! (resource->type == DAV_RESOURCE_TYPE_WORKING
&& resource->info->auto_checked_out))
- return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0, 0,
"Set_auto_revprops called on invalid resource.");
if ((serr = dav_svn__attach_auto_revprops(resource->info->root.txn,
@@ -396,14 +396,14 @@ vsn_control(dav_resource *resource, cons
/* All mod_dav_svn resources are versioned objects; so it doesn't
make sense to call vsn_control on a resource that exists . */
if (resource->exists)
- return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+ return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
"vsn_control called on already-versioned "
"resource.");
/* Only allow a NULL target, which means an create an 'empty' VCR. */
if (target != NULL)
return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
- SVN_ERR_UNSUPPORTED_FEATURE,
+ SVN_ERR_UNSUPPORTED_FEATURE, 0,
"vsn_control called with non-null target");
/* This is kind of silly. The docstring for this callback says it's
@@ -451,13 +451,13 @@ dav_svn__checkout(dav_resource *resource
if (resource->type != DAV_RESOURCE_TYPE_REGULAR)
return dav_svn__new_error_svn(resource->pool, HTTP_METHOD_NOT_ALLOWED,
- SVN_ERR_UNSUPPORTED_FEATURE,
+ SVN_ERR_UNSUPPORTED_FEATURE, 0,
"auto-checkout attempted on non-regular "
"version-controlled resource");
if (resource->baselined)
return dav_svn__new_error_svn(resource->pool, HTTP_METHOD_NOT_ALLOWED,
- SVN_ERR_UNSUPPORTED_FEATURE,
+ SVN_ERR_UNSUPPORTED_FEATURE, 0,
"auto-checkout attempted on baseline "
"collection, which is not supported");
@@ -503,7 +503,7 @@ dav_svn__checkout(dav_resource *resource
shared_activity);
if (! shared_txn_name)
return dav_svn__new_error(resource->pool,
- HTTP_INTERNAL_SERVER_ERROR, 0,
+ HTTP_INTERNAL_SERVER_ERROR, 0, 0,
"Cannot look up a txn_name by activity");
}
@@ -542,21 +542,21 @@ dav_svn__checkout(dav_resource *resource
if (resource->type != DAV_RESOURCE_TYPE_VERSION)
{
return dav_svn__new_error_svn(resource->pool, HTTP_METHOD_NOT_ALLOWED,
- SVN_ERR_UNSUPPORTED_FEATURE,
+ SVN_ERR_UNSUPPORTED_FEATURE, 0,
"CHECKOUT can only be performed on a "
"version resource");
}
if (create_activity)
{
return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
- SVN_ERR_UNSUPPORTED_FEATURE,
+ SVN_ERR_UNSUPPORTED_FEATURE, 0,
"CHECKOUT cannot create an activity at "
"this time. Use MKACTIVITY first");
}
if (is_unreserved)
{
return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
- SVN_ERR_UNSUPPORTED_FEATURE,
+ SVN_ERR_UNSUPPORTED_FEATURE, 0,
"Unreserved checkouts are not yet "
"available. A version history may not be "
"checked out more than once, into a "
@@ -565,7 +565,7 @@ dav_svn__checkout(dav_resource *resource
if (activities == NULL)
{
return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
- SVN_ERR_INCOMPLETE_DATA,
+ SVN_ERR_INCOMPLETE_DATA, 0,
"An activity must be provided for "
"checkout");
}
@@ -573,7 +573,7 @@ dav_svn__checkout(dav_resource *resource
if (activities->nelts != 1)
{
return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
- SVN_ERR_INCORRECT_PARAMS,
+ SVN_ERR_INCORRECT_PARAMS, 0,
"Only one activity may be specified within "
"the CHECKOUT");
}
@@ -592,7 +592,7 @@ dav_svn__checkout(dav_resource *resource
if (parse.activity_id == NULL)
{
return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
- SVN_ERR_INCORRECT_PARAMS,
+ SVN_ERR_INCORRECT_PARAMS, 0,
"The provided href is not an activity URI");
}
@@ -600,7 +600,7 @@ dav_svn__checkout(dav_resource *resource
parse.activity_id)) == NULL)
{
return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
- SVN_ERR_APMOD_ACTIVITY_NOT_FOUND,
+ SVN_ERR_APMOD_ACTIVITY_NOT_FOUND, 0,
"The specified activity does not exist");
}
@@ -630,7 +630,7 @@ dav_svn__checkout(dav_resource *resource
if (resource->info->root.rev != youngest)
{
return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
- SVN_ERR_APMOD_BAD_BASELINE,
+ SVN_ERR_APMOD_BAD_BASELINE, 0,
"The specified baseline is not the "
"latest baseline, so it may not be "
"checked out");
@@ -728,7 +728,7 @@ dav_svn__checkout(dav_resource *resource
/* The item being modified is older than the one in the
transaction. The client is out of date. */
return dav_svn__new_error_svn
- (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT,
+ (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT, 0,
"resource out of date; try updating");
}
else if (resource->info->root.rev > txn_created_rev)
@@ -745,7 +745,7 @@ dav_svn__checkout(dav_resource *resource
resource->pool)))
{
err = dav_svn__new_error_svn
- (resource->pool, HTTP_CONFLICT, serr->apr_err,
+ (resource->pool, HTTP_CONFLICT, serr->apr_err, 0,
"Unable to fetch the node revision id of the version "
"resource within the revision");
svn_error_clear(serr);
@@ -754,7 +754,7 @@ dav_svn__checkout(dav_resource *resource
if (node_relation != svn_fs_node_unchanged)
{
return dav_svn__new_error_svn
- (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT,
+ (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT, 0,
"version resource newer than txn (restart the commit)");
}
}
@@ -773,7 +773,7 @@ uncheckout(dav_resource *resource)
{
if (resource->type != DAV_RESOURCE_TYPE_WORKING)
return dav_svn__new_error_svn(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
- SVN_ERR_UNSUPPORTED_FEATURE,
+ SVN_ERR_UNSUPPORTED_FEATURE, 0,
"UNCHECKOUT called on non-working resource");
/* Try to abort the txn if it exists; but don't try too hard. :-) */
@@ -914,7 +914,7 @@ dav_svn__checkin(dav_resource *resource,
if (resource->type != DAV_RESOURCE_TYPE_WORKING)
return dav_svn__new_error_svn(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
- SVN_ERR_UNSUPPORTED_FEATURE,
+ SVN_ERR_UNSUPPORTED_FEATURE, 0,
"CHECKIN called on non-working resource");
/* If the global autoversioning activity still exists, that means
@@ -940,19 +940,22 @@ dav_svn__checkin(dav_resource *resource,
shared_txn_name = dav_svn__get_txn(resource->info->repos,
shared_activity);
if (! shared_txn_name)
- return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
+ 0, 0,
"Cannot look up a txn_name by activity");
/* Sanity checks */
if (resource->info->root.txn_name
&& (strcmp(shared_txn_name, resource->info->root.txn_name) != 0))
- return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
+ 0, 0,
"Internal txn_name doesn't match "
"autoversioning transaction.");
if (! resource->info->root.txn)
/* should already be open by checkout */
- return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+ return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
+ 0, 0,
"Autoversioning txn isn't open "
"when it should be.");
@@ -1018,7 +1021,7 @@ dav_svn__checkin(dav_resource *resource,
{
return dav_svn__new_error(resource->pool,
HTTP_INTERNAL_SERVER_ERROR,
- 0,
+ 0, 0,
"Commit failed but there was no error "
"provided.");
}
@@ -1151,7 +1154,7 @@ deliver_report(request_rec *r,
/* ### what is a good error for an unknown report? */
return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
- SVN_ERR_UNSUPPORTED_FEATURE,
+ SVN_ERR_UNSUPPORTED_FEATURE, 0,
"The requested report is unknown");
}
@@ -1180,7 +1183,7 @@ make_activity(dav_resource *resource)
case an older mod_dav doesn't do the check for us. */
if (! can_be_activity(resource))
return dav_svn__new_error_svn(resource->pool, HTTP_FORBIDDEN,
- SVN_ERR_APMOD_MALFORMED_URI,
+ SVN_ERR_APMOD_MALFORMED_URI, 0,
"Activities cannot be created at that "
"location; query the "
"DAV:activity-collection-set property");
@@ -1428,7 +1431,7 @@ merge(dav_resource *target,
&& source->info->restype == DAV_SVN_RESTYPE_TXN_COLLECTION)))
{
return dav_svn__new_error_svn(pool, HTTP_METHOD_NOT_ALLOWED,
- SVN_ERR_INCORRECT_PARAMS,
+ SVN_ERR_INCORRECT_PARAMS, 0,
"MERGE can only be performed using an "
"activity or transaction resource as the "
"source");
@@ -1436,7 +1439,7 @@ merge(dav_resource *target,
if (! source->exists)
{
return dav_svn__new_error_svn(pool, HTTP_METHOD_NOT_ALLOWED,
- SVN_ERR_INCORRECT_PARAMS,
+ SVN_ERR_INCORRECT_PARAMS, 0,
"MERGE activity or transaction resource "
"does not exist");
}
@@ -1533,7 +1536,7 @@ merge(dav_resource *target,
{
return dav_svn__new_error(pool,
HTTP_INTERNAL_SERVER_ERROR,
- 0,
+ 0, 0,
"Commit failed but there was no error "
"provided.");
}
Modified: subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.c Fri Sep 11 15:51:30 2015
@@ -229,7 +229,7 @@ operation_str(svn_wc_operation_t operati
svn_error_t *
svn_cl__get_human_readable_prop_conflict_description(
const char **desc,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_client_conflict_t *conflict,
apr_pool_t *pool)
{
const char *reason_str, *action_str;
@@ -288,7 +288,7 @@ svn_cl__get_human_readable_prop_conflict
svn_error_t *
svn_cl__get_human_readable_tree_conflict_description(
const char **desc,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_client_conflict_t *conflict,
apr_pool_t *pool)
{
const char *action, *reason, *operation;
@@ -301,32 +301,26 @@ svn_cl__get_human_readable_tree_conflict
conflict_action = svn_client_conflict_get_incoming_change(conflict);
conflict_reason = svn_client_conflict_get_local_change(conflict);
conflict_operation = svn_client_conflict_get_operation(conflict);
- conflict_node_kind = svn_client_conflict_get_node_kind(conflict);
+ conflict_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict);
/* Determine the node kind of the incoming change. */
incoming_kind = svn_node_unknown;
if (conflict_action == svn_wc_conflict_action_edit ||
conflict_action == svn_wc_conflict_action_delete)
{
- const svn_wc_conflict_version_t *src_left_version;
-
/* Change is acting on 'src_left' version of the node. */
- src_left_version = svn_client_conflict_get_src_left_version(conflict);
- if (src_left_version)
- incoming_kind = src_left_version->node_kind;
+ SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
+ NULL, NULL, &incoming_kind, conflict, pool, pool));
}
else if (conflict_action == svn_wc_conflict_action_add ||
conflict_action == svn_wc_conflict_action_replace)
{
- const svn_wc_conflict_version_t *src_right_version;
-
/* Change is acting on 'src_right' version of the node.
*
* ### For 'replace', the node kind is ambiguous. However, src_left
* ### is NULL for replace, so we must use src_right. */
- src_right_version = svn_client_conflict_get_src_right_version(conflict);
- if (src_right_version)
- incoming_kind = src_right_version->node_kind;
+ SVN_ERR(svn_client_conflict_get_incoming_new_repos_location(
+ NULL, NULL, &incoming_kind, conflict, pool, pool));
}
reason = local_reason_str(conflict_node_kind, conflict_reason,
@@ -380,13 +374,16 @@ svn_cl__get_human_readable_action_descri
/* Helper for svn_cl__append_tree_conflict_info_xml().
- * Appends the attributes of the given VERSION to ATT_HASH.
+ * Appends the repository location of a conflicted node to ATT_HASH.
* SIDE is the content of the version tag's side="..." attribute,
* currently one of "source-left" or "source-right".*/
static svn_error_t *
add_conflict_version_xml(svn_stringbuf_t **pstr,
const char *side,
- const svn_wc_conflict_version_t *version,
+ const char *repos_root_url,
+ const char *repos_relpath,
+ svn_revnum_t peg_rev,
+ svn_node_kind_t node_kind,
apr_pool_t *pool)
{
apr_hash_t *att_hash = apr_hash_make(pool);
@@ -394,18 +391,17 @@ add_conflict_version_xml(svn_stringbuf_t
svn_hash_sets(att_hash, "side", side);
- if (version->repos_url)
- svn_hash_sets(att_hash, "repos-url", version->repos_url);
+ if (repos_root_url)
+ svn_hash_sets(att_hash, "repos-url", repos_root_url);
- if (version->path_in_repos)
- svn_hash_sets(att_hash, "path-in-repos", version->path_in_repos);
+ if (repos_relpath)
+ svn_hash_sets(att_hash, "path-in-repos", repos_relpath);
- if (SVN_IS_VALID_REVNUM(version->peg_rev))
- svn_hash_sets(att_hash, "revision", apr_ltoa(pool, version->peg_rev));
+ if (SVN_IS_VALID_REVNUM(peg_rev))
+ svn_hash_sets(att_hash, "revision", apr_ltoa(pool, peg_rev));
- if (version->node_kind != svn_node_unknown)
- svn_hash_sets(att_hash, "kind",
- svn_cl__node_kind_str_xml(version->node_kind));
+ if (node_kind != svn_node_unknown)
+ svn_hash_sets(att_hash, "kind", svn_cl__node_kind_str_xml(node_kind));
svn_xml_make_open_tag_hash(pstr, pool, svn_xml_self_closing,
"version", att_hash);
@@ -415,13 +411,15 @@ add_conflict_version_xml(svn_stringbuf_t
static svn_error_t *
append_tree_conflict_info_xml(svn_stringbuf_t *str,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_client_conflict_t *conflict,
apr_pool_t *pool)
{
apr_hash_t *att_hash = apr_hash_make(pool);
const char *tmp;
- const svn_wc_conflict_version_t *src_left_version;
- const svn_wc_conflict_version_t *src_right_version;
+ const char *repos_root_url;
+ const char *repos_relpath;
+ svn_revnum_t peg_rev;
+ svn_node_kind_t node_kind;
svn_hash_sets(att_hash, "victim",
svn_dirent_basename(
@@ -429,7 +427,7 @@ append_tree_conflict_info_xml(svn_string
svn_hash_sets(att_hash, "kind",
svn_cl__node_kind_str_xml(
- svn_client_conflict_get_node_kind(conflict)));
+ svn_client_conflict_tree_get_victim_node_kind(conflict)));
svn_hash_sets(att_hash, "operation",
svn_cl__operation_str_xml(
@@ -449,19 +447,30 @@ append_tree_conflict_info_xml(svn_string
/* Add child tags for OLDER_VERSION and THEIR_VERSION. */
- src_left_version = svn_client_conflict_get_src_left_version(conflict);
- if (src_left_version)
- SVN_ERR(add_conflict_version_xml(&str,
- "source-left",
- src_left_version,
- pool));
-
- src_right_version = svn_client_conflict_get_src_right_version(conflict);
- if (src_right_version)
+ SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict,
+ pool, pool));
+ SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(&repos_relpath,
+ &peg_rev,
+ &node_kind,
+ conflict,
+ pool,
+ pool));
+ if (repos_root_url && repos_relpath)
+ SVN_ERR(add_conflict_version_xml(&str, "source-left",
+ repos_root_url, repos_relpath, peg_rev,
+ node_kind, pool));
+
+ SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(&repos_relpath,
+ &peg_rev,
+ &node_kind,
+ conflict,
+ pool,
+ pool));
+ if (repos_root_url && repos_relpath)
SVN_ERR(add_conflict_version_xml(&str,
"source-right",
- src_right_version,
- pool));
+ repos_root_url, repos_relpath, peg_rev,
+ node_kind, pool));
svn_xml_make_close_tag(&str, pool, "tree-conflict");
@@ -470,15 +479,17 @@ append_tree_conflict_info_xml(svn_string
svn_error_t *
svn_cl__append_conflict_info_xml(svn_stringbuf_t *str,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_client_conflict_t *conflict,
apr_pool_t *scratch_pool)
{
apr_hash_t *att_hash;
const char *kind;
svn_wc_conflict_kind_t conflict_kind;
svn_wc_operation_t conflict_operation;
- const svn_wc_conflict_version_t *src_left_version;
- const svn_wc_conflict_version_t *src_right_version;
+ const char *repos_root_url;
+ const char *repos_relpath;
+ svn_revnum_t peg_rev;
+ svn_node_kind_t node_kind;
conflict_kind = svn_client_conflict_get_kind(conflict);
conflict_operation = svn_client_conflict_get_operation(conflict);
@@ -507,45 +518,66 @@ svn_cl__append_conflict_info_xml(svn_str
svn_xml_make_open_tag_hash(&str, scratch_pool,
svn_xml_normal, "conflict", att_hash);
- src_left_version = svn_client_conflict_get_src_left_version(conflict);
- if (src_left_version)
- SVN_ERR(add_conflict_version_xml(&str,
- "source-left",
- src_left_version,
- scratch_pool));
-
- src_right_version = svn_client_conflict_get_src_right_version(conflict);
- if (src_right_version)
- SVN_ERR(add_conflict_version_xml(&str,
- "source-right",
- src_right_version,
- scratch_pool));
+ SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict,
+ scratch_pool, scratch_pool));
+ SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(&repos_relpath,
+ &peg_rev,
+ &node_kind,
+ conflict,
+ scratch_pool,
+ scratch_pool));
+ if (repos_root_url && repos_relpath)
+ SVN_ERR(add_conflict_version_xml(&str, "source-left",
+ repos_root_url, repos_relpath, peg_rev,
+ node_kind, scratch_pool));
+
+ SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(&repos_relpath,
+ &peg_rev,
+ &node_kind,
+ conflict,
+ scratch_pool,
+ scratch_pool));
+ if (repos_root_url && repos_relpath)
+ SVN_ERR(add_conflict_version_xml(&str, "source-right",
+ repos_root_url, repos_relpath, peg_rev,
+ node_kind, scratch_pool));
switch (conflict_kind)
{
+ const char *base_abspath;
+ const char *my_abspath;
+ const char *their_abspath;
+
case svn_wc_conflict_kind_text:
+ SVN_ERR(svn_client_conflict_text_get_contents(NULL, &my_abspath,
+ &base_abspath,
+ &their_abspath,
+ conflict, scratch_pool,
+ scratch_pool));
/* "<prev-base-file> xx </prev-base-file>" */
svn_cl__xml_tagged_cdata(
- &str, scratch_pool, "prev-base-file",
- svn_client_conflict_get_base_abspath(conflict));
+ &str, scratch_pool, "prev-base-file", base_abspath);
/* "<prev-wc-file> xx </prev-wc-file>" */
svn_cl__xml_tagged_cdata(
- &str, scratch_pool, "prev-wc-file",
- svn_client_conflict_get_my_abspath(conflict));
+ &str, scratch_pool, "prev-wc-file", my_abspath);
/* "<cur-base-file> xx </cur-base-file>" */
svn_cl__xml_tagged_cdata(
- &str, scratch_pool, "cur-base-file",
- svn_client_conflict_get_their_abspath(conflict));
+ &str, scratch_pool, "cur-base-file", their_abspath);
break;
case svn_wc_conflict_kind_property:
- /* "<prop-file> xx </prop-file>" */
- svn_cl__xml_tagged_cdata(
- &str, scratch_pool, "prop-file",
- svn_client_conflict_get_their_abspath(conflict));
+ {
+ const char *reject_abspath;
+
+ /* "<prop-file> xx </prop-file>" */
+ reject_abspath =
+ svn_client_conflict_prop_get_reject_abspath(conflict);
+ svn_cl__xml_tagged_cdata(
+ &str, scratch_pool, "prop-file", reject_abspath);
+ }
break;
default:
Modified: subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.h?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.h (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.h Fri Sep 11 15:51:30 2015
@@ -31,6 +31,7 @@
#include "svn_types.h"
#include "svn_string.h"
+#include "svn_client.h"
#include "svn_wc.h"
#ifdef __cplusplus
@@ -48,7 +49,7 @@ extern "C" {
svn_error_t *
svn_cl__get_human_readable_prop_conflict_description(
const char **desc,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_client_conflict_t *conflict,
apr_pool_t *pool);
/**
@@ -60,7 +61,7 @@ svn_cl__get_human_readable_prop_conflict
svn_error_t *
svn_cl__get_human_readable_tree_conflict_description(
const char **desc,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_client_conflict_t *conflict,
apr_pool_t *pool);
/* Like svn_cl__get_human_readable_tree_conflict_description but
@@ -80,7 +81,7 @@ svn_cl__get_human_readable_action_descri
svn_error_t *
svn_cl__append_conflict_info_xml(
svn_stringbuf_t *str,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_client_conflict_t *conflict,
apr_pool_t *pool);
#ifdef __cplusplus
Modified: subversion/branches/reuse-ra-session/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/cl.h?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/cl.h (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/cl.h Fri Sep 11 15:51:30 2015
@@ -777,15 +777,18 @@ svn_cl__args_to_target_array_print_reser
svn_boolean_t keep_dest_origpath_on_truepath_collision,
apr_pool_t *pool);
-/* Return a string showing NODE's kind, URL and revision, to the extent that
- * that information is available in NODE. If NODE itself is NULL, this prints
- * just a 'none' node kind.
+/* Return a string showing a conflicted node's kind, URL and revision,
+ * to the extent that that information is available. If REPOS_ROOT_URL or
+ * REPOS_RELPATH are NULL, this prints just a 'none' node kind.
* WC_REPOS_ROOT_URL should reflect the target working copy's repository
- * root URL. If NODE is from that same URL, the printed URL is abbreviated
+ * root URL. If the node is from that same URL, the printed URL is abbreviated
* to caret notation (^/). WC_REPOS_ROOT_URL may be NULL, in which case
* this function tries to print the conflicted node's complete URL. */
const char *
-svn_cl__node_description(const svn_wc_conflict_version_t *node,
+svn_cl__node_description(const char *repos_root_url,
+ const char *repos_relpath,
+ svn_revnum_t peg_rev,
+ svn_node_kind_t node_kind,
const char *wc_repos_root_URL,
apr_pool_t *pool);