subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1310001 - in /subversion/branches/ev2-export: ./ contrib/client-side/emacs/ subversion/include/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs_base/bdb/ subversion/libsvn_subr/ subversion/svndumpfilter/ subversion/...
Date Thu, 05 Apr 2012 18:36:51 GMT
Author: hwright
Date: Thu Apr  5 18:36:50 2012
New Revision: 1310001

URL: http://svn.apache.org/viewvc?rev=1310001&view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk (which should fix a test failure in a patch I have
for this branch).

Modified:
    subversion/branches/ev2-export/   (props changed)
    subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el
    subversion/branches/ev2-export/subversion/include/svn_string.h
    subversion/branches/ev2-export/subversion/libsvn_client/copy.c
    subversion/branches/ev2-export/subversion/libsvn_client/diff.c
    subversion/branches/ev2-export/subversion/libsvn_delta/compat.c
    subversion/branches/ev2-export/subversion/libsvn_fs_base/bdb/env.c
    subversion/branches/ev2-export/subversion/libsvn_subr/crypto.c
    subversion/branches/ev2-export/subversion/libsvn_subr/svn_string.c
    subversion/branches/ev2-export/subversion/svndumpfilter/main.c
    subversion/branches/ev2-export/subversion/tests/cmdline/log_tests.py

Propchange: subversion/branches/ev2-export/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1309470-1309995

