You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/27 11:51:53 UTC
svn commit: r1655005 [1/3] - in /subversion/branches/pin-externals: ./
subversion/libsvn_fs_fs/ subversion/libsvn_ra_serf/
subversion/libsvn_repos/ subversion/libsvn_subr/ subversion/libsvn_wc/
subversion/mod_dav_svn/ subversion/svnrdump/ subversion/te...
Author: stsp
Date: Tue Jan 27 10:51:52 2015
New Revision: 1655005
URL: http://svn.apache.org/r1655005
Log:
On the pin-externals branch, merge outstanding changes from trunk.
Modified:
subversion/branches/pin-externals/ (props changed)
subversion/branches/pin-externals/COMMITTERS
subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/pin-externals/subversion/libsvn_fs_fs/structure
subversion/branches/pin-externals/subversion/libsvn_fs_fs/transaction.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/blame.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.h
subversion/branches/pin-externals/subversion/libsvn_ra_serf/commit.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_deleted_rev.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/getdate.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocations.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocationsegments.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocks.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/inherited_props.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/log.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/merge.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/mergeinfo.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/multistatus.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/property.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/ra_serf.h
subversion/branches/pin-externals/subversion/libsvn_ra_serf/replay.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/serf.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/stat.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/update.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/util.c
subversion/branches/pin-externals/subversion/libsvn_ra_serf/xml.c
subversion/branches/pin-externals/subversion/libsvn_repos/dump.c
subversion/branches/pin-externals/subversion/libsvn_subr/checksum.c
subversion/branches/pin-externals/subversion/libsvn_wc/wc_db.c
subversion/branches/pin-externals/subversion/mod_dav_svn/liveprops.c
subversion/branches/pin-externals/subversion/svnrdump/dump_editor.c
subversion/branches/pin-externals/subversion/tests/cmdline/prop_tests.py
subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
subversion/branches/pin-externals/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh
subversion/branches/pin-externals/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
Propchange: subversion/branches/pin-externals/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 27 10:51:52 2015
@@ -85,4 +85,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1643755-1654573
+/subversion/trunk:1643755-1655004
Modified: subversion/branches/pin-externals/COMMITTERS
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/COMMITTERS?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/COMMITTERS [UTF-8] (original)
+++ subversion/branches/pin-externals/COMMITTERS [UTF-8] Tue Jan 27 10:51:52 2015
@@ -164,7 +164,7 @@ Commit access for specific areas:
humbedooh Daniel Gruno <hu...@apache.org> (svnpubsub)
prabhugs Prabhu Gnana Sundar <pp...@gmail.com> (verify-keep-going)
schabi Markus Schaber <sc...@apache.org> (testsuite)
- gbg Gabriela Gibson <ga...@gmail.com> (gtest)
+ gbg Gabriela Gibson <ga...@gmail.com> (gtest)
Translation of message files:
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs_fs.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/fs_fs.c Tue Jan 27 10:51:52 2015
@@ -26,6 +26,7 @@
#include "svn_private_config.h"
+#include "svn_checksum.h"
#include "svn_hash.h"
#include "svn_props.h"
#include "svn_time.h"
@@ -1370,10 +1371,45 @@ svn_fs_fs__file_length(svn_filesize_t *l
node_revision_t *noderev,
apr_pool_t *pool)
{
- if (noderev->data_rep)
- *length = noderev->data_rep->expanded_size;
+ representation_t *data_rep = noderev->data_rep;
+ if (!data_rep)
+ {
+ /* Treat "no representation" as "empty file". */
+ *length = 0;
+ }
+ else if (data_rep->expanded_size)
+ {
+ /* Standard case: a non-empty file. */
+ *length = data_rep->expanded_size;
+ }
else
- *length = 0;
+ {
+ /* Work around a FSFS format quirk (see issue #4554).
+
+ A plain representation may specify its EXPANDED LENGTH as "0"
+ in which case, the SIZE value is what we want.
+
+ Because EXPANDED_LENGTH will also be 0 for empty files, while
+ SIZE is non-null, we need to check wether the content is
+ actually empty. We simply compare with the MD5 checksum of
+ empty content (sha-1 is not always available).
+ */
+ svn_checksum_t *empty_md5
+ = svn_checksum_empty_checksum(svn_checksum_md5, pool);
+
+ if (memcmp(empty_md5->digest, data_rep->md5_digest,
+ sizeof(data_rep->md5_digest)))
+ {
+ /* Contents is not empty, i.e. EXPANDED_LENGTH cannot be the
+ actual file length. */
+ *length = data_rep->size;
+ }
+ else
+ {
+ /* Contents is empty. */
+ *length = 0;
+ }
+ }
return SVN_NO_ERROR;
}
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/structure
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/structure?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/structure (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/structure Tue Jan 27 10:51:52 2015
@@ -560,8 +560,7 @@ defined:
props "<rev> <item_index> <length> <size> <digest>" for props rep
<rev> and <item_index> give location of rep
<length> gives length of rep, sans header and trailer
- <size> gives size of expanded rep; for props only, it may be 0
- if equal to the length
+ <size> gives size of expanded rep (*)
<digest> gives hex MD5 digest of expanded rep
### in formats >=4, also present:
<sha1-digest> gives hex SHA1 digest of expanded rep
@@ -573,6 +572,15 @@ defined:
which have svn:mergeinfo.
minfo-here Exists if this node itself has svn:mergeinfo.
+(*) Earlier versions of this document would state that <size> may be 0
+ if the actual value matches <length>. This is only true for property
+ and directory representations and should be avoided in general. File
+ representations may not be handled correctly by SVN before 1.7.20,
+ 1.8.12 and 1.9.0, if they have 0 <size> fields for non-empty contents.
+ Releases 1.8.0 through 1.8.11 may have falsely created instances of
+ that (see issue #4554). Finally, 0 <size> fields are NEVER legal for
+ DELTA representations.
+
The predecessor of a node-rev crosses both soft and true copies;
together with the count field, it allows efficient determination of
the base for skip-deltas. The first node-rev of a node contains no
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/transaction.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/transaction.c Tue Jan 27 10:51:52 2015
@@ -2210,10 +2210,21 @@ get_shared_rep(representation_t **old_re
}
}
- /* Add information that is missing in the cached data. */
- if (*old_rep)
+ if (!*old_rep)
+ return SVN_NO_ERROR;
+
+ /* We don't want 0-length PLAIN representations to replace non-0-length
+ ones (see issue #4554). Also, this doubles as a simple guard against
+ general rep-cache induced corruption. */
+ if ( ((*old_rep)->expanded_size != rep->expanded_size)
+ || ((*old_rep)->size != rep->size))
+ {
+ *old_rep = NULL;
+ }
+ else
{
- /* Use the old rep for this content. */
+ /* Add information that is missing in the cached data.
+ Use the old rep for this content. */
memcpy((*old_rep)->md5_digest, rep->md5_digest, sizeof(rep->md5_digest));
(*old_rep)->uniquifier = rep->uniquifier;
}
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/blame.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/blame.c Tue Jan 27 10:51:52 2015
@@ -352,7 +352,7 @@ svn_ra_serf__get_file_revs(svn_ra_sessio
peg_rev = start;
SVN_ERR(svn_ra_serf__get_stable_url(&req_url, NULL /* latest_revnum */,
- session, NULL /* conn */,
+ session,
NULL /* url */, peg_rev,
pool, pool));
@@ -362,15 +362,13 @@ svn_ra_serf__get_file_revs(svn_ra_sessio
blame_cdata,
blame_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL, pool);
handler->method = "REPORT";
handler->path = req_url;
handler->body_type = "text/xml";
handler->body_delegate = create_file_revs_body;
handler->body_delegate_baton = blame_ctx;
- handler->conn = session->conns[0];
- handler->session = session;
SVN_ERR(svn_ra_serf__context_run_one(handler, pool));
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.c Tue Jan 27 10:51:52 2015
@@ -112,7 +112,7 @@ svn_ra_serf__blncache_set(svn_ra_serf__b
const char *baseline_url,
svn_revnum_t revision,
const char *bc_url,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
if (bc_url && SVN_IS_VALID_REVNUM(revision))
{
@@ -147,11 +147,11 @@ svn_error_t *
svn_ra_serf__blncache_get_bc_url(const char **bc_url_p,
svn_ra_serf__blncache_t *blncache,
svn_revnum_t revnum,
- apr_pool_t *pool)
+ apr_pool_t *result_pool)
{
const char *value = apr_hash_get(blncache->revnum_to_bc,
&revnum, sizeof(revnum));
- *bc_url_p = value ? apr_pstrdup(pool, value) : NULL;
+ *bc_url_p = value ? apr_pstrdup(result_pool, value) : NULL;
return SVN_NO_ERROR;
}
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.h
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.h?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.h (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/blncache.h Tue Jan 27 10:51:52 2015
@@ -59,7 +59,7 @@ svn_ra_serf__blncache_set(svn_ra_serf__b
const char *baseline_url,
svn_revnum_t revnum,
const char *bc_url,
- apr_pool_t *pool);
+ apr_pool_t *scratch_pool);
/* Sets *BC_URL_P with a pointer to baseline collection URL for the given
* REVNUM. *BC_URL_P will be NULL if cache doesn't have information about
@@ -69,7 +69,7 @@ svn_error_t *
svn_ra_serf__blncache_get_bc_url(const char **bc_url_p,
svn_ra_serf__blncache_t *blncache,
svn_revnum_t revnum,
- apr_pool_t *pool);
+ apr_pool_t *result_pool);
/* Sets *BC_URL_P with pointer to baseline collection URL and *REVISION_P
* with revision number of baseline BASELINE_URL. *BC_URL_P will be NULL,
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/commit.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/commit.c Tue Jan 27 10:51:52 2015
@@ -51,7 +51,6 @@ typedef struct commit_context_t {
apr_pool_t *pool;
svn_ra_serf__session_t *session;
- svn_ra_serf__connection_t *conn;
apr_hash_t *revprop_table;
@@ -264,9 +263,7 @@ checkout_node(const char **working_url,
/* HANDLER_POOL is the scratch pool since we don't need to remember
anything from the handler. We just want the working resource. */
- handler = svn_ra_serf__create_handler(scratch_pool);
- handler->session = commit_ctx->session;
- handler->conn = commit_ctx->conn;
+ handler = svn_ra_serf__create_handler(commit_ctx->session, scratch_pool);
handler->body_delegate = create_checkout_body;
handler->body_delegate_baton = (/* const */ void *)commit_ctx->activity_url;
@@ -456,7 +453,6 @@ get_version_url(const char **checked_in_
else
{
const char *propfind_url;
- svn_ra_serf__connection_t *conn = session->conns[0];
if (SVN_IS_VALID_REVNUM(base_revision))
{
@@ -465,10 +461,9 @@ get_version_url(const char **checked_in_
this lookup, so we'll do things the hard(er) way, by
looking up the version URL from a resource in the
baseline collection. */
- /* ### conn==NULL for session->conns[0]. same as CONN. */
SVN_ERR(svn_ra_serf__get_stable_url(&propfind_url,
NULL /* latest_revnum */,
- session, NULL /* conn */,
+ session,
NULL /* url */, base_revision,
scratch_pool, scratch_pool));
}
@@ -477,8 +472,8 @@ get_version_url(const char **checked_in_
propfind_url = session->session_url.path;
}
- SVN_ERR(svn_ra_serf__fetch_dav_prop(&root_checkout,
- conn, propfind_url, base_revision,
+ SVN_ERR(svn_ra_serf__fetch_dav_prop(&root_checkout, session,
+ propfind_url, base_revision,
"checked-in",
scratch_pool, scratch_pool));
if (!root_checkout)
@@ -750,8 +745,6 @@ create_proppatch_body(serf_bucket_t **bk
svn_boolean_t opened = FALSE;
apr_hash_index_t *hi;
- scratch_pool = pool; /*### Should be disabled, but needs review! */
-
body_bkt = serf_bucket_aggregate_create(alloc);
svn_ra_serf__add_xml_header_buckets(body_bkt, alloc);
@@ -782,7 +775,7 @@ create_proppatch_body(serf_bucket_t **bk
}
SVN_ERR(write_prop_xml(ctx, body_bkt, alloc, prop,
- scratch_pool, scratch_pool));
+ pool, scratch_pool));
}
}
@@ -814,7 +807,7 @@ create_proppatch_body(serf_bucket_t **bk
}
SVN_ERR(write_prop_xml(ctx, body_bkt, alloc, prop,
- scratch_pool, scratch_pool));
+ pool, scratch_pool));
}
}
@@ -832,19 +825,16 @@ create_proppatch_body(serf_bucket_t **bk
static svn_error_t*
proppatch_resource(svn_ra_serf__session_t *session,
- svn_ra_serf__connection_t *conn,
proppatch_context_t *proppatch,
apr_pool_t *pool)
{
svn_ra_serf__handler_t *handler;
svn_error_t *err;
- handler = svn_ra_serf__create_handler(pool);
+ handler = svn_ra_serf__create_handler(session, pool);
handler->method = "PROPPATCH";
handler->path = proppatch->path;
- handler->conn = conn;
- handler->session = session;
handler->header_delegate = setup_proppatch_headers;
handler->header_delegate_baton = proppatch;
@@ -1268,7 +1258,7 @@ open_root(void *edit_baton,
"create-txn-with-props"));
/* Create our activity URL now on the server. */
- handler = svn_ra_serf__create_handler(scratch_pool);
+ handler = svn_ra_serf__create_handler(commit_ctx->session, scratch_pool);
handler->method = "POST";
handler->body_type = SVN_SKEL_MIME_TYPE;
@@ -1278,8 +1268,6 @@ open_root(void *edit_baton,
handler->header_delegate = setup_post_headers;
handler->header_delegate_baton = NULL;
handler->path = commit_ctx->session->me_resource;
- handler->conn = commit_ctx->session->conns[0];
- handler->session = commit_ctx->session;
prc = apr_pcalloc(scratch_pool, sizeof(*prc));
prc->handler = handler;
@@ -1304,7 +1292,7 @@ open_root(void *edit_baton,
SVN_ERR(svn_ra_serf__get_relative_path(
&rel_path,
commit_ctx->session->session_url.path,
- commit_ctx->session, NULL,
+ commit_ctx->session,
scratch_pool));
commit_ctx->txn_root_url = svn_path_url_add_component2(
commit_ctx->txn_root_url,
@@ -1331,21 +1319,8 @@ open_root(void *edit_baton,
if (!activity_str)
SVN_ERR(svn_ra_serf__v1_get_activity_collection(
&activity_str,
- commit_ctx->session->conns[0],
- commit_ctx->pool, scratch_pool));
-
- /* Cache the result. */
- if (activity_str)
- {
- commit_ctx->session->activity_collection_url =
- apr_pstrdup(commit_ctx->session->pool, activity_str);
- }
- else
- {
- return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
- _("The OPTIONS response did not include the "
- "requested activity-collection-set value"));
- }
+ commit_ctx->session,
+ scratch_pool, scratch_pool));
commit_ctx->activity_url = svn_path_url_add_component2(
activity_str,
@@ -1353,12 +1328,10 @@ open_root(void *edit_baton,
commit_ctx->pool);
/* Create our activity URL now on the server. */
- handler = svn_ra_serf__create_handler(scratch_pool);
+ handler = svn_ra_serf__create_handler(commit_ctx->session, scratch_pool);
handler->method = "MKACTIVITY";
handler->path = commit_ctx->activity_url;
- handler->conn = commit_ctx->session->conns[0];
- handler->session = commit_ctx->session;
handler->response_handler = svn_ra_serf__expect_empty_body;
handler->response_baton = handler;
@@ -1370,8 +1343,7 @@ open_root(void *edit_baton,
/* Now go fetch our VCC and baseline so we can do a CHECKOUT. */
SVN_ERR(svn_ra_serf__discover_vcc(&(commit_ctx->vcc_url),
- commit_ctx->session,
- commit_ctx->conn, commit_ctx->pool));
+ commit_ctx->session, scratch_pool));
/* Build our directory baton. */
@@ -1420,7 +1392,6 @@ open_root(void *edit_baton,
}
SVN_ERR(proppatch_resource(commit_ctx->session,
- commit_ctx->conn,
proppatch_ctx, scratch_pool));
}
@@ -1464,9 +1435,7 @@ delete_entry(const char *path,
delete_ctx->revision = revision;
delete_ctx->commit_ctx = dir->commit_ctx;
- handler = svn_ra_serf__create_handler(pool);
- handler->session = dir->commit_ctx->session;
- handler->conn = dir->commit_ctx->conn;
+ handler = svn_ra_serf__create_handler(dir->commit_ctx->session, pool);
handler->response_handler = svn_ra_serf__expect_empty_body;
handler->response_baton = handler;
@@ -1534,9 +1503,7 @@ add_directory(const char *path,
dir->name, dir->pool);
}
- handler = svn_ra_serf__create_handler(dir->pool);
- handler->conn = dir->commit_ctx->conn;
- handler->session = dir->commit_ctx->session;
+ handler = svn_ra_serf__create_handler(dir->commit_ctx->session, dir->pool);
handler->response_handler = svn_ra_serf__expect_empty_body;
handler->response_baton = handler;
@@ -1561,10 +1528,8 @@ add_directory(const char *path,
dir->copy_path);
}
- /* ### conn==NULL for session->conns[0]. same as commit->conn. */
SVN_ERR(svn_ra_serf__get_stable_url(&req_url, NULL /* latest_revnum */,
dir->commit_ctx->session,
- NULL /* conn */,
uri.path, dir->copy_revision,
dir_pool, dir_pool));
@@ -1683,7 +1648,6 @@ close_directory(void *dir_baton,
}
SVN_ERR(proppatch_resource(dir->commit_ctx->session,
- dir->commit_ctx->conn,
proppatch_ctx, dir->pool));
}
@@ -1759,18 +1723,15 @@ add_file(const char *path,
if (status)
return svn_ra_serf__wrap_err(status, NULL);
- /* ### conn==NULL for session->conns[0]. same as commit_ctx->conn. */
SVN_ERR(svn_ra_serf__get_stable_url(&req_url, NULL /* latest_revnum */,
dir->commit_ctx->session,
- NULL /* conn */,
uri.path, copy_revision,
scratch_pool, scratch_pool));
- handler = svn_ra_serf__create_handler(scratch_pool);
+ handler = svn_ra_serf__create_handler(dir->commit_ctx->session,
+ scratch_pool);
handler->method = "COPY";
handler->path = req_url;
- handler->conn = dir->commit_ctx->conn;
- handler->session = dir->commit_ctx->session;
handler->response_handler = svn_ra_serf__expect_empty_body;
handler->response_baton = handler;
@@ -1789,15 +1750,15 @@ add_file(const char *path,
svn_ra_serf__handler_t *handler;
svn_error_t *err;
- handler = svn_ra_serf__create_handler(scratch_pool);
- handler->session = new_file->commit_ctx->session;
- handler->conn = new_file->commit_ctx->conn;
+ handler = svn_ra_serf__create_handler(dir->commit_ctx->session,
+ scratch_pool);
handler->method = "HEAD";
handler->path = svn_path_url_add_component2(
dir->commit_ctx->session->session_url.path,
path, scratch_pool);
handler->response_handler = svn_ra_serf__expect_empty_body;
handler->response_baton = handler;
+ handler->no_dav_headers = TRUE; /* Read only operation outside txn */
err = svn_ra_serf__context_run_one(handler, scratch_pool);
@@ -1947,12 +1908,11 @@ close_file(void *file_baton,
svn_ra_serf__handler_t *handler;
int expected_result;
- handler = svn_ra_serf__create_handler(scratch_pool);
+ handler = svn_ra_serf__create_handler(ctx->commit_ctx->session,
+ scratch_pool);
handler->method = "PUT";
handler->path = ctx->url;
- handler->conn = ctx->commit_ctx->conn;
- handler->session = ctx->commit_ctx->session;
handler->response_handler = svn_ra_serf__expect_empty_body;
handler->response_baton = handler;
@@ -2001,7 +1961,6 @@ close_file(void *file_baton,
proppatch->base_revision = ctx->base_revision;
SVN_ERR(proppatch_resource(ctx->commit_ctx->session,
- ctx->commit_ctx->conn,
proppatch, scratch_pool));
}
@@ -2020,7 +1979,6 @@ close_edit(void *edit_baton,
/* MERGE our activity */
SVN_ERR(svn_ra_serf__run_merge(&commit_info,
ctx->session,
- ctx->session->conns[0],
merge_target,
ctx->lock_tokens,
ctx->keep_locks,
@@ -2035,12 +1993,10 @@ close_edit(void *edit_baton,
{
svn_ra_serf__handler_t *handler;
- handler = svn_ra_serf__create_handler(pool);
+ handler = svn_ra_serf__create_handler(ctx->session, pool);
handler->method = "DELETE";
handler->path = ctx->activity_url;
- handler->conn = ctx->conn;
- handler->session = ctx->session;
handler->response_handler = svn_ra_serf__expect_empty_body;
handler->response_baton = handler;
@@ -2073,11 +2029,9 @@ abort_edit(void *edit_baton,
serf_connection_reset(ctx->session->conns[0]->conn);
/* DELETE our aborted activity */
- handler = svn_ra_serf__create_handler(pool);
+ handler = svn_ra_serf__create_handler(ctx->session, pool);
handler->method = "DELETE";
- handler->conn = ctx->session->conns[0];
- handler->session = ctx->session;
handler->response_handler = svn_ra_serf__expect_empty_body;
handler->response_baton = handler;
@@ -2130,7 +2084,6 @@ svn_ra_serf__get_commit_editor(svn_ra_se
ctx->pool = pool;
ctx->session = session;
- ctx->conn = session->conns[0];
ctx->revprop_table = svn_prop_hash_dup(revprop_table, pool);
@@ -2243,12 +2196,10 @@ svn_ra_serf__change_rev_prop(svn_ra_sess
{
const char *vcc_url;
- SVN_ERR(svn_ra_serf__discover_vcc(&vcc_url, session,
- session->conns[0], pool));
+ SVN_ERR(svn_ra_serf__discover_vcc(&vcc_url, session, pool));
SVN_ERR(svn_ra_serf__fetch_dav_prop(&proppatch_target,
- session->conns[0], vcc_url, rev,
- "href",
+ session, vcc_url, rev, "href",
pool, pool));
}
@@ -2277,9 +2228,7 @@ svn_ra_serf__change_rev_prop(svn_ra_sess
prop->value = value;
svn_hash_sets(proppatch_ctx->prop_changes, prop->name, prop);
- err = proppatch_resource(session,
- session->conns[0],
- proppatch_ctx, pool);
+ err = proppatch_resource(session, proppatch_ctx, pool);
/* Use specific error code for old property value mismatch.
Use loop to provide the right result with tracing */
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_deleted_rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_deleted_rev.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_deleted_rev.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_deleted_rev.c Tue Jan 27 10:51:52 2015
@@ -149,23 +149,20 @@ svn_ra_serf__get_deleted_rev(svn_ra_sess
drev_ctx->revision_deleted = revision_deleted;
SVN_ERR(svn_ra_serf__get_stable_url(&req_url, NULL /* latest_revnum */,
- ras, NULL /* conn */,
- NULL /* url */, peg_revision,
+ ras, NULL /* url */, peg_revision,
pool, pool));
xmlctx = svn_ra_serf__xml_context_create(getdrev_ttable,
NULL, getdrev_closed, NULL,
drev_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, pool);
+ handler = svn_ra_serf__create_expat_handler(ras, xmlctx, NULL, pool);
handler->method = "REPORT";
handler->path = req_url;
handler->body_type = "text/xml";
handler->body_delegate = create_getdrev_body;
handler->body_delegate_baton = drev_ctx;
- handler->conn = ras->conns[0];
- handler->session = ras;
err = svn_ra_serf__context_run_one(handler, pool);
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c Tue Jan 27 10:51:52 2015
@@ -144,12 +144,10 @@ cancel_fetch(serf_request_t *request,
static svn_error_t *
try_get_wc_contents(svn_boolean_t *found_p,
svn_ra_serf__session_t *session,
- apr_hash_t *props,
+ const char *sha1_checksum_prop,
svn_stream_t *dst_stream,
apr_pool_t *pool)
{
- apr_hash_t *svn_props;
- const char *sha1_checksum_prop;
svn_checksum_t *checksum;
svn_stream_t *wc_stream;
svn_error_t *err;
@@ -157,24 +155,10 @@ try_get_wc_contents(svn_boolean_t *found
/* No contents found by default. */
*found_p = FALSE;
- if (!session->wc_callbacks->get_wc_contents)
+ if (!session->wc_callbacks->get_wc_contents
+ || sha1_checksum_prop == NULL)
{
- /* No callback, nothing to do. */
- return SVN_NO_ERROR;
- }
-
-
- svn_props = svn_hash_gets(props, SVN_DAV_PROP_NS_DAV);
- if (!svn_props)
- {
- /* No properties -- therefore no checksum property -- in response. */
- return SVN_NO_ERROR;
- }
-
- sha1_checksum_prop = svn_prop_get_value(svn_props, "sha1-checksum");
- if (sha1_checksum_prop == NULL)
- {
- /* No checksum property in response. */
+ /* Nothing to do. */
return SVN_NO_ERROR;
}
@@ -280,6 +264,55 @@ handle_stream(serf_request_t *request,
/* not reached */
}
+/* Baton for get_file_prop_cb */
+struct file_prop_baton_t
+{
+ apr_pool_t *result_pool;
+ svn_node_kind_t kind;
+ apr_hash_t *props;
+ const char *sha1_checksum;
+};
+
+/* Implements svn_ra_serf__prop_func_t for svn_ra_serf__get_file */
+static svn_error_t *
+get_file_prop_cb(void *baton,
+ const char *path,
+ const char *ns,
+ const char *name,
+ const svn_string_t *value,
+ apr_pool_t *scratch_pool)
+{
+ struct file_prop_baton_t *fb = baton;
+ const char *svn_name;
+
+ if (strcmp(ns, "DAV:") == 0 && strcmp(name, "resourcetype") == 0)
+ {
+ const char *val = value->data;
+
+ if (strcmp(val, "collection") == 0)
+ fb->kind = svn_node_dir;
+ else
+ fb->kind = svn_node_file;
+
+ return SVN_NO_ERROR;
+ }
+ else if (strcmp(ns, SVN_DAV_PROP_NS_DAV) == 0
+ && strcmp(name, "sha1-checksum") == 0)
+ {
+ fb->sha1_checksum = apr_pstrdup(fb->result_pool, value->data);
+ }
+
+ if (!fb->props)
+ return SVN_NO_ERROR;
+
+ svn_name = svn_ra_serf__svnname_from_wirename(ns, name, fb->result_pool);
+ if (svn_name)
+ {
+ svn_hash_sets(fb->props, svn_name,
+ svn_string_dup(value, fb->result_pool));
+ }
+ return SVN_NO_ERROR;
+}
svn_error_t *
svn_ra_serf__get_file(svn_ra_session_t *ra_session,
@@ -291,14 +324,10 @@ svn_ra_serf__get_file(svn_ra_session_t *
apr_pool_t *pool)
{
svn_ra_serf__session_t *session = ra_session->priv;
- svn_ra_serf__connection_t *conn;
const char *fetch_url;
- apr_hash_t *fetch_props;
- svn_node_kind_t res_kind;
const svn_ra_serf__dav_props_t *which_props;
-
- /* What connection should we go on? */
- conn = session->conns[session->cur_conn];
+ svn_ra_serf__handler_t *propfind_handler;
+ struct file_prop_baton_t fb;
/* Fetch properties. */
@@ -312,7 +341,7 @@ svn_ra_serf__get_file(svn_ra_session_t *
if (SVN_IS_VALID_REVNUM(revision) || fetched_rev)
{
SVN_ERR(svn_ra_serf__get_stable_url(&fetch_url, fetched_rev,
- session, conn,
+ session,
fetch_url, revision,
pool, pool));
revision = SVN_INVALID_REVNUM;
@@ -321,44 +350,39 @@ svn_ra_serf__get_file(svn_ra_session_t *
SVN_ERR_ASSERT(!SVN_IS_VALID_REVNUM(revision));
if (props)
- {
which_props = all_props;
- }
else if (stream && session->wc_callbacks->get_wc_contents)
- {
which_props = type_and_checksum_props;
- }
else
- {
which_props = check_path_props;
- }
- SVN_ERR(svn_ra_serf__fetch_node_props(&fetch_props, conn, fetch_url,
- SVN_INVALID_REVNUM,
- which_props,
- pool, pool));
+ fb.result_pool = pool;
+ fb.props = props ? apr_hash_make(pool) : NULL;
+ fb.kind = svn_node_unknown;
+ fb.sha1_checksum = NULL;
+
+ SVN_ERR(svn_ra_serf__create_propfind_handler(&propfind_handler, session,
+ fetch_url, SVN_INVALID_REVNUM,
+ "0", which_props,
+ get_file_prop_cb, &fb,
+ pool));
+
+ SVN_ERR(svn_ra_serf__context_run_one(propfind_handler, pool));
/* Verify that resource type is not collection. */
- SVN_ERR(svn_ra_serf__get_resource_type(&res_kind, fetch_props));
- if (res_kind != svn_node_file)
+ if (fb.kind != svn_node_file)
{
return svn_error_create(SVN_ERR_FS_NOT_FILE, NULL,
_("Can't get text contents of a directory"));
}
- /* TODO Filter out all of our props into a usable format. */
if (props)
- {
- /* ### flatten_props() does not copy PROPVALUE, but fetch_node_props()
- ### put them into POOL, so we're okay. */
- SVN_ERR(svn_ra_serf__flatten_props(props, fetch_props,
- pool, pool));
- }
+ *props = fb.props;
if (stream)
{
svn_boolean_t found;
- SVN_ERR(try_get_wc_contents(&found, session, fetch_props, stream, pool));
+ SVN_ERR(try_get_wc_contents(&found, session, fb.sha1_checksum, stream, pool));
/* No contents found in the WC, let's fetch from server. */
if (!found)
@@ -371,12 +395,13 @@ svn_ra_serf__get_file(svn_ra_session_t *
stream_ctx->result_stream = stream;
stream_ctx->using_compression = session->using_compression;
- handler = svn_ra_serf__create_handler(pool);
+ handler = svn_ra_serf__create_handler(session, pool);
+
+ /* What connection should we go on? */
+ handler->conn = session->conns[session->cur_conn];
handler->method = "GET";
handler->path = fetch_url;
- handler->conn = conn;
- handler->session = session;
handler->custom_accept_encoding = TRUE;
handler->no_dav_headers = TRUE;
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c Tue Jan 27 10:51:52 2015
@@ -291,14 +291,13 @@ svn_ra_serf__get_lock(svn_ra_session_t *
NULL, locks_closed, NULL,
lock_ctx,
scratch_pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, locks_expected_status,
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx,
+ locks_expected_status,
scratch_pool);
handler->method = "PROPFIND";
handler->path = req_url;
handler->body_type = "text/xml";
- handler->conn = session->conns[0];
- handler->session = session;
handler->body_delegate = create_getlock_body;
handler->body_delegate_baton = lock_ctx;
@@ -306,6 +305,8 @@ svn_ra_serf__get_lock(svn_ra_session_t *
handler->header_delegate = setup_getlock_headers;
handler->header_delegate_baton = lock_ctx;
+ handler->no_dav_headers = TRUE;
+
lock_ctx->inner_handler = handler->response_handler;
lock_ctx->inner_baton = handler->response_baton;
handler->response_handler = handle_lock;
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/getdate.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/getdate.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/getdate.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/getdate.c Tue Jan 27 10:51:52 2015
@@ -140,19 +140,17 @@ svn_ra_serf__get_dated_revision(svn_ra_s
date_ctx->time = tm;
date_ctx->revision = revision;
- SVN_ERR(svn_ra_serf__report_resource(&report_target, session, NULL, pool));
+ SVN_ERR(svn_ra_serf__report_resource(&report_target, session, pool));
xmlctx = svn_ra_serf__xml_context_create(date_ttable,
NULL, date_closed, NULL,
date_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL, pool);
handler->method = "REPORT";
handler->path = report_target;
handler->body_type = "text/xml";
- handler->conn = session->conns[0];
- handler->session = session;
handler->body_delegate = create_getdate_body;
handler->body_delegate_baton = date_ctx;
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocations.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocations.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocations.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocations.c Tue Jan 27 10:51:52 2015
@@ -176,23 +176,20 @@ svn_ra_serf__get_locations(svn_ra_sessio
*locations = loc_ctx->paths;
SVN_ERR(svn_ra_serf__get_stable_url(&req_url, NULL /* latest_revnum */,
- session, NULL /* conn */,
- NULL /* url */, peg_revision,
+ session, NULL /* url */, peg_revision,
pool, pool));
xmlctx = svn_ra_serf__xml_context_create(getloc_ttable,
NULL, getloc_closed, NULL,
loc_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL, pool);
handler->method = "REPORT";
handler->path = req_url;
handler->body_delegate = create_get_locations_body;
handler->body_delegate_baton = loc_ctx;
handler->body_type = "text/xml";
- handler->conn = session->conns[0];
- handler->session = session;
SVN_ERR(svn_ra_serf__context_run_one(handler, pool));
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocationsegments.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocationsegments.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocationsegments.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocationsegments.c Tue Jan 27 10:51:52 2015
@@ -179,23 +179,20 @@ svn_ra_serf__get_location_segments(svn_r
gls_ctx->receiver_baton = receiver_baton;
SVN_ERR(svn_ra_serf__get_stable_url(&req_url, NULL /* latest_revnum */,
- session, NULL /* conn */,
- NULL /* url */, peg_revision,
+ session, NULL /* url */, peg_revision,
pool, pool));
xmlctx = svn_ra_serf__xml_context_create(gls_ttable,
NULL, gls_closed, NULL,
gls_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL, pool);
handler->method = "REPORT";
handler->path = req_url;
handler->body_delegate = create_gls_body;
handler->body_delegate_baton = gls_ctx;
handler->body_type = "text/xml";
- handler->conn = session->conns[0];
- handler->session = session;
err = svn_ra_serf__context_run_one(handler, pool);
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocks.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/getlocks.c Tue Jan 27 10:51:52 2015
@@ -245,8 +245,7 @@ svn_ra_serf__get_locks(svn_ra_session_t
svn_error_t *err;
req_url = svn_path_url_add_component2(session->session_url.path, path, pool);
- SVN_ERR(svn_ra_serf__get_relative_path(&rel_path, req_url, session,
- NULL, pool));
+ SVN_ERR(svn_ra_serf__get_relative_path(&rel_path, req_url, session, pool));
lock_ctx = apr_pcalloc(pool, sizeof(*lock_ctx));
lock_ctx->pool = pool;
@@ -258,13 +257,11 @@ svn_ra_serf__get_locks(svn_ra_session_t
NULL, getlocks_closed, NULL,
lock_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL, pool);
handler->method = "REPORT";
handler->path = req_url;
handler->body_type = "text/xml";
- handler->conn = session->conns[0];
- handler->session = session;
handler->body_delegate = create_getlocks_body;
handler->body_delegate_baton = lock_ctx;
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/inherited_props.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/inherited_props.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/inherited_props.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/inherited_props.c Tue Jan 27 10:51:52 2015
@@ -273,15 +273,15 @@ get_iprops_via_more_requests(svn_ra_sess
rq->props = apr_hash_make(scratch_pool);
SVN_ERR(svn_ra_serf__get_stable_url(&rq->urlpath, NULL, session,
- session->conns[0],
svn_path_url_add_component2(
session->repos_root.path,
relpath, scratch_pool),
revision,
scratch_pool, scratch_pool));
- SVN_ERR(svn_ra_serf__deliver_props2(&rq->handler, session,
- session->conns[0], rq->urlpath,
+ SVN_ERR(svn_ra_serf__create_propfind_handler(
+ &rq->handler, session,
+ rq->urlpath,
rev_marker, "0", all_props,
svn_ra_serf__deliver_svn_props,
rq->props,
@@ -402,7 +402,6 @@ svn_ra_serf__get_inherited_props(svn_ra_
SVN_ERR(svn_ra_serf__get_stable_url(&req_url,
NULL /* latest_revnum */,
session,
- NULL /* conn */,
NULL /* url */,
revision,
scratch_pool, scratch_pool));
@@ -424,12 +423,12 @@ svn_ra_serf__get_inherited_props(svn_ra_
NULL,
iprops_ctx,
scratch_pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, scratch_pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL,
+ scratch_pool);
handler->method = "REPORT";
handler->path = req_url;
- handler->conn = session->conns[0];
- handler->session = session;
+
handler->body_delegate = create_iprops_body;
handler->body_delegate_baton = iprops_ctx;
handler->body_type = "text/xml";
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c Tue Jan 27 10:51:52 2015
@@ -484,7 +484,8 @@ svn_ra_serf__lock(svn_ra_session_t *ra_s
NULL, locks_closed, NULL,
lock_ctx,
lock_pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, lock_pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL,
+ lock_pool);
handler->method = "LOCK";
handler->path = req_url;
@@ -497,8 +498,6 @@ svn_ra_serf__lock(svn_ra_session_t *ra_s
if (session->cur_conn >= session->num_conns)
session->cur_conn = 0;
- handler->session = session;
-
handler->header_delegate = set_lock_headers;
handler->header_delegate_baton = lock_ctx;
@@ -650,12 +649,10 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
req_url = svn_path_url_add_component2(session->session_url.path, lock_ctx->path,
lock_pool);
- handler = svn_ra_serf__create_handler(lock_pool);
+ handler = svn_ra_serf__create_handler(session, lock_pool);
handler->method = "UNLOCK";
handler->path = req_url;
- handler->conn = session->conns[0];
- handler->session = session;
handler->header_delegate = set_unlock_headers;
handler->header_delegate_baton = lock_ctx;
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/log.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/log.c Tue Jan 27 10:51:52 2015
@@ -580,7 +580,7 @@ svn_ra_serf__get_log(svn_ra_session_t *r
peg_rev = (start == SVN_INVALID_REVNUM || start > end) ? start : end;
SVN_ERR(svn_ra_serf__get_stable_url(&req_url, NULL /* latest_revnum */,
- session, NULL /* conn */,
+ session,
NULL /* url */, peg_rev,
pool, pool));
@@ -588,15 +588,13 @@ svn_ra_serf__get_log(svn_ra_session_t *r
log_opened, log_closed, NULL,
log_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL, pool);
handler->method = "REPORT";
handler->path = req_url;
handler->body_delegate = create_log_body;
handler->body_delegate_baton = log_ctx;
handler->body_type = "text/xml";
- handler->conn = session->conns[0];
- handler->session = session;
SVN_ERR(svn_ra_serf__context_run_one(handler, pool));
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/merge.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/merge.c Tue Jan 27 10:51:52 2015
@@ -391,7 +391,6 @@ create_merge_body(serf_bucket_t **bkt,
svn_error_t *
svn_ra_serf__run_merge(const svn_commit_info_t **commit_info,
svn_ra_serf__session_t *session,
- svn_ra_serf__connection_t *conn,
const char *merge_resource_url,
apr_hash_t *lock_tokens,
svn_boolean_t keep_locks,
@@ -420,14 +419,13 @@ svn_ra_serf__run_merge(const svn_commit_
NULL, merge_closed, NULL,
merge_ctx,
scratch_pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, scratch_pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL,
+ scratch_pool);
handler->method = "MERGE";
handler->path = merge_ctx->merge_url;
handler->body_delegate = create_merge_body;
handler->body_delegate_baton = merge_ctx;
- handler->conn = conn;
- handler->session = session;
handler->header_delegate = setup_merge_headers;
handler->header_delegate_baton = merge_ctx;
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/mergeinfo.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/mergeinfo.c Tue Jan 27 10:51:52 2015
@@ -201,7 +201,7 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
*catalog = NULL;
SVN_ERR(svn_ra_serf__get_stable_url(&path, NULL /* latest_revnum */,
- session, NULL /* conn */,
+ session,
NULL /* url */, revision,
pool, pool));
@@ -217,12 +217,11 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
NULL, mergeinfo_closed, NULL,
mergeinfo_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL, pool);
handler->method = "REPORT";
handler->path = path;
- handler->conn = session->conns[0];
- handler->session = session;
+
handler->body_delegate = create_mergeinfo_body;
handler->body_delegate_baton = mergeinfo_ctx;
handler->body_type = "text/xml";
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/multistatus.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/multistatus.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/multistatus.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/multistatus.c Tue Jan 27 10:51:52 2015
@@ -619,7 +619,8 @@ svn_ra_serf__setup_error_parsing(svn_ra_
ms_baton,
ms_baton->pool);
- tmp_handler = svn_ra_serf__create_expat_handler(ms_baton->xmlctx,
+ tmp_handler = svn_ra_serf__create_expat_handler(handler->session,
+ ms_baton->xmlctx,
expected_status,
result_pool);
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/options.c Tue Jan 27 10:51:52 2015
@@ -389,7 +389,6 @@ options_response_handler(serf_request_t
static svn_error_t *
create_options_req(options_context_t **opt_ctx,
svn_ra_serf__session_t *session,
- svn_ra_serf__connection_t *conn,
apr_pool_t *pool)
{
options_context_t *new_ctx;
@@ -406,14 +405,12 @@ create_options_req(options_context_t **o
NULL, options_closed, NULL,
new_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx, NULL, pool);
+ handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL, pool);
handler->method = "OPTIONS";
handler->path = session->session_url.path;
handler->body_delegate = create_options_body;
handler->body_type = "text/xml";
- handler->conn = conn;
- handler->session = session;
new_ctx->handler = handler;
@@ -430,15 +427,14 @@ create_options_req(options_context_t **o
svn_error_t *
svn_ra_serf__v2_get_youngest_revnum(svn_revnum_t *youngest,
- svn_ra_serf__connection_t *conn,
+ svn_ra_serf__session_t *session,
apr_pool_t *scratch_pool)
{
- svn_ra_serf__session_t *session = conn->session;
options_context_t *opt_ctx;
SVN_ERR_ASSERT(SVN_RA_SERF__HAVE_HTTPV2_SUPPORT(session));
- SVN_ERR(create_options_req(&opt_ctx, session, conn, scratch_pool));
+ SVN_ERR(create_options_req(&opt_ctx, session, scratch_pool));
SVN_ERR(svn_ra_serf__context_run_one(opt_ctx->handler, scratch_pool));
if (opt_ctx->handler->sline.code != 200)
@@ -457,21 +453,40 @@ svn_ra_serf__v2_get_youngest_revnum(svn_
svn_error_t *
svn_ra_serf__v1_get_activity_collection(const char **activity_url,
- svn_ra_serf__connection_t *conn,
+ svn_ra_serf__session_t *session,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- svn_ra_serf__session_t *session = conn->session;
options_context_t *opt_ctx;
SVN_ERR_ASSERT(!SVN_RA_SERF__HAVE_HTTPV2_SUPPORT(session));
- SVN_ERR(create_options_req(&opt_ctx, session, conn, scratch_pool));
+ if (session->activity_collection_url)
+ {
+ *activity_url = apr_pstrdup(result_pool,
+ session->activity_collection_url);
+ return SVN_NO_ERROR;
+ }
+
+ SVN_ERR(create_options_req(&opt_ctx, session, scratch_pool));
SVN_ERR(svn_ra_serf__context_run_one(opt_ctx->handler, scratch_pool));
if (opt_ctx->handler->sline.code != 200)
return svn_error_trace(svn_ra_serf__unexpected_status(opt_ctx->handler));
+ /* Cache the result. */
+ if (opt_ctx->activity_collection)
+ {
+ session->activity_collection_url =
+ apr_pstrdup(session->pool, opt_ctx->activity_collection);
+ }
+ else
+ {
+ return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
+ _("The OPTIONS response did not include the "
+ "requested activity-collection-set value"));
+ }
+
*activity_url = apr_pstrdup(result_pool, opt_ctx->activity_collection);
return SVN_NO_ERROR;
@@ -490,9 +505,11 @@ svn_ra_serf__exchange_capabilities(svn_r
{
options_context_t *opt_ctx;
+ if (corrected_url)
+ *corrected_url = NULL;
+
/* This routine automatically fills in serf_sess->capabilities */
- SVN_ERR(create_options_req(&opt_ctx, serf_sess, serf_sess->conns[0],
- scratch_pool));
+ SVN_ERR(create_options_req(&opt_ctx, serf_sess, scratch_pool));
SVN_ERR(svn_ra_serf__context_run_one(opt_ctx->handler, scratch_pool));
@@ -549,11 +566,9 @@ svn_ra_serf__probe_proxy(svn_ra_serf__se
{
svn_ra_serf__handler_t *handler;
- handler = svn_ra_serf__create_handler(scratch_pool);
+ handler = svn_ra_serf__create_handler(serf_sess, scratch_pool);
handler->method = "OPTIONS";
handler->path = serf_sess->session_url.path;
- handler->conn = serf_sess->conns[0];
- handler->session = serf_sess;
/* We don't care about the response body, so discard it. */
handler->response_handler = svn_ra_serf__handle_discard_body;
Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/property.c?rev=1655005&r1=1655004&r2=1655005&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/property.c Tue Jan 27 10:51:52 2015
@@ -73,7 +73,7 @@ typedef struct propfind_context_t {
/* the list of requested properties */
const svn_ra_serf__dav_props_t *find_props;
- svn_ra_serf__prop_func prop_func;
+ svn_ra_serf__prop_func_t prop_func;
void *prop_func_baton;
/* hash table containing all the properties associated with the
@@ -446,16 +446,15 @@ create_propfind_body(serf_bucket_t **bkt
svn_error_t *
-svn_ra_serf__deliver_props2(svn_ra_serf__handler_t **propfind_handler,
- svn_ra_serf__session_t *sess,
- svn_ra_serf__connection_t *conn,
- const char *path,
- svn_revnum_t rev,
- const char *depth,
- const svn_ra_serf__dav_props_t *find_props,
- svn_ra_serf__prop_func prop_func,
- void *prop_func_baton,
- apr_pool_t *pool)
+svn_ra_serf__create_propfind_handler(svn_ra_serf__handler_t **propfind_handler,
+ svn_ra_serf__session_t *sess,
+ const char *path,
+ svn_revnum_t rev,
+ const char *depth,
+ const svn_ra_serf__dav_props_t *find_props,
+ svn_ra_serf__prop_func_t prop_func,
+ void *prop_func_baton,
+ apr_pool_t *pool)
{
propfind_context_t *new_prop_ctx;
svn_ra_serf__handler_t *handler;
@@ -484,7 +483,7 @@ svn_ra_serf__deliver_props2(svn_ra_serf_
NULL,
new_prop_ctx,
pool);
- handler = svn_ra_serf__create_expat_handler(xmlctx,
+ handler = svn_ra_serf__create_expat_handler(sess, xmlctx,
propfind_expected_status,
pool);
@@ -496,8 +495,7 @@ svn_ra_serf__deliver_props2(svn_ra_serf_
handler->header_delegate = setup_propfind_headers;
handler->header_delegate_baton = new_prop_ctx;
- handler->session = sess;
- handler->conn = conn;
+ handler->no_dav_headers = TRUE;
new_prop_ctx->handler = handler;
@@ -527,13 +525,18 @@ svn_ra_serf__deliver_svn_props(void *bat
return SVN_NO_ERROR;
}
-svn_error_t *
-svn_ra_serf__deliver_node_props(void *baton,
- const char *path,
- const char *ns,
- const char *name,
- const svn_string_t *value,
- apr_pool_t *scratch_pool)
+/*
+ * Implementation of svn_ra_serf__prop_func_t that delivers all DAV properties
+ * in (const char * -> apr_hash_t *) on Namespace pointing to a second hash
+ * (const char * -> svn_string_t *) to the values.
+ */
+static svn_error_t *
+deliver_node_props(void *baton,
+ const char *path,
+ const char *ns,
+ const char *name,
+ const svn_string_t *value,
+ apr_pool_t *scratch_pool)
{
apr_hash_t *nss = baton;
apr_hash_t *props;
@@ -555,26 +558,9 @@ svn_ra_serf__deliver_node_props(void *ba
return SVN_NO_ERROR;
}
-
-/*
- * This helper function will block until the PROP_CTX indicates that is done
- * or another error is returned.
- */
-svn_error_t *
-svn_ra_serf__wait_for_props(svn_ra_serf__handler_t *handler,
- apr_pool_t *scratch_pool)
-{
- SVN_ERR(svn_ra_serf__context_run_one(handler, scratch_pool));
-
- if (handler->sline.code != 207)
- return svn_error_trace(svn_ra_serf__unexpected_status(handler));
-
- return SVN_NO_ERROR;
-}
-
svn_error_t *
svn_ra_serf__fetch_node_props(apr_hash_t **results,
- svn_ra_serf__connection_t *conn,
+ svn_ra_serf__session_t *session,
const char *url,
svn_revnum_t revision,
const svn_ra_serf__dav_props_t *which_props,
@@ -586,62 +572,17 @@ svn_ra_serf__fetch_node_props(apr_hash_t
props = apr_hash_make(result_pool);
- SVN_ERR(svn_ra_serf__deliver_props2(&handler, conn->session, conn,
- url, revision, "0", which_props,
- svn_ra_serf__deliver_node_props, props,
- scratch_pool));
- SVN_ERR(svn_ra_serf__wait_for_props(handler, scratch_pool));
-
- *results = props;
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_ra_serf__walk_node_props(apr_hash_t *props,
- svn_ra_serf__walker_visitor_t walker,
- void *baton,
- apr_pool_t *scratch_pool)
-{
- apr_pool_t *iterpool;
- apr_hash_index_t *ns_hi;
-
- iterpool = svn_pool_create(scratch_pool);
- for (ns_hi = apr_hash_first(scratch_pool, props); ns_hi;
- ns_hi = apr_hash_next(ns_hi))
- {
- void *ns_val;
- const void *ns_name;
- apr_hash_index_t *name_hi;
-
- /* NOTE: We do not clear ITERPOOL in this loop. Generally, there are
- very few namespaces, so this loop will not have many iterations.
- Instead, ITERPOOL is used for the inner loop. */
+ SVN_ERR(svn_ra_serf__create_propfind_handler(&handler, session,
+ url, revision, "0", which_props,
+ deliver_node_props,
+ props, scratch_pool));
- apr_hash_this(ns_hi, &ns_name, NULL, &ns_val);
-
- for (name_hi = apr_hash_first(scratch_pool, ns_val); name_hi;
- name_hi = apr_hash_next(name_hi))
- {
- void *prop_val;
- const void *prop_name;
-
- /* See note above, regarding clearing of this pool. */
- svn_pool_clear(iterpool);
-
- apr_hash_this(name_hi, &prop_name, NULL, &prop_val);
-
- SVN_ERR(walker(baton, ns_name, prop_name, prop_val, iterpool));
- }
- }
- svn_pool_destroy(iterpool);
+ SVN_ERR(svn_ra_serf__context_run_one(handler, scratch_pool));
+ *results = props;
return SVN_NO_ERROR;
}
-
-
-
const char *
svn_ra_serf__svnname_from_wirename(const char *ns,
const char *name,
@@ -685,44 +626,6 @@ svn_ra_serf__svnname_from_wirename(const
return apr_pstrcat(result_pool, ns, name, SVN_VA_NULL);
}
-
-/* Conforms to svn_ra_serf__walker_visitor_t */
-static svn_error_t *
-set_flat_props(void *baton,
- const char *ns,
- const char *name,
- const svn_string_t *value,
- apr_pool_t *pool)
-{
- apr_hash_t *props = baton;
- apr_pool_t *result_pool = apr_hash_pool_get(props);
- const char *prop_name;
-
- /* ### is VAL in the proper pool? */
-
- prop_name = svn_ra_serf__svnname_from_wirename(ns, name, result_pool);
- if (prop_name != NULL)
- svn_hash_sets(props, prop_name, value);
-
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_ra_serf__flatten_props(apr_hash_t **flat_props,
- apr_hash_t *props,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- *flat_props = apr_hash_make(result_pool);
-
- return svn_error_trace(svn_ra_serf__walk_node_props(
- props,
- set_flat_props,
- *flat_props /* baton */,
- scratch_pool));
-}
-
/*
* Contact the server (using CONN) to calculate baseline
* information for BASELINE_URL at REVISION (which may be
@@ -736,7 +639,7 @@ svn_ra_serf__flatten_props(apr_hash_t **
static svn_error_t *
retrieve_baseline_info(svn_revnum_t *actual_revision,
const char **basecoll_url_p,
- svn_ra_serf__connection_t *conn,
+ svn_ra_serf__session_t *session,
const char *baseline_url,
svn_revnum_t revision,
apr_pool_t *result_pool,
@@ -746,7 +649,7 @@ retrieve_baseline_info(svn_revnum_t *act
apr_hash_t *dav_props;
const char *basecoll_url;
- SVN_ERR(svn_ra_serf__fetch_node_props(&props, conn,
+ SVN_ERR(svn_ra_serf__fetch_node_props(&props, session,
baseline_url, revision,
baseline_props,
scratch_pool, scratch_pool));
@@ -796,7 +699,7 @@ retrieve_baseline_info(svn_revnum_t *act
static svn_error_t *
v1_get_youngest_revnum(svn_revnum_t *youngest,
const char **basecoll_url,
- svn_ra_serf__connection_t *conn,
+ svn_ra_serf__session_t *session,
const char *vcc_url,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -806,7 +709,7 @@ v1_get_youngest_revnum(svn_revnum_t *you
/* Fetching DAV:checked-in from the VCC (with no Label: to specify a
revision) will return the latest Baseline resource's URL. */
- SVN_ERR(svn_ra_serf__fetch_dav_prop(&baseline_url, conn, vcc_url,
+ SVN_ERR(svn_ra_serf__fetch_dav_prop(&baseline_url, session, vcc_url,
SVN_INVALID_REVNUM,
"checked-in",
scratch_pool, scratch_pool));
@@ -825,15 +728,15 @@ v1_get_youngest_revnum(svn_revnum_t *you
/* First check baseline information cache. */
SVN_ERR(svn_ra_serf__blncache_get_baseline_info(&bc_url,
youngest,
- conn->session->blncache,
+ session->blncache,
baseline_url,
scratch_pool));
if (!bc_url)
{
- SVN_ERR(retrieve_baseline_info(youngest, &bc_url, conn,
+ SVN_ERR(retrieve_baseline_info(youngest, &bc_url, session,
baseline_url, SVN_INVALID_REVNUM,
scratch_pool, scratch_pool));
- SVN_ERR(svn_ra_serf__blncache_set(conn->session->blncache,
+ SVN_ERR(svn_ra_serf__blncache_set(session->blncache,
baseline_url, *youngest,
bc_url, scratch_pool));
}
@@ -854,12 +757,12 @@ svn_ra_serf__get_youngest_revnum(svn_rev
if (SVN_RA_SERF__HAVE_HTTPV2_SUPPORT(session))
return svn_error_trace(svn_ra_serf__v2_get_youngest_revnum(
- youngest, session->conns[0], scratch_pool));
+ youngest, session, scratch_pool));
- SVN_ERR(svn_ra_serf__discover_vcc(&vcc_url, session, NULL, scratch_pool));
+ SVN_ERR(svn_ra_serf__discover_vcc(&vcc_url, session, scratch_pool));
return svn_error_trace(v1_get_youngest_revnum(youngest, NULL,
- session->conns[0], vcc_url,
+ session, vcc_url,
scratch_pool, scratch_pool));
}
@@ -876,9 +779,9 @@ static svn_error_t *
get_baseline_info(const char **bc_url,
svn_revnum_t *revnum_used,
svn_ra_serf__session_t *session,
- svn_ra_serf__connection_t *conn,
svn_revnum_t revision,
- apr_pool_t *pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
/* If we detected HTTP v2 support on the server, we can construct
the baseline collection URL ourselves, and fetch the latest
@@ -892,10 +795,10 @@ get_baseline_info(const char **bc_url,
else
{
SVN_ERR(svn_ra_serf__v2_get_youngest_revnum(
- revnum_used, conn, pool));
+ revnum_used, session, scratch_pool));
}
- *bc_url = apr_psprintf(pool, "%s/%ld",
+ *bc_url = apr_psprintf(result_pool, "%s/%ld",
session->rev_root_stub, *revnum_used);
}
@@ -904,20 +807,22 @@ get_baseline_info(const char **bc_url,
{
const char *vcc_url;
- SVN_ERR(svn_ra_serf__discover_vcc(&vcc_url, session, conn, pool));
+ SVN_ERR(svn_ra_serf__discover_vcc(&vcc_url, session, scratch_pool));
if (SVN_IS_VALID_REVNUM(revision))
{
/* First check baseline information cache. */
SVN_ERR(svn_ra_serf__blncache_get_bc_url(bc_url,
session->blncache,
- revision, pool));
+ revision, result_pool));
if (!*bc_url)
{
- SVN_ERR(retrieve_baseline_info(NULL, bc_url, conn,
- vcc_url, revision, pool, pool));
+ SVN_ERR(retrieve_baseline_info(NULL, bc_url, session,
+ vcc_url, revision,
+ result_pool, scratch_pool));
SVN_ERR(svn_ra_serf__blncache_set(session->blncache, NULL,
- revision, *bc_url, pool));
+ revision, *bc_url,
+ scratch_pool));
}
*revnum_used = revision;
@@ -925,8 +830,8 @@ get_baseline_info(const char **bc_url,
else
{
SVN_ERR(v1_get_youngest_revnum(revnum_used, bc_url,
- conn, vcc_url,
- pool, pool));
+ session, vcc_url,
+ result_pool, scratch_pool));
}
}
@@ -938,7 +843,6 @@ svn_error_t *
svn_ra_serf__get_stable_url(const char **stable_url,
svn_revnum_t *latest_revnum,
svn_ra_serf__session_t *session,
- svn_ra_serf__connection_t *conn,
const char *url,
svn_revnum_t revision,
apr_pool_t *result_pool,
@@ -952,15 +856,10 @@ svn_ra_serf__get_stable_url(const char *
if (! url)
url = session->session_url.path;
- /* If the caller didn't provide a specific connection for us to use,
- we'll use the default connection. */
- if (! conn)
- conn = session->conns[0];
-
SVN_ERR(get_baseline_info(&basecoll_url, &revnum_used,
- session, conn, revision, scratch_pool));
+ session, revision, scratch_pool, scratch_pool));
SVN_ERR(svn_ra_serf__get_relative_path(&repos_relpath, url,
- session, conn, scratch_pool));
+ session, scratch_pool));
*stable_url = svn_path_url_add_component2(basecoll_url, repos_relpath,
result_pool);
@@ -972,38 +871,8 @@ svn_ra_serf__get_stable_url(const char *
svn_error_t *
-svn_ra_serf__get_resource_type(svn_node_kind_t *kind,
- apr_hash_t *props)
-{
- apr_hash_t *dav_props;
- const char *res_type;
-
- dav_props = apr_hash_get(props, "DAV:", 4);
- res_type = svn_prop_get_value(dav_props, "resourcetype");
- if (!res_type)
- {
- /* How did this happen? */
- return svn_error_create(SVN_ERR_RA_DAV_PROPS_NOT_FOUND, NULL,
- _("The PROPFIND response did not include the "
- "requested resourcetype value"));
- }
-
- if (strcmp(res_type, "collection") == 0)
- {
- *kind = svn_node_dir;
- }
- else
- {
- *kind = svn_node_file;
- }
-
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
svn_ra_serf__fetch_dav_prop(const char **value,
- svn_ra_serf__connection_t *conn,
+ svn_ra_serf__session_t *session,
const char *url,
svn_revnum_t revision,
const char *propname,
@@ -1013,7 +882,7 @@ svn_ra_serf__fetch_dav_prop(const char *
apr_hash_t *props;
apr_hash_t *dav_props;
- SVN_ERR(svn_ra_serf__fetch_node_props(&props, conn, url, revision,
+ SVN_ERR(svn_ra_serf__fetch_node_props(&props, session, url, revision,
checked_in_props,
scratch_pool, scratch_pool));
dav_props = apr_hash_get(props, "DAV:", 4);