You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2012/05/08 00:39:33 UTC
svn commit: r1335289 - /subversion/trunk/subversion/libsvn_ra_serf/locks.c
Author: gstein
Date: Mon May 7 22:39:33 2012
New Revision: 1335289
URL: http://svn.apache.org/viewvc?rev=1335289&view=rev
Log:
Remove the last usage of simple_request_context_t.
* subversion/libsvn_ra_serf/locks.c:
(svn_ra_serf__unlock): add a comment about future work. remove the
CTX localvar. switch to expect_empty_body and run_one.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/locks.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/locks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/locks.c?rev=1335289&r1=1335288&r2=1335289&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/locks.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/locks.c Mon May 7 22:39:33 2012
@@ -674,13 +674,15 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
iterpool = svn_pool_create(scratch_pool);
/* ### TODO for issue 2263: Send all the locks over the wire at once. This
- loop is just a temporary shim. */
+ ### loop is just a temporary shim.
+ ### an alternative, which is backwards-compat with all servers is to
+ ### pipeline these requests. ie. stop using run_wait/run_one. */
+
for (hi = apr_hash_first(scratch_pool, path_tokens);
hi;
hi = apr_hash_next(hi))
{
svn_ra_serf__handler_t *handler;
- svn_ra_serf__simple_request_context_t *ctx;
const char *req_url, *path, *token;
svn_lock_t *existing_lock = NULL;
struct unlock_context_t unlock_ctx;
@@ -690,8 +692,6 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
svn_pool_clear(iterpool);
- ctx = apr_pcalloc(iterpool, sizeof(*ctx));
-
path = svn__apr_hash_index_key(hi);
token = svn__apr_hash_index_val(hi);
@@ -742,11 +742,10 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
handler->header_delegate = set_unlock_headers;
handler->header_delegate_baton = &unlock_ctx;
- handler->response_handler = svn_ra_serf__handle_status_only;
- handler->response_baton = ctx;
+ handler->response_handler = svn_ra_serf__expect_empty_body;
+ handler->response_baton = handler;
- svn_ra_serf__request_create(handler);
- SVN_ERR(svn_ra_serf__context_run_wait(&ctx->done, session, iterpool));
+ SVN_ERR(svn_ra_serf__context_run_one(handler, iterpool));
switch (handler->sline.code)
{