Modified: subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el (original)
+++ subversion/branches/ev2-export/contrib/client-side/emacs/dsvn.el Thu Apr  5 18:36:50 2012
@@ -1092,9 +1092,9 @@ outside."
       (insert str)
       (goto-char svn-output-marker)
       (while (looking-at
-              "\\([ ACDGIMRX?!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? \\([* ]\\) \\(........\\)
\\(........\\) \\(............\\) \\([^ ].*\\)\n")
-        (let ((status (match-string 1))
-              (filename (svn-normalise-path (match-string 6))))
+              "\\(?:\\(\\?.....\\)\\|\\([ ACDGIMRX!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? [*
] +[^ ]+ +[^ ]+ +[^ ]+\\) +\\([^ ].*\\)\n")
+        (let ((status (or (match-string 1) (match-string 2)))
+              (filename (svn-normalise-path (match-string 3))))
           (delete-region (match-beginning 0)
                          (match-end 0))
 	  (when (or (not svn-file-filter)

Modified: subversion/branches/ev2-export/subversion/include/svn_string.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_string.h?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_string.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_string.h Thu Apr  5 18:36:50 2012
@@ -200,7 +200,7 @@ svn_stringbuf_create(const char *cstring
 svn_stringbuf_t *
 svn_stringbuf_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);
 
-/** Create a truely empty string object (length and blocksize are 0)
+/** Create a new, empty bytestring.
  * @since New in 1.8.
  */
 svn_stringbuf_t *

Modified: subversion/branches/ev2-export/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/copy.c?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/copy.c Thu Apr  5 18:36:50 2012
@@ -1182,6 +1182,7 @@ wc_to_repos_copy(const apr_array_header_
   const char *top_src_abspath;
   svn_ra_session_t *ra_session;
   const svn_delta_editor_t *editor;
+  const char *common_wc_abspath = NULL;
   void *edit_baton;
   svn_client__committables_t *committables;
   apr_array_header_t *commit_items;
@@ -1406,6 +1407,26 @@ wc_to_repos_copy(const apr_array_header_
   SVN_ERR(svn_client__condense_commit_items(&top_dst_url,
                                             commit_items, pool));
 
+#if ENABLE_EV2_SHIMS
+  for (i = 0; !common_wc_abspath && i < commit_items->nelts; i++)
+    {
+      common_wc_abspath = APR_ARRAY_IDX(commit_items, i,
+                                        svn_client_commit_item3_t *)->path;
+    }
+
+  for (; i < commit_items->nelts; i++)
+    {
+      svn_client_commit_item3_t *item =
+        APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
+
+      if (!item->path)
+        continue;
+
+      common_wc_abspath = svn_dirent_get_longest_ancestor(common_wc_abspath,
+                                                          item->path, pool);
+    }
+#endif
+
   /* Open an RA session to DST_URL. */
   SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, top_dst_url,
                                                NULL, commit_items,
@@ -1414,7 +1435,8 @@ wc_to_repos_copy(const apr_array_header_
   /* Fetch RA commit editor. */
   SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
                         svn_client__get_shim_callbacks(ctx->wc_ctx,
-                                                       NULL, pool)));
+                                                       common_wc_abspath,
+                                                       pool)));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
                                     commit_callback,

Modified: subversion/branches/ev2-export/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/diff.c?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/diff.c Thu Apr  5 18:36:50 2012
@@ -1494,6 +1494,44 @@ check_diff_target_exists(const char *url
   return SVN_NO_ERROR;
 }
 
+
+/* Return in *RESOLVED_URL the URL which PATH_OR_URL@PEG_REVISION has in
+ * REVISION. If the object has no location in REVISION, set *RESOLVED_URL
+ * to NULL. */
+static svn_error_t *
+resolve_pegged_diff_target_url(const char **resolved_url,
+                               svn_ra_session_t *ra_session,
+                               const char *path_or_url,
+                               const svn_opt_revision_t *peg_revision,
+                               const svn_opt_revision_t *revision,
+                               svn_client_ctx_t *ctx,
+                               apr_pool_t *scratch_pool)
+{
+  svn_error_t *err;
+
+  /* Check if the PATH_OR_URL exists at REVISION. */
+  err = svn_client__repos_locations(resolved_url, NULL,
+                                    NULL, NULL,
+                                    ra_session,
+                                    path_or_url,
+                                    peg_revision,
+                                    revision,
+                                    NULL,
+                                    ctx, scratch_pool);
+  if (err)
+    {
+      if (err->apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES)
+        {
+          svn_error_clear(err);
+          *resolved_url = NULL;
+        }
+      else
+        return svn_error_trace(err);
+    }
+
+  return SVN_NO_ERROR;
+}
+
 /** Prepare a repos repos diff between PATH_OR_URL1 and
  * PATH_OR_URL2@PEG_REVISION, in the revision range REVISION1:REVISION2.
  * Return URLs and peg revisions in *URL1, *REV1 and in *URL2, *REV2.
@@ -1560,34 +1598,38 @@ diff_prepare_repos_repos(const char **ur
      actual URLs will be. */
   if (peg_revision->kind != svn_opt_revision_unspecified)
     {
-      svn_error_t *err;
+      const char *resolved_url1;
+      const char *resolved_url2;
 
-      err = svn_client__repos_locations(url1, NULL,
-                                        url2, NULL,
-                                        *ra_session,
-                                        path_or_url2,
-                                        peg_revision,
-                                        revision1,
-                                        revision2,
-                                        ctx, pool);
-      if (err)
+      SVN_ERR(resolve_pegged_diff_target_url(&resolved_url2, *ra_session,
+                                             path_or_url2, peg_revision,
+                                             revision2, ctx, pool));
+
+      SVN_ERR(svn_ra_reparent(*ra_session, *url1, pool));
+      SVN_ERR(resolve_pegged_diff_target_url(&resolved_url1, *ra_session,
+                                             path_or_url1, peg_revision,
+                                             revision1, ctx, pool));
+
+      /* Either or both URLs might have changed as a result of resolving
+       * the PATH_OR_URL@PEG_REVISION's history. If only one of the URLs
+       * could be resolved, use the same URL for URL1 and URL2, so we can
+       * show a diff that adds or removes the object (see issue #4153). */
+      if (resolved_url2)
         {
-          if (err->apr_err == SVN_ERR_CLIENT_UNRELATED_RESOURCES)
-            {
-              /* Don't give up just yet. A missing path might translate
-               * into an addition in the diff. Below, we verify that each
-               * URL exists on at least one side of the diff. */
-              svn_error_clear(err);
-            }
-          else
-            return svn_error_trace(err);
+          *url2 = resolved_url2;
+          if (!resolved_url1)
+            *url1 = resolved_url2;
         }
-      else
+      if (resolved_url1)
         {
-          /* Reparent the session, since *URL2 might have changed as a result
-             the above call. */
-          SVN_ERR(svn_ra_reparent(*ra_session, *url2, pool));
+          *url1 = resolved_url1;
+          if (!resolved_url2)
+            *url2 = resolved_url1;
         }
+
+      /* Reparent the session, since *URL2 might have changed as a result
+         the above call. */
+      SVN_ERR(svn_ra_reparent(*ra_session, *url2, pool));
     }
 
   /* Resolve revision and get path kind for the second target. */

Modified: subversion/branches/ev2-export/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_delta/compat.c?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_delta/compat.c Thu Apr  5 18:36:50 2012
@@ -1242,7 +1242,7 @@ build(struct editor_baton *eb,
                    && (operation->operation == OP_OPEN))
             operation->operation = OP_PROPSET;
         }
-      if (!operation->copyfrom_revision)
+      if (!SVN_IS_VALID_REVNUM(operation->copyfrom_revision))
         operation->copyfrom_revision = rev;
       return SVN_NO_ERROR;
     }

