subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1100238 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Date Fri, 06 May 2011 14:45:58 GMT
Author: cmpilato
Date: Fri May  6 14:45:57 2011
New Revision: 1100238

URL: http://svn.apache.org/viewvc?rev=1100238&view=rev
Log:
Administrivia -- no functional changes.

* subversion/libsvn_ra_serf/commit.c
  (setup_post_headers): Move this function into the section of the
    source file devoted to the POST request.
  (post_headers_iterator_callback): Add a comment about the
    assumptions this function makes.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/commit.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1100238&r1=1100237&r2=1100238&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Fri May  6 14:45:57 2011
@@ -1114,21 +1114,6 @@ setup_copy_dir_headers(serf_bucket_t *he
 }
 
 static svn_error_t *
-setup_post_headers(serf_bucket_t *headers,
-                   void *baton,
-                   apr_pool_t *pool)
-{
-#ifdef SVN_SERF_SEND_VTXN_NAME
-  /* Enable this to exercise the VTXN-NAME code based on a client
-     supplied transaction name. */
-  serf_bucket_headers_set(headers, SVN_DAV_VTXN_NAME_HEADER,
-                          svn_uuid_generate(pool));
-#endif
-
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
 setup_delete_headers(serf_bucket_t *headers,
                      void *baton,
                      apr_pool_t *pool)
@@ -1213,6 +1198,22 @@ create_txn_post_body(serf_bucket_t **bod
   return SVN_NO_ERROR;
 }
 
+/* Implements svn_ra_serf__request_header_delegate_t */
+static svn_error_t *
+setup_post_headers(serf_bucket_t *headers,
+                   void *baton,
+                   apr_pool_t *pool)
+{
+#ifdef SVN_SERF_SEND_VTXN_NAME
+  /* Enable this to exercise the VTXN-NAME code based on a client
+     supplied transaction name. */
+  serf_bucket_headers_set(headers, SVN_DAV_VTXN_NAME_HEADER,
+                          svn_uuid_generate(pool));
+#endif
+
+  return SVN_NO_ERROR;
+}
+
 
 /* Handler baton for POST request. */
 typedef struct post_response_ctx_t
@@ -1232,6 +1233,11 @@ post_headers_iterator_callback(void *bat
   commit_context_t *prc_cc = prc->commit_ctx;
   svn_ra_serf__session_t *sess = prc_cc->session;
 
+  /* If we provided a UUID to the POST request, we should get back
+     from the server an SVN_DAV_VTXN_NAME_HEADER header; otherwise we
+     expect the SVN_DAV_TXN_NAME_HEADER.  We certainly don't expect to
+     see both. */
+
   if (svn_cstring_casecmp(key, SVN_DAV_TXN_NAME_HEADER) == 0)
     {
       /* Build out txn and txn-root URLs using the txn name we're



Mime
View raw message