subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1584342 - /subversion/trunk/subversion/libsvn_ra_serf/update.c
Date Thu, 03 Apr 2014 11:15:58 GMT
Author: philip
Date: Thu Apr  3 11:15:57 2014
New Revision: 1584342

URL: http://svn.apache.org/r1584342
Log:
Fix issue 4412, locks getting lost during update.  The root cause
was some buggy client code added as a workaround for an old server
bug.  The server bug was fixed by r869988 and released in 1.5.0. The
client side fix doesn't work and even if it did it is only needed
by clients using pre-1.5 servers if they force http-bulk-updates=no.
Removing the buggy client-side workaround fixes issue 4412 allowing
1.8 clients to use locks with 1.6 servers before 1.6.17.

* subversion/libsvn_ra_serf/update.c
  (struct report_context_t): Remove token hash.
  (create_file_baton): Don't get token from hash.
  (set_path, link_path): Don't store token in hash.
  (make_update_reporter): Don't create hash.

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

Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1584342&r1=1584341&r2=1584342&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Thu Apr  3 11:15:57 2014
@@ -426,9 +426,6 @@ struct report_context_t {
      files/dirs? */
   svn_boolean_t add_props_included;
 
-  /* Path -> lock token mapping. */
-  apr_hash_t *lock_path_tokens;
-
   /* Path -> const char *repos_relpath mapping */
   apr_hash_t *switched_paths;
 
@@ -684,9 +681,6 @@ create_file_baton(file_baton_t **new_fil
   file->base_rev = SVN_INVALID_REVNUM;
   file->copyfrom_rev = SVN_INVALID_REVNUM;
 
-  file->lock_token = svn_hash_gets(ctx->lock_path_tokens,
-                                   file->relpath);
-
   *new_file = file;
 
   ctx->cur_file = file;
@@ -2198,13 +2192,6 @@ set_path(void *report_baton,
 
   SVN_ERR(svn_stream_write(report->body_template, buf->data, &buf->len));
 
-  if (lock_token)
-    {
-      svn_hash_sets(report->lock_path_tokens,
-                    apr_pstrdup(report->pool, path),
-                    apr_pstrdup(report->pool, lock_token));
-    }
-
   return SVN_NO_ERROR;
 }
 
@@ -2275,12 +2262,6 @@ link_path(void *report_baton,
   link = apr_pstrdup(report->pool, link + 1);
   svn_hash_sets(report->switched_paths, path, link);
 
-  if (lock_token)
-    {
-      svn_hash_sets(report->lock_path_tokens,
-                    path, apr_pstrdup(report->pool, lock_token));
-    }
-
   if (!path[0] && report->update_target[0])
     {
       /* The update root is switched. Make sure we store it the way
@@ -2766,7 +2747,6 @@ make_update_reporter(svn_ra_session_t *r
   report->ignore_ancestry = ignore_ancestry;
   report->send_copyfrom_args = send_copyfrom_args;
   report->text_deltas = text_deltas;
-  report->lock_path_tokens = apr_hash_make(report->pool);
   report->switched_paths = apr_hash_make(report->pool);
 
   report->source = src_path;



Mime
View raw message