Modified: subversion/branches/ev2-export/subversion/libsvn_fs_base/bdb/env.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_fs_base/bdb/env.c?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_fs_base/bdb/env.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_fs_base/bdb/env.c Thu Apr  5 18:36:50
2012
@@ -490,29 +490,9 @@ bdb_close(bdb_env_t *bdb)
 
 
 static svn_error_t *
-svn_fs_bdb__close_internal(bdb_env_baton_t *bdb_baton)
+svn_fs_bdb__close_internal(bdb_env_t *bdb)
 {
   svn_error_t *err = SVN_NO_ERROR;
-  bdb_env_t *bdb = bdb_baton->bdb;
-
-  SVN_ERR_ASSERT(bdb_baton->error_info->refcount > 0);
-
-  /* Neutralize bdb_baton's pool cleanup to prevent double-close. See
-     cleanup_env_baton(). */
-  bdb_baton->bdb = NULL;
-
-  /* Note that we only bother with this cleanup if the pool is non-NULL, to
-     guard against potential races between this and the cleanup_env cleanup
-     callback.  It's not clear if that can actually happen, but better safe
-     than sorry. */
-  if (0 == --bdb_baton->error_info->refcount && bdb->pool)
-    {
-      svn_error_clear(bdb_baton->error_info->pending_errors);
-#if APR_HAS_THREADS
-      free(bdb_baton->error_info);
-      apr_threadkey_private_set(NULL, bdb->error_info);
-#endif
-    }
 
   if (--bdb->refcount != 0)
     {
@@ -540,10 +520,30 @@ svn_fs_bdb__close_internal(bdb_env_baton
 svn_error_t *
 svn_fs_bdb__close(bdb_env_baton_t *bdb_baton)
 {
+  bdb_env_t *bdb = bdb_baton->bdb;
+
   SVN_ERR_ASSERT(bdb_baton->env == bdb_baton->bdb->env);
+  SVN_ERR_ASSERT(bdb_baton->error_info->refcount > 0);
+
+  /* Neutralize bdb_baton's pool cleanup to prevent double-close. See
+     cleanup_env_baton(). */
+  bdb_baton->bdb = NULL;
+
+  /* Note that we only bother with this cleanup if the pool is non-NULL, to
+     guard against potential races between this and the cleanup_env cleanup
+     callback.  It's not clear if that can actually happen, but better safe
+     than sorry. */
+  if (0 == --bdb_baton->error_info->refcount && bdb->pool)
+    {
+      svn_error_clear(bdb_baton->error_info->pending_errors);
+#if APR_HAS_THREADS
+      free(bdb_baton->error_info);
+      apr_threadkey_private_set(NULL, bdb->error_info);
+#endif
+    }
 
   /* This may run during final pool cleanup when the lock is NULL. */
-  SVN_MUTEX__WITH_LOCK(bdb_cache_lock, svn_fs_bdb__close_internal(bdb_baton));
+  SVN_MUTEX__WITH_LOCK(bdb_cache_lock, svn_fs_bdb__close_internal(bdb));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/ev2-export/subversion/libsvn_subr/crypto.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_subr/crypto.c?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_subr/crypto.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_subr/crypto.c Thu Apr  5 18:36:50 2012
@@ -37,6 +37,10 @@
 #define NUM_ITERATIONS 1000
 
 
+/* Size (in bytes) of the random data we'll prepend to encrypted data. */
+#define RANDOM_PREFIX_LEN 4
+
+
 /* A structure for containing Subversion's cryptography-related bits
    (so we can avoid passing around APR-isms outside this module). */
 struct svn_crypto__ctx_t {
@@ -141,7 +145,7 @@ get_random_bytes(const unsigned char **r
 #if APR_HAS_RANDOM
   apr_status_t apr_err;
   unsigned char *bytes;
-  
+
   bytes = apr_palloc(result_pool, rand_len);
   apr_err = apr_generate_random_bytes(bytes, rand_len);
   if (apr_err != APR_SUCCESS)
@@ -164,29 +168,40 @@ svn_crypto__context_create(svn_crypto__c
 {
   apr_status_t apr_err;
   const apu_err_t *apu_err = NULL;
+  apr_crypto_t *apr_crypto;
   const apr_crypto_driver_t *driver;
 
   CRYPTO_INIT(result_pool);
 
-  *ctx = apr_palloc(result_pool, sizeof(**ctx));
-
+  /* Load the crypto driver.
+ 
+     ### TODO: For the sake of flexibility, should we use
+     ### APU_CRYPTO_RECOMMENDED_DRIVER instead of hard coding
+     ### "openssl" here?
+
+     NOTE: Potential bugs in get_driver() imply we might get
+     APR_SUCCESS and NULL.  Sigh. Just be a little more careful in
+     error generation here.  */
   apr_err = apr_crypto_get_driver(&driver, "openssl", NULL, &apu_err,
                                   result_pool);
-  /* Potential bugs in get_driver() imply we might get APR_SUCCESS and NULL.
-     Sigh. Just be a little more careful in error generation here.  */
   if (apr_err != APR_SUCCESS)
     return svn_error_create(apr_err, err_from_apu_err(apr_err, apu_err),
                             _("OpenSSL crypto driver error"));
   if (driver == NULL)
     return svn_error_create(APR_EGENERAL,
                             err_from_apu_err(APR_EGENERAL, apu_err),
-                            _("Bad return value while loading"));
+                            _("Bad return value while loading crypto "
+                              "driver"));
 
-  apr_err = apr_crypto_make(&(*ctx)->crypto, driver, NULL, result_pool);
-  if (apr_err != APR_SUCCESS || (*ctx)->crypto == NULL)
+  apr_err = apr_crypto_make(&apr_crypto, driver, NULL, result_pool);
+  if (apr_err != APR_SUCCESS || apr_crypto == NULL)
     return svn_error_create(apr_err, NULL,
                             _("Error creating OpenSSL crypto context"));
 
+  /* Allocate and initialize our crypto context. */
+  *ctx = apr_palloc(result_pool, sizeof(**ctx));
+  (*ctx)->crypto = apr_crypto;
+
   return SVN_NO_ERROR;
 }
 
@@ -251,8 +266,14 @@ svn_crypto__encrypt_password(const svn_s
                                   scratch_pool);
   if (apr_err != APR_SUCCESS)
     return svn_error_trace(crypto_error_create(
-                             ctx, apr_err,
-                             _("Error creating derived key")));
+                               ctx, apr_err,
+                               _("Error creating derived key")));
+  if (! key)
+    return svn_error_create(APR_EGENERAL, NULL,
+                            _("Error creating derived key"));
+  if (iv_len == 0)
+    return svn_error_create(APR_EGENERAL, NULL,
+                            _("Unexpected IV length returned"));
 
   /* Generate the proper length IV.  */
   SVN_ERR(get_random_bytes(&iv_vector, ctx, iv_len, result_pool));
@@ -266,8 +287,7 @@ svn_crypto__encrypt_password(const svn_s
                              _("Error initializing block encryption")));
 
   /* Generate a 4-byte prefix. */
-#define PREFIX_LEN 4
-  SVN_ERR(get_random_bytes(&prefix, ctx, PREFIX_LEN, scratch_pool));
+  SVN_ERR(get_random_bytes(&prefix, ctx, RANDOM_PREFIX_LEN, scratch_pool));
 
   /* Combine our prefix, original password, and appropriate padding.
      We won't bother padding if the prefix and password combined
@@ -275,12 +295,12 @@ svn_crypto__encrypt_password(const svn_s
      however, we'll drop a NUL byte after the password and pad with
      random stuff after that to the block boundary. */
   password_len = strlen(password);
-  assembled_len = PREFIX_LEN + password_len;
+  assembled_len = RANDOM_PREFIX_LEN + password_len;
   if ((assembled_len % block_size) == 0)
     {
       assembled = apr_palloc(scratch_pool, assembled_len);
-      memcpy(assembled, prefix, PREFIX_LEN);
-      memcpy(assembled + PREFIX_LEN, password, password_len);
+      memcpy(assembled, prefix, RANDOM_PREFIX_LEN);
+      memcpy(assembled + RANDOM_PREFIX_LEN, password, password_len);
     }
   else
     {
@@ -290,10 +310,11 @@ svn_crypto__encrypt_password(const svn_s
       SVN_ERR(get_random_bytes(&padding, ctx, pad_len, scratch_pool));
       assembled_len = assembled_len + 1 + pad_len;
       assembled = apr_palloc(scratch_pool, assembled_len);
-      memcpy(assembled, prefix, PREFIX_LEN);
-      memcpy(assembled + PREFIX_LEN, password, password_len);
-      *(assembled + PREFIX_LEN + password_len) = '\0';
-      memcpy(assembled + PREFIX_LEN + password_len + 1, padding, pad_len);
+      memcpy(assembled, prefix, RANDOM_PREFIX_LEN);
+      memcpy(assembled + RANDOM_PREFIX_LEN, password, password_len);
+      *(assembled + RANDOM_PREFIX_LEN + password_len) = '\0';
+      memcpy(assembled + RANDOM_PREFIX_LEN + password_len + 1, 
+             padding, pad_len);
     }      
     
   /* Get the length that we need to allocate.  */
@@ -368,7 +389,17 @@ svn_crypto__decrypt_password(const char 
                                   ctx->crypto, scratch_pool);
   if (apr_err != APR_SUCCESS)
     return svn_error_trace(crypto_error_create(
-                               ctx, apr_err, _("Error creating derived key")));
+                               ctx, apr_err,
+                               _("Error creating derived key")));
+  if (! key)
+    return svn_error_create(APR_EGENERAL, NULL,
+                            _("Error creating derived key"));
+  if (iv_len == 0)
+    return svn_error_create(APR_EGENERAL, NULL,
+                            _("Unexpected IV length returned"));
+  if (iv_len != iv->len)
+    return svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
+                            _("Provided IV has incorrect length"));
   
   apr_err = apr_crypto_block_decrypt_init(&block_ctx, &block_size,
                                           (unsigned char *)iv->data,
@@ -410,8 +441,9 @@ svn_crypto__decrypt_password(const char 
 
   /* Copy the non-random bits of the resulting plaintext, skipping the
      prefix and ignoring any trailing padding. */
-  *plaintext = apr_pstrndup(result_pool, (const char *)(result + PREFIX_LEN),
-                            result_len + final_len - PREFIX_LEN);
+  *plaintext = apr_pstrndup(result_pool,
+                            (const char *)(result + RANDOM_PREFIX_LEN),
+                            result_len + final_len - RANDOM_PREFIX_LEN);
 
  cleanup:
   apr_crypto_block_cleanup(block_ctx);

Modified: subversion/branches/ev2-export/subversion/libsvn_subr/svn_string.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_subr/svn_string.c?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_subr/svn_string.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_subr/svn_string.c Thu Apr  5 18:36:50
2012
@@ -132,7 +132,9 @@ create_string(const char *data, apr_size
   return new_string;
 }
 
-static char empty_buffer[1] = {0};
+/* A data buffer for a zero-length string (just a null terminator).  Many
+ * svn_string_t instances may share this same buffer. */
+static const char empty_buffer[1] = {0};
 
 svn_string_t *
 svn_string_create_empty(apr_pool_t *pool)
@@ -281,6 +283,9 @@ svn_stringbuf__morph_into_string(svn_str
 
 /* svn_stringbuf functions */
 
+/* Create a stringbuf referring to (not copying) an existing block of memory
+ * at DATA, of which SIZE bytes are the user data and BLOCKSIZE bytes are
+ * allocated in total.  DATA[SIZE] must be a zero byte. */
 static svn_stringbuf_t *
 create_stringbuf(char *data, apr_size_t size, apr_size_t blocksize,
                  apr_pool_t *pool)
@@ -289,6 +294,9 @@ create_stringbuf(char *data, apr_size_t 
 
   new_string = apr_palloc(pool, sizeof(*new_string));
 
+  SVN_ERR_ASSERT_NO_RETURN(size < blocksize);
+  SVN_ERR_ASSERT_NO_RETURN(data[size] == '\0');
+
   new_string->data = data;
   new_string->len = size;
   new_string->blocksize = blocksize;
@@ -300,12 +308,7 @@ create_stringbuf(char *data, apr_size_t 
 svn_stringbuf_t *
 svn_stringbuf_create_empty(apr_pool_t *pool)
 {
-  /* All instances share the same zero-length buffer.
-   * Some algorithms, however, assume that they may write
-   * the terminating zero. So, empty_buffer must be writable
-   * (a simple (char *)"" will cause SEGFAULTs). */
-
-  return create_stringbuf(empty_buffer, 0, 0, pool);
+  return svn_stringbuf_create_ensure(0, pool);
 }
 
 svn_stringbuf_t *

Modified: subversion/branches/ev2-export/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svndumpfilter/main.c?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/ev2-export/subversion/svndumpfilter/main.c Thu Apr  5 18:36:50 2012
@@ -79,7 +79,7 @@ create_stdio_stream(svn_stream_t **strea
 
 /* Writes a property in dumpfile format to given stringbuf. */
 static void
-write_prop_to_stringbuf(svn_stringbuf_t **strbuf,
+write_prop_to_stringbuf(svn_stringbuf_t *strbuf,
                         const char *name,
                         const svn_string_t *value)
 {
@@ -89,24 +89,24 @@ write_prop_to_stringbuf(svn_stringbuf_t 
 
   /* Output name length, then name. */
   namelen = strlen(name);
-  svn_stringbuf_appendbytes(*strbuf, "K ", 2);
+  svn_stringbuf_appendbytes(strbuf, "K ", 2);
 
   bytes_used = apr_snprintf(buf, sizeof(buf), "%" APR_SIZE_T_FMT, namelen);
-  svn_stringbuf_appendbytes(*strbuf, buf, bytes_used);
-  svn_stringbuf_appendbyte(*strbuf, '\n');
+  svn_stringbuf_appendbytes(strbuf, buf, bytes_used);
+  svn_stringbuf_appendbyte(strbuf, '\n');
 
-  svn_stringbuf_appendbytes(*strbuf, name, namelen);
-  svn_stringbuf_appendbyte(*strbuf, '\n');
+  svn_stringbuf_appendbytes(strbuf, name, namelen);
+  svn_stringbuf_appendbyte(strbuf, '\n');
 
   /* Output value length, then value. */
-  svn_stringbuf_appendbytes(*strbuf, "V ", 2);
+  svn_stringbuf_appendbytes(strbuf, "V ", 2);
 
   bytes_used = apr_snprintf(buf, sizeof(buf), "%" APR_SIZE_T_FMT, value->len);
-  svn_stringbuf_appendbytes(*strbuf, buf, bytes_used);
-  svn_stringbuf_appendbyte(*strbuf, '\n');
+  svn_stringbuf_appendbytes(strbuf, buf, bytes_used);
+  svn_stringbuf_appendbyte(strbuf, '\n');
 
-  svn_stringbuf_appendbytes(*strbuf, value->data, value->len);
-  svn_stringbuf_appendbyte(*strbuf, '\n');
+  svn_stringbuf_appendbytes(strbuf, value->data, value->len);
+  svn_stringbuf_appendbyte(strbuf, '\n');
 }
 
 
@@ -364,7 +364,7 @@ output_revision(struct revision_baton_t 
           const char *pname = svn__apr_hash_index_key(hi);
           const svn_string_t *pval = svn__apr_hash_index_val(hi);
 
-          write_prop_to_stringbuf(&props, pname, pval);
+          write_prop_to_stringbuf(props, pname, pval);
         }
       svn_stringbuf_appendcstr(props, "PROPS-END\n");
       svn_stringbuf_appendcstr(rb->header,
@@ -804,7 +804,7 @@ set_node_property(void *node_baton,
       value = filtered_mergeinfo;
     }
 
-  write_prop_to_stringbuf(&(nb->props), name, value);
+  write_prop_to_stringbuf(nb->props, name, value);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/log_tests.py?rev=1310001&r1=1310000&r2=1310001&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/log_tests.py Thu Apr  5 18:36:50
2012
@@ -2217,8 +2217,8 @@ def log_xml_old(sbox):
                                          expected_paths=paths)
 
 
-@XFail()
 @Issue(4153)
+@XFail(svntest.main.is_ra_type_dav)
 def log_diff_moved(sbox):
   "log --diff on moved file"
 



Mime
View raw message