svn commit: r1325652 - in /subversion/trunk/subversion/libsvn_fs_fs: temp_serializer.c temp_serializer.h

2012-04-13 Thread julianfoad
Author: julianfoad
Date: Fri Apr 13 08:36:20 2012
New Revision: 1325652

URL: http://svn.apache.org/viewvc?rev=1325652&view=rev
Log:
* subversion/libsvn_fs_fs/temp_serializer.h,
  subversion/libsvn_fs_fs/temp_serializer.c
  (svn_fs_fs__combine_number_and_string, svn_fs_fs__combine_two_numbers):
  Remove duplicate doc strings from definition, and tweak grammar.

Modified:
subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c
subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h

Modified: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c?rev=1325652&r1=1325651&r2=1325652&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c Fri Apr 13 
08:36:20 2012
@@ -64,10 +64,6 @@ encode_number(apr_int64_t number, char *
   return key_buffer;
 }
 
-/* Prepend the NUMBER to the STRING in a space efficient way that no other
- * (number,string) combination can produce the same result.
- * Allocate temporaries as well as the result from POOL.
- */
 const char*
 svn_fs_fs__combine_number_and_string(apr_int64_t number,
  const char *string,
@@ -91,10 +87,6 @@ svn_fs_fs__combine_number_and_string(apr
   return key;
 }
 
-/* Combine the numbers A and B a space efficient way that no other
- * combination of numbers can produce the same result.
- * Allocate temporaries as well as the result from POOL.
- */
 const char*
 svn_fs_fs__combine_two_numbers(apr_int64_t a,
apr_int64_t b,

Modified: subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h?rev=1325652&r1=1325651&r2=1325652&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h Fri Apr 13 
08:36:20 2012
@@ -26,7 +26,7 @@
 #include "fs.h"
 
 /**
- * Prepend the @a number to the @a string in a space efficient way that
+ * Prepend the @a number to the @a string in a space efficient way such that
  * no other (number,string) combination can produce the same result.
  * Allocate temporaries as well as the result from @a pool.
  */
@@ -36,8 +36,8 @@ svn_fs_fs__combine_number_and_string(apr
  apr_pool_t *pool);
 
 /**
- * Combine the numbers @a a and @a b a space efficient way that no other
- * combination of numbers can produce the same result.
+ * Combine the numbers @a a and @a b in a space efficient way such that no
+ * other combination of numbers can produce the same result.
  * Allocate temporaries as well as the result from @a pool.
  */
 const char*




[Subversion Wiki] Update of "MultiLayerMoves" by PhilipMartin

2012-04-13 Thread Apache subversion Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Subversion Wiki" for 
change notification.

The "MultiLayerMoves" page has been changed by PhilipMartin:
http://wiki.apache.org/subversion/MultiLayerMoves?action=diff&rev1=20&rev2=21

  ||0 ||A/B|| normal   ||  ||
  ||0 ||A/B/C  || normal   ||  ||
  ||0 ||A/B/C/D|| normal   ||  ||
+  '''table A1''' ||
  
  Move A/B/C/D to X
  
@@ -20, +21 @@

  ||0 ||A/B/C  || normal   ||  ||
  ||0 ||A/B/C/D|| normal   ||  ||
  ||4 ||A/B/C/D|| base-deleted || X||
+  '''table A2''' ||
  
  Move A/B to Y
  
@@ -31, +33 @@

  ||2 ||A/B|| base-deleted || Y||
  ||2 ||A/B/C  || base-deleted ||  ||
  ||2 ||A/B/C/D|| base-deleted || X||
+  '''table A3''' ||
  
  Replace A/B with a copy that includes a C/D
  
@@ -42, +45 @@

  ||2 ||A/B|| normal   || Y||
  ||2 ||A/B/C  || normal   ||  ||
  ||2 ||A/B/C/D|| normal   || X||
+  '''table A4''' ||
  
  Move A/B/C to Z
  
@@ -55, +59 @@

  ||2 ||A/B/C/D|| normal   || X||
  ||3 ||A/B/C  || base-deleted || Z||
  ||3 ||A/B/C/D|| base-deleted ||  ||
+  '''table A5''' ||
  
  Replace A/B/C with a copy that includes D
  
@@ -68, +73 @@

  ||2 ||A/B/C/D|| normal   || X||
  ||3 ||A/B/C  || normal   || Z||
  ||3 ||A/B/C/D|| normal   ||  ||
+  '''table A6''' ||
  
  
  Move A/B/C/D to Q
@@ -83, +89 @@

  ||3 ||A/B/C  || normal   || Z||
  ||3 ||A/B/C/D|| normal   ||  ||
  ||4 ||A/B/C/D|| base-deleted || Q||
+  '''table A7''' ||
  
  Now scan_deletion(A/B/C/D) needs to tell us moved_to is Q at op-depth=4, Z/D 
at op-depth=3, X at op-depth=2. Quite how it does this is an open question. 
Does the caller pass the op-depth? Where would the caller get it?  Does the 
function return some sort of array of (op-depth, moved-to) pairs?
  
@@ -91, +98 @@

  || op-depth || local-relpath || presence || moved-to ||
  ||0 ||A  || normal   ||  ||
  ||0 ||A/F|| normal   ||  ||
+  '''table B1''' ||
  
  Move A to B and then B/F to B/G
  
@@ -101, +109 @@

  ||1 ||A/F|| base-deleted ||  ||
  ||1 ||B  || normal   ||  ||
  ||1 ||B/F|| normal   ||  ||
+  '''table B2''' ||
  
  || op-depth || local-relpath || presence || moved-to ||
  ||0 ||A  || normal   ||  ||
@@ -111, +120 @@

  ||1 ||B/F|| normal   ||  ||
  ||2 ||B/F|| base-deleted ||B/G   ||
  ||2 ||B/G|| normal   ||  ||
+  '''table B3''' ||
  
  Alternatively, move A/F to A/G and then A to B
  
@@ -119, +129 @@

  ||0 ||A/F|| normal   ||  ||
  ||2 ||A/F|| base-deleted ||   A/G||
  ||2 ||A/G|| normal   ||  ||
+  '''table B4''' ||
  
  || op-depth || local-relpath || presence || moved-to ||
  ||0 ||A  || normal   ||  ||
@@ -129, +140 @@

  ||1 ||B/F|| normal   ||  ||
  ||2 ||B/F|| base-deleted ||B/G   ||
  ||2 ||B/G|| normal   ||  ||
+  '''table B5''' ||
  
  The final database state is the same independent of the order of the moves.  
The second move in the second case causes the explicit moved-to associated with 
A/F to be removed.
  
@@ -143, +155 @@

  ||1 ||C/F|| normal   ||  ||
  ||2 ||C/F|| base-deleted ||   C/G||
  ||2 ||C/G|| normal   ||  ||
+  '''table C1''' ||
  
  There is only one move recorded C/F->C/G.  The move inside the copy is 
recorded in a similar way to the move inside a move. The move can happen before 
the copy:
  
@@ -151, +164 @@

  ||0 ||A/F|| normal   ||  ||
  ||2 ||A/F|| base-deleted ||   A/G||
  ||2 ||A/G|| normal   ||  ||
+  '''table C2''' ||
  
  || op-depth || local-relpath || presence || moved-to ||
  ||0 ||A  || normal   ||  ||
@@ -161, +175 @@

  ||1 ||C/F|| normal   ||  ||
  ||2 ||C/F|| base-deleted ||   C/G||
  ||2 ||C/G|| normal   ||  

[Subversion Wiki] Update of "MultiLayerMoves" by PhilipMartin

2012-04-13 Thread Apache subversion Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Subversion Wiki" for 
change notification.

The "MultiLayerMoves" page has been changed by PhilipMartin:
http://wiki.apache.org/subversion/MultiLayerMoves?action=diff&rev1=21&rev2=22

  ||2 ||B/G|| normal   ||  ||
   '''table D6''' ||
  
- = Update Primer (Editor v1) =
+ = Update Primer =
  
- Updating changes the base node tree in several steps converting to and from 
mixed-revisions.  Starting with a simple singe-revision tree:
+ Updating using the current v1 editor changes the base node tree in several 
steps converting to and from mixed-revisions.  Starting with a simple 
singe-revision tree:
  
  || op-depth || local-relpath || presence || revision ||
  ||  0   ||   || normal   || 3||
@@ -310, +310 @@

  ||  0   ||A/B|| normal   || 4||
  ||  0   ||B  || normal   || 4||
   '''table E7''' ||
+ 
+ We don't yet know all the details of the v2 editor update but it is likely 
that the modify file A/f call will change the original single-revision tree 
into:
+ 
+ || op-depth || local-relpath || presence || revision ||
+ ||  0   ||   || normal   || 3||
+ ||  0   ||A  || normal   || 3||
+ ||  0   ||A/f|| normal   || 4||
+ ||  0   ||A/B|| normal   || 3||
+ ||  0   ||B  || normal   || 3||
+  '''table E8''' ||
+ 
+ and then the complete call will update the rest of the tree to revision 4 
giving table E7.
  
  = Updating a Move =
  


svn commit: r1325719 - in /subversion/trunk/subversion: include/private/svn_client_private.h libsvn_client/copy.c libsvn_client/merge.c libsvn_client/mergeinfo.c libsvn_client/util.c

2012-04-13 Thread julianfoad
Author: julianfoad
Date: Fri Apr 13 11:33:07 2012
New Revision: 1325719

URL: http://svn.apache.org/viewvc?rev=1325719&view=rev
Log:
Simplify the semantics of svn_client__wc_node_get_origin().  Only one of
its callers cared about getting the repository root URL when the node itself
has no origin in the repository, so that is now done outside the function.

* subversion/include/private/svn_client_private.h,
  subversion/libsvn_client/util.c
  (svn_client__wc_node_get_origin): If the node has no origin, return NULL
for the pathrev instead of a pathrev with a NULL URL inside it.

* subversion/libsvn_client/copy.c
  (calculate_target_mergeinfo): Adjust the check for null.

* subversion/libsvn_client/merge.c
  (get_full_mergeinfo): Adjust the check for null.
  (open_target_wc): If the path-rev is null, fetch the repository root
information separately.

* subversion/libsvn_client/mergeinfo.c
  (get_mergeinfo): Adjust the check for null.

Modified:
subversion/trunk/subversion/include/private/svn_client_private.h
subversion/trunk/subversion/libsvn_client/copy.c
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/libsvn_client/mergeinfo.c
subversion/trunk/subversion/libsvn_client/util.c

Modified: subversion/trunk/subversion/include/private/svn_client_private.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_client_private.h?rev=1325719&r1=1325718&r2=1325719&view=diff
==
--- subversion/trunk/subversion/include/private/svn_client_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_client_private.h Fri Apr 13 
11:33:07 2012
@@ -146,10 +146,7 @@ svn_client__youngest_common_ancestor(con
 
 /* Set *ORIGIN_P to the origin of the WC node at WC_ABSPATH.  If the node
  * is a local copy, give the copy-from location.  If the node is locally
- * added or deleted, set the REV and URL fields to SVN_INVALID_REVNUM and
- * NULL respectively, but still give the correct repository root URL and
- * UUID.
- */
+ * added or deleted, set *ORIGIN_P to NULL. */
 svn_error_t *
 svn_client__wc_node_get_origin(svn_client__pathrev_t **origin_p,
const char *wc_abspath,

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1325719&r1=1325718&r2=1325719&view=diff
==
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Fri Apr 13 11:33:07 2012
@@ -100,10 +100,12 @@ calculate_target_mergeinfo(svn_ra_sessio
   SVN_ERR(svn_client__wc_node_get_origin(&origin,
  local_abspath, ctx,
  pool, pool));
-  src_revnum = origin->rev;
-  src_url = origin->url;
-
-  if (! src_url)
+  if (origin)
+{
+  src_revnum = origin->rev;
+  src_url = origin->url;
+}
+  else
 locally_added = TRUE;
 }
 

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1325719&r1=1325718&r2=1325719&view=diff
==
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Fri Apr 13 11:33:07 2012
@@ -3529,7 +3529,7 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
   SVN_ERR(svn_client__wc_node_get_origin(&target, target_abspath, ctx,
  scratch_pool, scratch_pool));
 
-  if (! target->url)
+  if (! target)
 {
   /* We've been asked to operate on a locally added target, so its
* implicit mergeinfo is empty. */
@@ -9292,7 +9292,25 @@ open_target_wc(merge_target_t **target_p
scratch_pool));
   SVN_ERR(svn_client__wc_node_get_origin(&origin, wc_abspath, ctx,
  result_pool, scratch_pool));
-  target->loc = *origin;
+  if (origin)
+{
+  target->loc = *origin;
+}
+  else
+{
+  /* The node has no location in the repository. It's unversioned or
+   * locally added or locally deleted.
+   *
+   * If it's locally added or deleted, find the repository root
+   * URL and UUID anyway, and leave the node URL and revision as NULL
+   * and INVALID.  If it's unversioned, this will throw an error. */
+  SVN_ERR(svn_wc__node_get_repos_info(&target->loc.repos_root_url,
+  &target->loc.repos_uuid,
+  ctx->wc_ctx, wc_abspath,
+  result_pool, scratch_pool));
+  target->loc.rev = 

svn commit: r1325725 - /subversion/trunk/subversion/libsvn_client/copy.c

2012-04-13 Thread julianfoad
Author: julianfoad
Date: Fri Apr 13 11:55:21 2012
New Revision: 1325725

URL: http://svn.apache.org/viewvc?rev=1325725&view=rev
Log:
Remove a local function that's no longer helpful.  In copy.c, the
calculate_target_mergeinfo() function has for years not done any calculating
or combining like its doc string says, but simply fetches repository
mergeinfo.  Only one of its three callers needed any more than a simple
call to svn_client__get_repos_mergeinfo().

* subversion/libsvn_client/copy.c
  (calculate_target_mergeinfo): Remove.
  (wc_to_repos_copy): Use in-line equivalent code.
  (repos_to_repos_copy, repos_to_wc_copy_single): Call
svn_client__get_repos_mergeinfo() directly.

Modified:
subversion/trunk/subversion/libsvn_client/copy.c

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1325725&r1=1325724&r2=1325725&view=diff
==
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Fri Apr 13 11:55:21 2012
@@ -70,58 +70,6 @@
 
 /*** Code. ***/
 
-/* Obtain the implied mergeinfo and the existing mergeinfo of the
-   source path, combine them and return the result in
-   *TARGET_MERGEINFO.  One of LOCAL_ABSPATH and SRC_URL must be valid,
-   the other must be NULL. */
-static svn_error_t *
-calculate_target_mergeinfo(svn_ra_session_t *ra_session,
-   apr_hash_t **target_mergeinfo,
-   const char *local_abspath,
-   const char *src_url,
-   svn_revnum_t src_revnum,
-   svn_client_ctx_t *ctx,
-   apr_pool_t *pool)
-{
-  svn_boolean_t locally_added = FALSE;
-  apr_hash_t *src_mergeinfo = NULL;
-
-  SVN_ERR_ASSERT((local_abspath && !src_url) || (!local_abspath && src_url));
-
-  /* If we have a schedule-add WC path (which was not copied from
- elsewhere), it doesn't have any repository mergeinfo, so don't
- bother checking. */
-  if (local_abspath)
-{
-  svn_client__pathrev_t *origin;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
-  SVN_ERR(svn_client__wc_node_get_origin(&origin,
- local_abspath, ctx,
- pool, pool));
-  if (origin)
-{
-  src_revnum = origin->rev;
-  src_url = origin->url;
-}
-  else
-locally_added = TRUE;
-}
-
-  if (! locally_added)
-{
-  /* Fetch any existing (explicit) mergeinfo. */
-  SVN_ERR(svn_client__get_repos_mergeinfo(&src_mergeinfo, ra_session,
-  src_url, src_revnum,
-  svn_mergeinfo_inherited,
-  TRUE, pool));
-}
-
-  *target_mergeinfo = src_mergeinfo;
-  return SVN_NO_ERROR;
-}
-
 /* Extend the mergeinfo for the single WC path TARGET_WCPATH, adding
MERGEINFO to any mergeinfo pre-existing in the WC. */
 static svn_error_t *
@@ -805,9 +753,10 @@ repos_to_repos_copy(const apr_array_head
 
   /* Go ahead and grab mergeinfo from the source, too. */
   SVN_ERR(svn_ra_reparent(ra_session, pair->src_abspath_or_url, pool));
-  SVN_ERR(calculate_target_mergeinfo(ra_session, &mergeinfo, NULL,
- pair->src_abspath_or_url,
- pair->src_revnum, ctx, pool));
+  SVN_ERR(svn_client__get_repos_mergeinfo(
+&mergeinfo, ra_session,
+pair->src_abspath_or_url, pair->src_revnum,
+svn_mergeinfo_inherited, TRUE /*squelch_incapable*/, pool));
   if (mergeinfo)
 SVN_ERR(svn_mergeinfo_to_string(&info->mergeinfo, mergeinfo, pool));
 
@@ -1371,17 +1320,26 @@ wc_to_repos_copy(const apr_array_header_
 svn_client__copy_pair_t *);
   svn_client_commit_item3_t *item =
 APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
+  svn_client__pathrev_t *src_origin;
 
   svn_pool_clear(iterpool);
 
+  SVN_ERR(svn_client__wc_node_get_origin(&src_origin,
+ pair->src_abspath_or_url,
+ ctx, iterpool, iterpool));
+
   /* Set the mergeinfo for the destination to the combined merge
  info known to the WC and the repository. */
   item->outgoing_prop_changes = apr_array_make(pool, 1,
sizeof(svn_prop_t *));
-  SVN_ERR(calculate_target_mergeinfo(ra_session, &mergeinfo,
- pair->src_abspath_or_url,
- NULL, SVN_INVALID_REVNUM,
-

svn commit: r1325776 - /subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c

2012-04-13 Thread julianfoad
Author: julianfoad
Date: Fri Apr 13 14:02:14 2012
New Revision: 1325776

URL: http://svn.apache.org/viewvc?rev=1325776&view=rev
Log:
* subversion/libsvn_wc/ambient_depth_filter_editor.c
  (ambient_read_info): Write a true and proper doc string.

Modified:
subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c

Modified: subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c?rev=1325776&r1=1325775&r2=1325776&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c 
(original)
+++ subversion/trunk/subversion/libsvn_wc/ambient_depth_filter_editor.c Fri Apr 
13 14:02:14 2012
@@ -113,8 +113,12 @@ struct dir_baton
   void *wrapped_baton;
 };
 
-/* Helper to call either svn_wc__db_base_get_info or svn_wc__db_read_info for
-   obtaining information for the ambient depth editor */
+/* Fetch the STATUS, KIND and DEPTH of the base node at LOCAL_ABSPATH.
+ * If there is no such base node, report 'normal', 'unknown' and 'unknown'
+ * respectively.
+ *
+ * STATUS and/or DEPTH may be NULL if not wanted; KIND must not be NULL.
+ */
 static svn_error_t *
 ambient_read_info(svn_wc__db_status_t *status,
   svn_kind_t *kind,




Re: svn commit: r1325478 - in /subversion/trunk/subversion: include/svn_pools.h libsvn_subr/pool.c

2012-04-13 Thread Daniel Shahaf
stef...@apache.org wrote on Thu, Apr 12, 2012 at 20:02:37 -:
> Author: stefan2
> Date: Thu Apr 12 20:02:36 2012
> New Revision: 1325478
> 
> URL: http://svn.apache.org/viewvc?rev=1325478&view=rev
> Log:
> Introduce a new API function to create and initialize a new
> APR pool allocator. Make its thread-safety properties
> explicit in the docstring.
> 
> Will be used by the next commit to replace boilerplate code.
> 
> * subversion/include/svn_pools.h
>   (svn_pool_create_allocator): declare new API function
> * subversion/libsvn_subr/pool.c
>   (svn_pool_create_allocator): declare new API function
> 
> Modified:
> subversion/trunk/subversion/include/svn_pools.h
> subversion/trunk/subversion/libsvn_subr/pool.c
> 
> Modified: subversion/trunk/subversion/include/svn_pools.h
> URL: 
> http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_pools.h?rev=1325478&r1=1325477&r2=1325478&view=diff
> ==
> --- subversion/trunk/subversion/include/svn_pools.h (original)
> +++ subversion/trunk/subversion/include/svn_pools.h Thu Apr 12 20:02:36 2012
> @@ -30,7 +30,7 @@
>  #ifndef SVN_POOLS_H
>  #define SVN_POOLS_H
>  
> -#include 
> +#include "svn_types.h"
>  
>  #ifdef __cplusplus
>  extern "C" {
> @@ -86,6 +86,23 @@ svn_pool_create_ex_debug(pool, allocator
>   */
>  #define svn_pool_destroy apr_pool_destroy
>  
> +/** Return a new allocator.  This function limits the unused memory in the
> + * new allocator to @ref SVN_ALLOCATOR_RECOMMENDED_MAX_FREE and ensures
> + * proper synchronization if the allocator is used by multiple threads.
> + *
> + * If your application uses multiple threads, creating a separate allocator
> + * for each of these threads may not be feasible. Set the @a thread_safe
> + * parameter to @c TRUE in that case.  Pools will still not thread-safe, i.e.
> + * access to them may require explicit serialization.  Set the parameter to
> + * @c FALSE, otherwise, to maximize performance. 
> + * 
> + * To access the owner pool, which can also serve as the root pool for your
> + * sub-pools, call @c apr_allocator_get_owner().
> + *
> + * @since: New in 1.8
> + */
> +apr_allocator_t *
> +svn_pool_create_allocator(svn_boolean_t thread_safe);

Should this be an svn-private API?  Should it take a parameter
that allows overriding the SVN_ALLOCATOR_RECOMMENDED_MAX_FREE default?


svn commit: r1325787 - in /subversion/trunk/subversion/libsvn_wc: adm_crawler.c entries.c wc_db.h

2012-04-13 Thread julianfoad
Author: julianfoad
Date: Fri Apr 13 14:39:44 2012
New Revision: 1325787

URL: http://svn.apache.org/viewvc?rev=1325787&view=rev
Log:
Since ages ago, svn_wc__db_base_get_info() never returns null repository
info when status is normal, so there's no need for the caller to check and
scan for the repository info.  Correct the docs and remove the unnecessary
code.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_base_get_info): Reverse the statement that 'repos_*' may be
null when status is normal.

* subversion/libsvn_wc/adm_crawler.c
  (svn_wc_crawl_revisions5): Remove a scan_base_repos call.

* subversion/libsvn_wc/entries.c
  (get_info_for_deleted): Remove a scan_base_repos call.

Modified:
subversion/trunk/subversion/libsvn_wc/adm_crawler.c
subversion/trunk/subversion/libsvn_wc/entries.c
subversion/trunk/subversion/libsvn_wc/wc_db.h

Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=1325787&r1=1325786&r2=1325787&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Fri Apr 13 14:39:44 2012
@@ -692,11 +692,6 @@ svn_wc_crawl_revisions5(svn_wc_context_t
   return SVN_NO_ERROR;
 }
 
-  if (! repos_relpath)
-SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url, NULL,
-   db, local_abspath,
-   scratch_pool, scratch_pool));
-
   if (target_depth == svn_depth_unknown)
 target_depth = svn_depth_infinity;
 

Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1325787&r1=1325786&r2=1325787&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Fri Apr 13 14:39:44 2012
@@ -236,15 +236,6 @@ get_info_for_deleted(svn_wc_entry_t *ent
entry_abspath,
result_pool,
scratch_pool));
-
-  if (*repos_relpath == NULL)
-SVN_ERR(svn_wc__db_scan_base_repos(repos_relpath,
-   &entry->repos,
-   &entry->uuid,
-   db,
-   entry_abspath,
-   result_pool,
-   scratch_pool));
 }
   else
 {

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1325787&r1=1325786&r2=1325787&view=diff
==
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Fri Apr 13 14:39:44 2012
@@ -687,9 +687,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
 
  UPDATE_ROOTFALSE
 
-   If the STATUS is normal, and the REPOS_* values are NULL, then the
-   caller should use svn_wc__db_scan_base_repos() to scan up the BASE
-   tree for the repository information.
+   If the STATUS is normal, the REPOS_* values will be non-NULL.
 
If DEPTH is requested, and the node is NOT a directory, then the
value will be set to svn_depth_unknown. If LOCAL_ABSPATH is a link,




svn commit: r1325829 - /subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c

2012-04-13 Thread hwright
Author: hwright
Date: Fri Apr 13 16:27:48 2012
New Revision: 1325829

URL: http://svn.apache.org/viewvc?rev=1325829&view=rev
Log:
On the ev2-export branch:
Provide repos_root and base_relpath when wrapping an Ev1 editor.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_get_commit_editor4): As above.

Modified:
subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c

Modified: subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c?rev=1325829&r1=1325828&r2=1325829&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c Fri Apr 13 
16:27:48 2012
@@ -755,6 +755,9 @@ svn_ra_get_commit_editor4(svn_ra_session
   svn_delta_unlock_func_t unlock_func;
   void *unlock_baton;
   svn_boolean_t send_abs_paths;
+  const char *repos_root;
+  const char *session_url;
+  const char *base_relpath;
 
   ccwb->original_callback = callback;
   ccwb->original_baton = callback_baton;
@@ -769,11 +772,16 @@ svn_ra_get_commit_editor4(svn_ra_session
  lock_tokens, keep_locks,
  result_pool));
 
+  /* Get or calculate the appropriate repos root and base relpath. */
+  SVN_ERR(svn_ra_get_repos_root2(session, &repos_root, scratch_pool));
+  SVN_ERR(svn_ra_get_session_url(session, &session_url, scratch_pool));
+  base_relpath = svn_uri_skip_ancestor(repos_root, session_url, scratch_pool);
+
   /* Create the Ev2 editor from the Ev1 editor provided by the RA layer. */
   SVN_ERR(svn_delta__editor_from_delta(editor, &exb,
&unlock_func, &unlock_baton,
deditor, dedit_baton, &send_abs_paths,
-   NULL, NULL,
+   repos_root, base_relpath,
cancel_func, cancel_baton,
session->shim_callbacks->fetch_kind_func,
session->shim_callbacks->fetch_baton,




svn commit: r1325832 - /subversion/trunk/subversion/libsvn_client/copy.c

2012-04-13 Thread hwright
Author: hwright
Date: Fri Apr 13 16:37:03 2012
New Revision: 1325832

URL: http://svn.apache.org/viewvc?rev=1325832&view=rev
Log:
* subversion/libsvn_client/copy.c
  (repos_to_repos_copy): Remove a constant-value variable.

Modified:
subversion/trunk/subversion/libsvn_client/copy.c

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1325832&r1=1325831&r2=1325832&view=diff
==
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Fri Apr 13 16:37:03 2012
@@ -697,7 +697,6 @@ repos_to_repos_copy(const apr_array_head
   apr_array_header_t *path_infos;
   const char *top_url, *top_url_all, *top_url_dst;
   const char *message, *repos_root;
-  svn_revnum_t youngest = SVN_INVALID_REVNUM;
   svn_ra_session_t *ra_session = NULL;
   const svn_delta_editor_t *editor;
   void *edit_baton;
@@ -951,7 +950,7 @@ repos_to_repos_copy(const apr_array_head
   /* Figure out the basename that will result from this operation,
  and ensure that we aren't trying to overwrite existing paths.  */
   dst_rel = svn_uri_skip_ancestor(top_url, pair->dst_abspath_or_url, pool);
-  SVN_ERR(svn_ra_check_path(ra_session, dst_rel, youngest,
+  SVN_ERR(svn_ra_check_path(ra_session, dst_rel, SVN_INVALID_REVNUM,
 &dst_kind, pool));
   if (dst_kind != svn_node_none)
 return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
@@ -1067,7 +1066,7 @@ repos_to_repos_copy(const apr_array_head
   cb_baton.is_move = is_move;
 
   /* Call the path-based editor driver. */
-  err = svn_delta_path_driver(editor, edit_baton, youngest, paths,
+  err = svn_delta_path_driver(editor, edit_baton, SVN_INVALID_REVNUM, paths,
   path_driver_cb_func, &cb_baton, pool);
   if (err)
 {




svn commit: r1325833 - /subversion/branches/1.7.x/STATUS

2012-04-13 Thread philip
Author: philip
Date: Fri Apr 13 16:37:15 2012
New Revision: 1325833

URL: http://svn.apache.org/viewvc?rev=1325833&view=rev
Log:
* STATUS: Propose #4046, vote/approve issue 4136.

Modified:
subversion/branches/1.7.x/STATUS

Modified: subversion/branches/1.7.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1325833&r1=1325832&r2=1325833&view=diff
==
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Fri Apr 13 16:37:15 2012
@@ -84,14 +84,6 @@ Candidate changes:
  +1: stsp (cannot test this, but the trunk windows buildsbots are
happy and the diff makes sense)
 
- * r1296251, r1296303, r1297522
-   Resolve issue 4136, "Deep commit followed by --depth immediates update
-   triggers checksum failure"
-   Justification:
- User reported regression since 1.7.0
-   Votes:
- +1: stsp, rhuijben
-
  * r1306111
Handle NULL dates in libsvn_ra_svn.
Justification:
@@ -124,6 +116,13 @@ Candidate changes:
Votes:
  +1: philip, hwright
 
+ * r1190463
+   Issue 4046, "svn update --depth=empty" against 1.4 servers.
+   Justification:
+ Regression from 1.6.
+   Votes:
+ +1: philip
+
 Veto-blocked changes:
 =
 
@@ -143,3 +142,11 @@ Veto-blocked changes:
 
 Approved changes:
 =
+
+ * r1296251, r1296303, r1297522
+   Resolve issue 4136, "Deep commit followed by --depth immediates update
+   triggers checksum failure"
+   Justification:
+ User reported regression since 1.7.0
+   Votes:
+ +1: stsp, rhuijben, philip




svn commit: r1325862 - /subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c

2012-04-13 Thread cmpilato
Author: cmpilato
Date: Fri Apr 13 17:40:26 2012
New Revision: 1325862

URL: http://svn.apache.org/viewvc?rev=1325862&view=rev
Log:
Non-logic changes only.

* subversion/tests/libsvn_subr/crypto-test.c
  (): Clearly separate helper and test funcs.
  (test_passphrase_check): Move (and expand) a comment to the
appropriate location.

Modified:
subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c

Modified: subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c?rev=1325862&r1=1325861&r2=1325862&view=diff
==
--- subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/crypto-test.c Fri Apr 13 
17:40:26 2012
@@ -29,7 +29,10 @@
 #include "../svn_test.h"
 #include "../../libsvn_subr/crypto.h"
 
-/* Helper function:  encrypt PASSWORD within CTX using MASTER, then
+
+/*** Helper functions ***/
+
+/* Encrypt PASSWORD within CTX using MASTER, then
decrypt those results and ensure the original PASSWORD comes out
the other end. */
 static svn_error_t *
@@ -73,6 +76,9 @@ encrypt_decrypt(svn_crypto__ctx_t *ctx,
 }
 
 
+
+/*** Test functions ***/
+
 static svn_error_t *
 test_encrypt_decrypt_password(apr_pool_t *pool)
 {
@@ -141,6 +147,9 @@ test_passphrase_check(apr_pool_t *pool)
 "Error validating secret against checktext");
 }
 
+  /* Now check that a bogus secret causes the validation to fail.  We
+ try to verify each secret against the checktext generated by the
+ previous one.  */
   for (i = 0; i < num_passwords; i++)
 {
   int test_secret_index = (i + 1) % num_passwords;
@@ -159,8 +168,6 @@ test_passphrase_check(apr_pool_t *pool)
 "got success");
 }
 
-  /* Now check that a bogus secret causes the validation to fail. */
-
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }




svn commit: r1325870 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

2012-04-13 Thread stefan2
Author: stefan2
Date: Fri Apr 13 17:52:59 2012
New Revision: 1325870

URL: http://svn.apache.org/viewvc?rev=1325870&view=rev
Log:
Minimize hash key creation overhead by directly applying MD5 instead of 
copying / duplicating the key. Also, check for NULL keys directly on the 
interface.

* subversion/libsvn_subr/cache-membuffer.c
  (get_group_index): don't calculate the 16 byte hash; require it to come in
  (membuffer_cache_set, membuffer_cache_get,
   membuffer_cache_get_partial, membuffer_cache_set_partial):
   adapt callers; invalid groups are impossible now
  (svn_membuffer_cache_t): ensure proper alignment for prefix;
   add temp buffer for combined key
  (combine_key): calculate & combine hashes
  (svn_membuffer_cache_get, svn_membuffer_cache_set,
   svn_membuffer_cache_get_partial, svn_membuffer_cache_set_partial):
   adapt callers; handle NULL keys

Modified:
subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1325870&r1=1325869&r2=1325870&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Fri Apr 13 
17:52:59 2012
@@ -589,38 +589,21 @@ insert_entry(svn_membuffer_t *cache, ent
  */
 static apr_uint32_t
 get_group_index(svn_membuffer_t **cache,
-const void *key,
-apr_size_t len,
-unsigned char *to_find,
+const apr_uint32_t *key,
 apr_pool_t *pool)
 {
-  apr_uint32_t hash = 0;
-  int i;
-
-  /* calculate a hash value for the key */
-  svn_checksum_t *checksum;
-  svn_error_t *err;
-
-  if (key == NULL)
-return NO_INDEX;
-
-  err = svn_checksum(&checksum, svn_checksum_md5, key, len, pool);
-  if (err != NULL)
-  {
-svn_error_clear(err);
-return NO_INDEX;
-  }
-
-  memcpy(to_find, checksum->digest, APR_MD5_DIGESTSIZE);
-
-  /* select the cache segment to use */
-  *cache = &(*cache)[to_find[0] & ((*cache)->segment_count -1)];
+  apr_uint32_t hash;
 
   /* Get the group that *must* contain the entry. Fold the hash value
* just to be sure (it should not be necessary for perfect hashes).
*/
-  for (i = 0; i < sizeof(to_find) / sizeof(apr_uint32_t); ++i)
-hash += ((apr_uint32_t*)to_find)[i] ^ ((hash >> 19) || (hash << 13));
+  hash = key[0];
+  hash = key[1] ^ ((hash >> 19) || (hash << 13));
+  hash = key[2] ^ ((hash >> 19) || (hash << 13));
+  hash = key[3] ^ ((hash >> 19) || (hash << 13));
+
+  /* select the cache segment to use */
+  *cache = &(*cache)[key[0] & ((*cache)->segment_count -1)];
 
   return hash % (*cache)->group_count;
 }
@@ -1154,22 +1137,18 @@ membuffer_cache_set_internal(svn_membuff
 static svn_error_t *
 membuffer_cache_set(svn_membuffer_t *cache,
 const void *key,
-apr_size_t key_len,
 void *item,
 svn_cache__serialize_func_t serializer,
 DEBUG_CACHE_MEMBUFFER_TAG_ARG
 apr_pool_t *scratch_pool)
 {
   apr_uint32_t group_index;
-  unsigned char to_find[KEY_SIZE];
   void *buffer = NULL;
   apr_size_t size;
 
   /* find the entry group that will hold the key.
*/
-  group_index = get_group_index(&cache, key, key_len, to_find, scratch_pool);
-  if (group_index == NO_INDEX)
-return SVN_NO_ERROR;
+  group_index = get_group_index(&cache, key, scratch_pool);
 
   /* Serialize data data.
*/
@@ -1180,7 +1159,7 @@ membuffer_cache_set(svn_membuffer_t *cac
*/
   SVN_MUTEX__WITH_LOCK(cache->mutex,
membuffer_cache_set_internal(cache,
-to_find,
+key,
 group_index,
 buffer,
 size,
@@ -1262,32 +1241,22 @@ membuffer_cache_get_internal(svn_membuff
 static svn_error_t *
 membuffer_cache_get(svn_membuffer_t *cache,
 const void *key,
-apr_size_t key_len,
 void **item,
 svn_cache__deserialize_func_t deserializer,
 DEBUG_CACHE_MEMBUFFER_TAG_ARG
 apr_pool_t *result_pool)
 {
   apr_uint32_t group_index;
-  unsigned char to_find[KEY_SIZE];
   char *buffer;
   apr_size_t size;
 
   /* find the entry group that will hold the key.
*/
-  group_index = get_group_index(&cache, key, key_len, to_find, result_pool);
-  if (group_index == NO_INDEX)
-{
-  /* Some error occured, return "item not found".
-   */
-  *item = NULL;
-  return SVN_NO_ERROR;
-}
-
+  group_index = get_group_index(&cache, key, result_pool);
   SVN_MU

svn commit: r1325880 - in /subversion/trunk/subversion/libsvn_subr: config_file.c mergeinfo.c

2012-04-13 Thread stefan2
Author: stefan2
Date: Fri Apr 13 17:59:32 2012
New Revision: 1325880

URL: http://svn.apache.org/viewvc?rev=1325880&view=rev
Log:
Silence compiler warnings concerning variables possibly not being initialized
(none of these warnings seem to be correct).

* subversion/libsvn_subr/config_file.c
  (skip_whitespace): initialize ch
* subversion/libsvn_subr/mergeinfo.c
  (parse_revision_line): initialize pathname

Modified:
subversion/trunk/subversion/libsvn_subr/config_file.c
subversion/trunk/subversion/libsvn_subr/mergeinfo.c

Modified: subversion/trunk/subversion/libsvn_subr/config_file.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/config_file.c?rev=1325880&r1=1325879&r2=1325880&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/config_file.c (original)
+++ subversion/trunk/subversion/libsvn_subr/config_file.c Fri Apr 13 17:59:32 
2012
@@ -123,7 +123,7 @@ parser_ungetc(parse_context_t *ctx, int 
 static APR_INLINE svn_error_t *
 skip_whitespace(parse_context_t *ctx, int *c, int *pcount)
 {
-  int ch;
+  int ch = 0;
   int count = 0;
 
   SVN_ERR(parser_getc(ctx, &ch));

Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mergeinfo.c?rev=1325880&r1=1325879&r2=1325880&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/mergeinfo.c Fri Apr 13 17:59:32 2012
@@ -615,7 +615,7 @@ static svn_error_t *
 parse_revision_line(const char **input, const char *end, svn_mergeinfo_t hash,
 apr_pool_t *scratch_pool)
 {
-  const char *pathname;
+  const char *pathname = "";
   apr_array_header_t *existing_rangelist;
   apr_array_header_t *rangelist = apr_array_make(scratch_pool, 1,
  sizeof(svn_merge_range_t *));




svn commit: r1325896 - in /subversion/trunk/subversion: include/private/svn_string_private.h libsvn_subr/svn_string.c tests/libsvn_subr/string-test.c

2012-04-13 Thread stefan2
Author: stefan2
Date: Fri Apr 13 18:27:38 2012
New Revision: 1325896

URL: http://svn.apache.org/viewvc?rev=1325896&view=rev
Log:
Provide functions for efficient int64 -> ASCII conversion.
They have been designed for usage in serialization code
(e.g. svn://)

* subversion/include/private/svn_string_private.h
  (SVN_INT64_BUFFER_SIZE): new constant
  (svn__ui64toa, svn__i64toa): declare new private API
* subversion/libsvn_subr/svn_string.c
  (decimal_table): new lookup table
  (COPY_TWO_BYTES): new platform abstraction macro
  (svn__ui64toa, svn__i64toa): implement new API
* subversion/tests/libsvn_subr/string-test.c
  (test24): new test for new API

Modified:
subversion/trunk/subversion/include/private/svn_string_private.h
subversion/trunk/subversion/libsvn_subr/svn_string.c
subversion/trunk/subversion/tests/libsvn_subr/string-test.c

Modified: subversion/trunk/subversion/include/private/svn_string_private.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_string_private.h?rev=1325896&r1=1325895&r2=1325896&view=diff
==
--- subversion/trunk/subversion/include/private/svn_string_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_string_private.h Fri Apr 13 
18:27:38 2012
@@ -58,6 +58,26 @@ svn_stringbuf__morph_into_string(svn_str
  *  with APR 0.9 */
 apr_status_t
 svn__strtoff(apr_off_t *offset, const char *buf, char **end, int base);
+
+/** Number of chars needed to represent signed (19 places + sign + NUL) or
+ * unsigned (20 places + NUL) integers as strings.
+ */
+#define SVN_INT64_BUFFER_SIZE 21
+
+/** Writes the @a number as string into @a dest. The latter must provide
+ * space for at least #SVN_INT64_BUFFER_SIZE characters. Returns the number
+ * chars written excluding the terminating NUL.
+ */
+apr_size_t
+svn__ui64toa(char * dest, apr_uint64_t number);
+
+/** Writes the @a number as string into @a dest. The latter must provide
+ * space for at least #SVN_INT64_BUFFER_SIZE characters. Returns the number
+ * chars written excluding the terminating NUL.
+ */
+apr_size_t
+svn__i64toa(char * dest, apr_int64_t number);
+
 /** @} */
 
 /** @} */

Modified: subversion/trunk/subversion/libsvn_subr/svn_string.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_string.c?rev=1325896&r1=1325895&r2=1325896&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/svn_string.c (original)
+++ subversion/trunk/subversion/libsvn_subr/svn_string.c Fri Apr 13 18:27:38 
2012
@@ -920,3 +920,108 @@ svn__strtoff(apr_off_t *offset, const ch
   return apr_strtoff(offset, buf, end, base);
 #endif
 }
+
+/* "Precalculated" itoa values for 2 places (including leading zeros).
+ * For maximum performance, make sure all table entries are word-aligned.
+ */
+static const char decimal_table[100][4]
+= { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09"
+  , "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"
+  , "20", "21", "22", "23", "24", "25", "26", "27", "28", "29"
+  , "30", "31", "32", "33", "34", "35", "36", "37", "38", "39"
+  , "40", "41", "42", "43", "44", "45", "46", "47", "48", "49"
+  , "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"
+  , "60", "61", "62", "63", "64", "65", "66", "67", "68", "69"
+  , "70", "71", "72", "73", "74", "75", "76", "77", "78", "79"
+  , "80", "81", "82", "83", "84", "85", "86", "87", "88", "89"
+  , "90", "91", "92", "93", "94", "95", "96", "97", "98", "99"};
+
+/* Copy the two bytes at SOURCE[0] and SOURCE[1] to DEST[0] and DEST[1] */
+#if SVN_UNALIGNED_ACCESS_IS_OK
+#define COPY_TWO_BYTES(dest,source)\
+  *(apr_uint16_t*)(dest) = *(apr_uint16_t*)(source);
+#else
+#define COPY_TWO_BYTES(dest,source) \
+  dest[0] = source[0]; \
+  dest[1] = source[1];
+#endif
+
+apr_size_t
+svn__ui64toa(char * dest, apr_uint64_t number)
+{
+  char buffer[SVN_INT64_BUFFER_SIZE];
+  apr_uint32_t reduced;   /* used for 32 bit DIV */
+  char* target;
+
+  /* Small numbers are by far the most common case.
+   * Therefore, we use special code.
+   */
+  if (number < 100)
+{
+  if (number < 10)
+{
+  dest[0] = (char)('0' + number);
+  dest[1] = 0;
+  return 1;
+}
+  else
+{
+  COPY_TWO_BYTES(dest, decimal_table[(apr_size_t)number]);
+  dest[2] = 0;
+  return 2;
+}
+}
+
+  /* Standard code. Write string in pairs of chars back-to-front */
+  buffer[SVN_INT64_BUFFER_SIZE - 1] = 0;
+  target = &buffer[SVN_INT64_BUFFER_SIZE - 3];
+
+  /* Loop may be executed 0 .. 2 times. */
+  while (number >= 1)
+{
+  /* Number is larger than 100^4, i.e. we can write 4x2 chars.
+   * Also, use 32 bit DIVs as these are about twice as fast.
+   */
+  reduced = number % 1;
+  numb

svn commit: r1325898 - /subversion/branches/ev2-export/subversion/libsvn_client/copy.c

2012-04-13 Thread hwright
Author: hwright
Date: Fri Apr 13 18:36:36 2012
New Revision: 1325898

URL: http://svn.apache.org/viewvc?rev=1325898&view=rev
Log:
On the ev2-export branch:
More work at getting tests to pass again after the recent merge, this time
specific to the repos->repos copy implementation.

* subversion/libsvn_client/copy.c
  (drive_single_path): Calculate appropriate repos-relative roots for the
editor drive.
  (drive_editor): Pass the repos root down the stack.
  (repos_to_repos_copy): Provide URLs for the source and dst paths.

Modified:
subversion/branches/ev2-export/subversion/libsvn_client/copy.c

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=1325898&r1=1325897&r2=1325898&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/copy.c Fri Apr 13 
18:36:36 2012
@@ -625,11 +625,13 @@ drive_single_path(svn_editor_t *editor,
   path_driver_info_t *path_info,
   svn_boolean_t is_move,
   svn_revnum_t youngest,
+  const char *repos_root,
   apr_pool_t *scratch_pool)
 {
   apr_hash_t *props = apr_hash_make(scratch_pool);
   svn_boolean_t do_delete = FALSE;
   svn_boolean_t do_add = FALSE;
+  const char *dst_relpath;
 
   /* If this is a resurrection, we know the source and dest paths are
  the same, and that our driver will only be calling us once.  */
@@ -658,14 +660,19 @@ drive_single_path(svn_editor_t *editor,
 }
 }
 
+  dst_relpath = svn_uri_skip_ancestor(repos_root, path, scratch_pool);
+
   /* ### We need to handle moves here, rather than just pretend they are
  a delete + add. */
   if (do_delete)
 {
-  SVN_ERR(svn_editor_delete(editor, path, youngest));
+  SVN_ERR(svn_editor_delete(editor, dst_relpath, youngest));
 }
   if (do_add)
 {
+  const char *src_relpath = svn_uri_skip_ancestor(repos_root,
+  path_info->src_url,
+  scratch_pool);
   SVN_ERR(svn_path_check_valid(path, scratch_pool));
 
   /* ### Need to get existing props, rather than just set mergeinfo
@@ -675,15 +682,15 @@ drive_single_path(svn_editor_t *editor,
  path_info->mergeinfo);
 
   SVN_ERR(svn_editor_copy(editor,
-  path_info->src_url, path_info->src_revnum,
-  path, SVN_INVALID_REVNUM));
+  src_relpath, path_info->src_revnum,
+  dst_relpath, SVN_INVALID_REVNUM));
 
   if (path_info->src_kind == svn_node_file)
-SVN_ERR(svn_editor_alter_file(editor, path, SVN_INVALID_REVNUM,
+SVN_ERR(svn_editor_alter_file(editor, dst_relpath, SVN_INVALID_REVNUM,
   props, NULL, NULL));
   else
-SVN_ERR(svn_editor_alter_directory(editor, path, SVN_INVALID_REVNUM,
-   props));
+SVN_ERR(svn_editor_alter_directory(editor, dst_relpath,
+   SVN_INVALID_REVNUM, props));
 }
 
   return SVN_NO_ERROR;
@@ -696,6 +703,7 @@ drive_editor(svn_editor_t *editor,
  apr_array_header_t *new_dirs,
  svn_boolean_t is_move,
  svn_revnum_t youngest,
+ const char *repos_root,
  apr_pool_t *scratch_pool)
 {
   svn_error_t *err = SVN_NO_ERROR;
@@ -729,7 +737,7 @@ drive_editor(svn_editor_t *editor,
   svn_pool_clear(iterpool);
 
   err = drive_single_path(editor, path, path_info, is_move, youngest,
-  iterpool);
+  repos_root, iterpool);
   if (err)
 break;
 }
@@ -756,8 +764,7 @@ repos_to_repos_copy(const apr_array_head
 svn_boolean_t is_move,
 apr_pool_t *pool)
 {
-  apr_array_header_t *paths = apr_array_make(pool, 2 * copy_pairs->nelts,
- sizeof(const char *));
+  apr_array_header_t *paths;
   apr_hash_t *action_hash = apr_hash_make(pool);
   apr_array_header_t *path_infos;
   const char *top_url, *top_url_all, *top_url_dst;
@@ -1023,9 +1030,13 @@ repos_to_repos_copy(const apr_array_head
   info->src_path = src_rel;
   info->dst_path = dst_rel;
 
-  apr_hash_set(action_hash, info->dst_path, APR_HASH_KEY_STRING, info);
+  apr_hash_set(action_hash, svn_path_url_add_component2(
+top_url, info->dst_path, pool),
+   APR_HASH_KEY_STRING, info);
   if (is_move && (! info->resurrection))
-apr_hash_set(action_hash, info->src_path, APR_HASH_KEY_STRING, info);
+a

svn commit: r1325899 - in /subversion/trunk/subversion/libsvn_ra_svn: marshal.c ra_svn.h

2012-04-13 Thread stefan2
Author: stefan2
Date: Fri Apr 13 18:36:46 2012
New Revision: 1325899

URL: http://svn.apache.org/viewvc?rev=1325899&view=rev
Log:
Various performance improvements to the ra_svn marshaller.
The total effect is roughly a duplication in throughput.

* subversion/libsvn_ra_svn/ra_svn.h
  (SVN_RA_SVN__READBUF_SIZE, SVN_RA_SVN__WRITEBUF_SIZE):
   increase buffer size to 16kByte
  (svn_ra_svn_conn_st): use apr_size_t for sizes
* subversion/libsvn_ra_svn/marshal.c
  (writebuf_flush): use apr_size_t for sizes
  (writebuf_printf): drop
  (writebuf_write_short_string, writebuf_writechar, write_number):
   new, specialized write functions
  (svn_ra_svn_write_number, svn_ra_svn_write_string,
   svn_ra_svn_write_cstring, svn_ra_svn_write_word,
   svn_ra_svn_start_list, svn_ra_svn_end_list): use new functions
  (vwrite_tuple): reorder cases to favor frequent control chars
  (read_item): eliminate expensive 64 bit division from hot path

Modified:
subversion/trunk/subversion/libsvn_ra_svn/marshal.c
subversion/trunk/subversion/libsvn_ra_svn/ra_svn.h

Modified: subversion/trunk/subversion/libsvn_ra_svn/marshal.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/marshal.c?rev=1325899&r1=1325898&r2=1325899&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/marshal.c Fri Apr 13 18:36:46 2012
@@ -231,7 +231,7 @@ static svn_error_t *writebuf_output(svn_
 /* Write data from the write buffer out to the socket. */
 static svn_error_t *writebuf_flush(svn_ra_svn_conn_t *conn, apr_pool_t *pool)
 {
-  int write_pos = conn->write_pos;
+  apr_size_t write_pos = conn->write_pos;
 
   /* Clear conn->write_pos first in case the block handler does a read. */
   conn->write_pos = 0;
@@ -258,19 +258,36 @@ static svn_error_t *writebuf_write(svn_r
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *writebuf_printf(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-const char *fmt, ...)
-  __attribute__ ((format(printf, 3, 4)));
-static svn_error_t *writebuf_printf(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-const char *fmt, ...)
+static svn_error_t *
+writebuf_write_short_string(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
+const char *data, apr_size_t len)
+{
+  apr_size_t left = sizeof(conn->write_buf) - conn->write_pos;
+  if (len <= left)
+  {
+memcpy(conn->write_buf + conn->write_pos, data, len);
+conn->write_pos += len;
+return SVN_NO_ERROR;
+  }
+  else
+return writebuf_write(conn, pool, data, len);
+}
+
+static APR_INLINE svn_error_t *
+writebuf_writechar(svn_ra_svn_conn_t *conn, apr_pool_t *pool, char data)
 {
-  va_list ap;
-  char *str;
+  if (conn->write_pos < sizeof(conn->write_buf))
+  {
+conn->write_buf[conn->write_pos] = data;
+conn->write_pos++;
 
-  va_start(ap, fmt);
-  str = apr_pvsprintf(pool, fmt, ap);
-  va_end(ap);
-  return writebuf_write(conn, pool, str, strlen(str));
+return SVN_NO_ERROR;
+  }
+  else
+  {
+char temp = data;
+return writebuf_write(conn, pool, &temp, 1);
+  }
 }
 
 /* --- READ BUFFER MANAGEMENT --- */
@@ -417,31 +434,69 @@ static svn_error_t *readbuf_skip_leading
 
 /* --- WRITING DATA ITEMS --- */
 
+static svn_error_t *write_number(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
+ apr_uint64_t number, char follow)
+{
+  apr_size_t written;
+
+  if (conn->write_pos + SVN_INT64_BUFFER_SIZE >= sizeof(conn->write_buf))
+SVN_ERR(writebuf_flush(conn, pool));
+
+  written = svn__ui64toa(conn->write_buf + conn->write_pos, number);
+  conn->write_buf[conn->write_pos + written] = follow;
+  conn->write_pos += written + 1;
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *svn_ra_svn_write_number(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
  apr_uint64_t number)
 {
-  return writebuf_printf(conn, pool, "%" APR_UINT64_T_FMT " ", number);
+  return write_number(conn, pool, number, ' ');
 }
 
 svn_error_t *svn_ra_svn_write_string(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
  const svn_string_t *str)
 {
-  SVN_ERR(writebuf_printf(conn, pool, "%" APR_SIZE_T_FMT ":", str->len));
+  if (str->len < 10)
+{
+  SVN_ERR(writebuf_writechar(conn, pool, (char)str->len + '0'));
+  SVN_ERR(writebuf_writechar(conn, pool, ':'));
+}
+  else
+write_number(conn, pool, str->len, ':');
+
   SVN_ERR(writebuf_write(conn, pool, str->data, str->len));
-  SVN_ERR(writebuf_write(conn, pool, " ", 1));
+  SVN_ERR(writebuf_writechar(conn, pool, ' '));
   return SVN_NO_ERROR;
 }
 
 svn_error_t *svn_ra_svn_write_cstring(svn_ra_svn_conn_t *conn,
   apr_pool_t *pool, const char *s)
 {
-  return writebuf_printf(conn, pool, "%" APR_SIZE_T_FMT ":%s ", strlen(s), s);
+  apr_size_t len = strlen(s);
+

svn commit: r1325914 - /subversion/branches/ev2-export/subversion/libsvn_delta/compat.c

2012-04-13 Thread hwright
Author: hwright
Date: Fri Apr 13 19:32:41 2012
New Revision: 1325914

URL: http://svn.apache.org/viewvc?rev=1325914&view=rev
Log:
On the ev2-export branch:
Normalize the base_relpath for each shim individually, so direct callers get
the benefit.

* subversion/libsvn_delta/compat.c
  (svn_delta__delta_from_editor, svn_delta__editor_from_delta):
Normalize the base_relpath here...
  (svn_editor__insert_shims): ...instead of here.

Modified:
subversion/branches/ev2-export/subversion/libsvn_delta/compat.c

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=1325914&r1=1325913&r2=1325914&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_delta/compat.c Fri Apr 13 
19:32:41 2012
@@ -1087,6 +1087,11 @@ svn_delta__delta_from_editor(const svn_d
 };
   struct ev2_edit_baton *eb = apr_pcalloc(pool, sizeof(*eb));
 
+  if (!base_relpath)
+base_relpath = "";
+  else if (base_relpath[0] == '/')
+base_relpath += 1;
+
   eb->editor = editor;
   eb->changes = apr_hash_make(pool);
   eb->paths = apr_hash_make(pool);
@@ -2019,6 +2024,11 @@ svn_delta__editor_from_delta(svn_editor_
   struct svn_delta__extra_baton *extra_baton = apr_pcalloc(result_pool,
 sizeof(*extra_baton));
 
+  if (!base_relpath)
+base_relpath = "";
+  else if (base_relpath[0] == '/')
+base_relpath += 1;
+
   eb->deditor = deditor;
   eb->dedit_baton = dedit_baton;
   eb->edit_pool = result_pool;
@@ -2111,11 +2121,6 @@ svn_editor__insert_shims(const svn_delta
   SVN_ERR_ASSERT(shim_callbacks->fetch_props_func != NULL);
   SVN_ERR_ASSERT(shim_callbacks->fetch_base_func != NULL);
 
-  if (!base_relpath)
-base_relpath = "";
-  else if (base_relpath[0] == '/')
-base_relpath += 1;
-
   SVN_ERR(svn_delta__editor_from_delta(&editor, &exb,
 &unlock_func, &unlock_baton,
 deditor_in, dedit_baton_in,




svn commit: r1325932 - /subversion/trunk/subversion/libsvn_ra_neon/fetch.c

2012-04-13 Thread pburba
Author: pburba
Date: Fri Apr 13 20:15:07 2012
New Revision: 1325932

URL: http://svn.apache.org/viewvc?rev=1325932&view=rev
Log:
Fix a bug in the ra_neon implementation of svn_ra_get_dir*.

* subversion/libsvn_ra_neon/fetch.c
  (svn_ra_neon__get_dir): Correctly skip the effective '.' entry that comes
   back from SVN_RA_NEON__DEPTH_ONE when the REVISION arg is
   SVN_INVALID_REVNUM.  Without this fix we get an error when calling
   svn_ra_get_dir* with a non-NULL DIRENTS arg.  Note: AFAICT there is
   currently no way to provoke this via the command-line.
 

Modified:
subversion/trunk/subversion/libsvn_ra_neon/fetch.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/fetch.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/fetch.c?rev=1325932&r1=1325931&r2=1325932&view=diff
==
--- subversion/trunk/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/fetch.c Fri Apr 13 20:15:07 2012
@@ -912,8 +912,19 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
  final_url, SVN_RA_NEON__DEPTH_ONE,
  NULL, which_props, pool));
 
-  /* Count the number of path components in final_url. */
-  final_url_n_components = svn_path_component_count(final_url);
+  /* In the loop below we will want to skip the effective '.' entry that
+ comes back from SVN_RA_NEON__DEPTH_ONE. To perform this skip we use
+ the component count of the FINAL_URL and compare it to the component
+ count of the keys in RESOURCES.  But this only works if REVISION
+ was a valid revnum and FINAL_URL is a baseline collection (i.e. no
+ scheme://host prefix).  If REVISION was SVN_INVALID_REVNUM then
+ FINAL_URL is a fully qualified URL, so we need to ignore the scheme
+ and host portions. */
+  if (SVN_IS_VALID_REVNUM(revision))
+final_url_n_components = svn_path_component_count(final_url);
+  else
+final_url_n_components = svn_path_component_count(
+  svn_path_url_add_component2(ras->root.path, path, pool));
 
   /* Now we have a hash that maps a bunch of url children to resource
  objects.  Each resource object contains the properties of the




svn commit: r1325936 - /subversion/branches/ev2-export/subversion/libsvn_client/copy.c

2012-04-13 Thread hwright
Author: hwright
Date: Fri Apr 13 20:27:50 2012
New Revision: 1325936

URL: http://svn.apache.org/viewvc?rev=1325936&view=rev
Log:
On the ev2-export branch:
* subversion/libsvn_client/copy.c
  (drive_single_path): Use the correct path for doing comparisons.

Modified:
subversion/branches/ev2-export/subversion/libsvn_client/copy.c

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=1325936&r1=1325935&r2=1325936&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/copy.c Fri Apr 13 
20:27:50 2012
@@ -633,6 +633,8 @@ drive_single_path(svn_editor_t *editor,
   svn_boolean_t do_add = FALSE;
   const char *dst_relpath;
 
+  dst_relpath = svn_uri_skip_ancestor(repos_root, path, scratch_pool);
+
   /* If this is a resurrection, we know the source and dest paths are
  the same, and that our driver will only be calling us once.  */
   if (path_info->resurrection)
@@ -648,7 +650,7 @@ drive_single_path(svn_editor_t *editor,
  or the destination of the move. */
   if (is_move)
 {
-  if (strcmp(path_info->src_path, path) == 0)
+  if (strcmp(path_info->src_path, dst_relpath) == 0)
 do_delete = TRUE;
   else
 do_add = TRUE;
@@ -660,8 +662,6 @@ drive_single_path(svn_editor_t *editor,
 }
 }
 
-  dst_relpath = svn_uri_skip_ancestor(repos_root, path, scratch_pool);
-
   /* ### We need to handle moves here, rather than just pretend they are
  a delete + add. */
   if (do_delete)




svn commit: r1325942 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

2012-04-13 Thread stefan2
Author: stefan2
Date: Fri Apr 13 20:44:06 2012
New Revision: 1325942

URL: http://svn.apache.org/viewvc?rev=1325942&view=rev
Log:
Follow-up to r1325870: Remove an unused parameter and update commentaries.
(last commit did not update the docstrings).

* subversion/libsvn_subr/cache-membuffer.c
  (get_group_index): remove pool parameter, update docstring
  (membuffer_cache_set, membuffer_cache_get): update callers
  (membuffer_cache_get_partial, membuffer_cache_set_partial):
   update callers & docstrings
  (combine_key): update docstring

Modified:
subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1325942&r1=1325941&r2=1325942&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Fri Apr 13 
20:44:06 2012
@@ -584,13 +584,12 @@ insert_entry(svn_membuffer_t *cache, ent
 }
 }
 
-/* Map a KEY of length LEN to the CACHE and group that shall contain the
- * respective item. Return the hash value in TO_FIND. Returns -1 upon error.
+/* Map a KEY of 16 bytes to the CACHE and group that shall contain the
+ * respective item.
  */
 static apr_uint32_t
 get_group_index(svn_membuffer_t **cache,
-const apr_uint32_t *key,
-apr_pool_t *pool)
+const apr_uint32_t *key)
 {
   apr_uint32_t hash;
 
@@ -1148,7 +1147,7 @@ membuffer_cache_set(svn_membuffer_t *cac
 
   /* find the entry group that will hold the key.
*/
-  group_index = get_group_index(&cache, key, scratch_pool);
+  group_index = get_group_index(&cache, key);
 
   /* Serialize data data.
*/
@@ -1252,7 +1251,7 @@ membuffer_cache_get(svn_membuffer_t *cac
 
   /* find the entry group that will hold the key.
*/
-  group_index = get_group_index(&cache, key, result_pool);
+  group_index = get_group_index(&cache, key);
   SVN_MUTEX__WITH_LOCK(cache->mutex,
membuffer_cache_get_internal(cache,
 group_index,
@@ -1338,7 +1337,7 @@ membuffer_cache_get_partial_internal(svn
 }
 }
 
-/* Look for the cache entry identified by KEY and KEY_LEN. FOUND indicates
+/* Look for the cache entry identified by KEY. FOUND indicates
  * whether that entry exists. If not found, *ITEM will be NULL. Otherwise,
  * the DESERIALIZER is called with that entry and the BATON provided
  * and will extract the desired information. The result is set in *ITEM.
@@ -1354,7 +1353,7 @@ membuffer_cache_get_partial(svn_membuffe
 DEBUG_CACHE_MEMBUFFER_TAG_ARG
 apr_pool_t *result_pool)
 {
-  apr_uint32_t group_index = get_group_index(&cache, key, result_pool);
+  apr_uint32_t group_index = get_group_index(&cache, key);
 
   SVN_MUTEX__WITH_LOCK(cache->mutex,
membuffer_cache_get_partial_internal
@@ -1471,7 +1470,7 @@ membuffer_cache_set_partial_internal(svn
   return SVN_NO_ERROR;
 }
 
-/* Look for the cache entry identified by KEY and KEY_LEN. If no entry
+/* Look for the cache entry identified by KEY. If no entry
  * has been found, the function returns without modifying the cache.
  * Otherwise, FUNC is called with that entry and the BATON provided
  * and may modify the cache entry. Allocations will be done in POOL.
@@ -1486,7 +1485,7 @@ membuffer_cache_set_partial(svn_membuffe
 {
   /* cache item lookup
*/
-  apr_uint32_t group_index = get_group_index(&cache, key, scratch_pool);
+  apr_uint32_t group_index = get_group_index(&cache, key);
   SVN_MUTEX__WITH_LOCK(cache->mutex,
membuffer_cache_set_partial_internal
(cache, group_index, key, func, baton,
@@ -1577,8 +1576,8 @@ typedef struct svn_membuffer_cache_t
 #define ALLOCATIONS_PER_POOL_CLEAR 10
 
 
-/* Basically concatenate PREFIX and KEY and return the result in FULL_KEY.
- * Allocations will be made in POOL.
+/* Basically calculate a hash value for KEY of length KEY_LEN, combine it
+ * with the CACHE->PREFIX and write the result in CACHE->COMBINED_KEY.
  */
 static void
 combine_key(svn_membuffer_cache_t *cache,




svn commit: r1325946 - /subversion/trunk/subversion/libsvn_fs_fs/caching.c

2012-04-13 Thread stefan2
Author: stefan2
Date: Fri Apr 13 21:00:16 2012
New Revision: 1325946

URL: http://svn.apache.org/viewvc?rev=1325946&view=rev
Log:
* subversion/libsvn_fs_fs/caching.c
  (svn_fs_fs__initialize_caches): minor comment fix

Modified:
subversion/trunk/subversion/libsvn_fs_fs/caching.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1325946&r1=1325945&r2=1325946&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Fri Apr 13 21:00:16 2012
@@ -330,7 +330,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
memcache,
membuffer,
0, 0, /* Do not use inprocess cache */
-   /* Values are svn_string_t */
+   /* Values are svn_stringbuf_t */
NULL, NULL,
APR_HASH_KEY_STRING,
apr_pstrcat(pool, prefix, "TEXT", (char *)NULL),




svn commit: r1325956 - in /subversion/branches/master-passphrase/subversion: include/svn_error_codes.h libsvn_subr/auth_store.h libsvn_subr/pathetic_auth_store.c tests/libsvn_subr/crypto-test.c

2012-04-13 Thread cmpilato
Author: cmpilato
Date: Fri Apr 13 21:16:29 2012
New Revision: 1325956

URL: http://svn.apache.org/viewvc?rev=1325956&view=rev
Log:
On the 'master-passphrase' branch, actually start playing with encrypted
storage.

   ### No, this is *absolutely not* a serious storage proposal! ###

* subversion/include/svn_error_codes.h
  (SVN_ERR_NODE_NOT_FOUND): New error code.

* subversion/libsvn_subr/auth_store.h,
* subversion/libsvn_subr/pathetic_auth_store.c
  Brand new files and content, implementing a rather pathetic
  encrypted auth store for the sake of validating the general
  approach.

* subversion/tests/libsvn_subr/crypto-test.c
  (create_ephemeral_auth_store): New helper function.
  (test_auth_store_basic, test_auth_store_get_set): New tests.
  (test_funcs): Add references to new tests.

Added:
subversion/branches/master-passphrase/subversion/libsvn_subr/auth_store.h   
(with props)

subversion/branches/master-passphrase/subversion/libsvn_subr/pathetic_auth_store.c
   (with props)
Modified:
subversion/branches/master-passphrase/subversion/include/svn_error_codes.h

subversion/branches/master-passphrase/subversion/tests/libsvn_subr/crypto-test.c

Modified: 
subversion/branches/master-passphrase/subversion/include/svn_error_codes.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/include/svn_error_codes.h?rev=1325956&r1=1325955&r2=1325956&view=diff
==
--- subversion/branches/master-passphrase/subversion/include/svn_error_codes.h 
(original)
+++ subversion/branches/master-passphrase/subversion/include/svn_error_codes.h 
Fri Apr 13 21:16:29 2012
@@ -313,6 +313,11 @@ SVN_ERROR_START
  SVN_ERR_NODE_CATEGORY_START + 1,
  "Unexpected node kind found")
 
+  /* @since New in 1.8 */
+  SVN_ERRDEF(SVN_ERR_NODE_NOT_FOUND,
+ SVN_ERR_NODE_CATEGORY_START + 2,
+ "Node not found")
+
   /* entry errors */
 
   SVN_ERRDEF(SVN_ERR_ENTRY_NOT_FOUND,

Added: subversion/branches/master-passphrase/subversion/libsvn_subr/auth_store.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_subr/auth_store.h?rev=1325956&view=auto
==
--- subversion/branches/master-passphrase/subversion/libsvn_subr/auth_store.h 
(added)
+++ subversion/branches/master-passphrase/subversion/libsvn_subr/auth_store.h 
Fri Apr 13 21:16:29 2012
@@ -0,0 +1,133 @@
+/*
+ * auth_store.h:  Storage routines for authentication credentials
+ *
+ * 
+ *Licensed to the Apache Software Foundation (ASF) under one
+ *or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ *regarding copyright ownership.  The ASF licenses this file
+ *to you under the Apache License, Version 2.0 (the
+ *"License"); you may not use this file except in compliance
+ *with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing,
+ *software distributed under the License is distributed on an
+ *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *KIND, either express or implied.  See the License for the
+ *specific language governing permissions and limitations
+ *under the License.
+ * 
+ */
+
+#ifndef SVN_LIBSVN_SUBR_AUTH_STORE_H
+#define SVN_LIBSVN_SUBR_AUTH_STORE_H
+
+#include "svn_types.h"
+#include "svn_string.h"
+#include "svn_auth.h"
+#include "crypto.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/* Opaque encrypted authentication credential store object. */
+typedef struct svn_auth__store_t svn_auth__store_t;
+
+
+/* Open (creating if necessary and if CREATE is set) an encrypted
+   authentication credential store at AUTH_STORE_PATH, and set
+   *AUTH_STORE_P to the object which describes it.
+
+   CRYPTO_CTX is the cryptographic context which the store will use
+   for related functionality.
+
+   SECRET is the master passphrase used to encrypt the sensitive
+   contents of the store.  When creating the store it is registered
+   with the store as-is, but when opening a previously existing store,
+   it is validated against the passphrase self-checking information in
+   the store itself.  SVN_ERR_AUTHN_FAILED will be returned if SECRET
+   does not validate against an existing store's checktext.
+*/
+svn_error_t *
+svn_auth__store_open(svn_auth__store_t **auth_store_p,
+ const char *auth_store_path,
+ svn_crypto__ctx_t *crypto_ctx,
+ const svn_string_t *secret,
+ svn_boolean_t create,
+ apr_pool_t *result_pool

svn commit: r1325957 - in /subversion/trunk/subversion: libsvn_fs_fs/id.c libsvn_subr/skel.c

2012-04-13 Thread stefan2
Author: stefan2
Date: Fri Apr 13 21:17:41 2012
New Revision: 1325957

URL: http://svn.apache.org/viewvc?rev=1325957&view=rev
Log:
Use the new int64->string conversion functions in another two frequently
called functions.

* subversion/libsvn_fs_fs/id.c
  (svn_fs_fs__id_unparse): create results with a single format call and
   use it for string operations only.
* subversion/libsvn_subr/skel.c
  (void svn_skel__prepend_int): use the new conversion function

Modified:
subversion/trunk/subversion/libsvn_fs_fs/id.c
subversion/trunk/subversion/libsvn_subr/skel.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/id.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/id.c?rev=1325957&r1=1325956&r2=1325957&view=diff
==
--- subversion/trunk/subversion/libsvn_fs_fs/id.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/id.c Fri Apr 13 21:17:41 2012
@@ -26,6 +26,7 @@
 #include "id.h"
 #include "../libsvn_fs/fs-loader.h"
 #include "private/svn_temp_serializer.h"
+#include "private/svn_string_private.h"
 
 
 typedef struct id_private_t {
@@ -88,22 +89,25 @@ svn_string_t *
 svn_fs_fs__id_unparse(const svn_fs_id_t *id,
   apr_pool_t *pool)
 {
-  const char *txn_rev_id;
   id_private_t *pvt = id->fsap_data;
 
   if ((! pvt->txn_id))
 {
-  txn_rev_id = apr_psprintf(pool, "%ld/%"
-APR_OFF_T_FMT, pvt->rev, pvt->offset);
+  char rev_string[SVN_INT64_BUFFER_SIZE];
+  char offset_string[SVN_INT64_BUFFER_SIZE];
+
+  svn__i64toa(rev_string, pvt->rev);
+  svn__i64toa(offset_string, pvt->offset);
+  return svn_string_createf(pool, "%s.%s.r%s/%s",
+pvt->node_id, pvt->copy_id,
+rev_string, offset_string);
 }
   else
 {
-  txn_rev_id = pvt->txn_id;
+  return svn_string_createf(pool, "%s.%s.t%s",
+pvt->node_id, pvt->copy_id,
+pvt->txn_id);
 }
-  return svn_string_createf(pool, "%s.%s.%c%s",
-pvt->node_id, pvt->copy_id,
-(pvt->txn_id ? 't' : 'r'),
-txn_rev_id);
 }
 
 

Modified: subversion/trunk/subversion/libsvn_subr/skel.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/skel.c?rev=1325957&r1=1325956&r2=1325957&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/skel.c (original)
+++ subversion/trunk/subversion/libsvn_subr/skel.c Fri Apr 13 21:17:41 2012
@@ -24,6 +24,7 @@
 #include "svn_string.h"
 #include "svn_error.h"
 #include "private/svn_skel.h"
+#include "private/svn_string_private.h"
 
 
 /* Parsing skeletons.  */
@@ -582,9 +583,10 @@ void svn_skel__prepend_int(apr_int64_t v
svn_skel_t *skel,
apr_pool_t *result_pool)
 {
-  const char *str = apr_psprintf(result_pool, "%" APR_INT64_T_FMT, value);
+  char *val_string = apr_palloc(result_pool, SVN_INT64_BUFFER_SIZE);
+  svn__i64toa(val_string, value);
 
-  svn_skel__prepend_str(str, skel, result_pool);
+  svn_skel__prepend_str(val_string, skel, result_pool);
 }
 
 




svn commit: r1325958 - /subversion/branches/ev2-export/subversion/libsvn_client/copy.c

2012-04-13 Thread hwright
Author: hwright
Date: Fri Apr 13 21:18:09 2012
New Revision: 1325958

URL: http://svn.apache.org/viewvc?rev=1325958&view=rev
Log:
On the ev2-export branch:
Followup to r1325936.

* subversion/libsvn_client/copy.c
  (drive_single_path): *Really* compare dest and source relpaths.

Modified:
subversion/branches/ev2-export/subversion/libsvn_client/copy.c

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=1325958&r1=1325957&r2=1325958&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/copy.c Fri Apr 13 
21:18:09 2012
@@ -631,9 +631,11 @@ drive_single_path(svn_editor_t *editor,
   apr_hash_t *props = apr_hash_make(scratch_pool);
   svn_boolean_t do_delete = FALSE;
   svn_boolean_t do_add = FALSE;
-  const char *dst_relpath;
-
-  dst_relpath = svn_uri_skip_ancestor(repos_root, path, scratch_pool);
+  const char *dst_relpath = svn_uri_skip_ancestor(repos_root, path,
+  scratch_pool);
+  const char *src_relpath = svn_uri_skip_ancestor(repos_root,
+  path_info->src_url,
+  scratch_pool);
 
   /* If this is a resurrection, we know the source and dest paths are
  the same, and that our driver will only be calling us once.  */
@@ -650,7 +652,7 @@ drive_single_path(svn_editor_t *editor,
  or the destination of the move. */
   if (is_move)
 {
-  if (strcmp(path_info->src_path, dst_relpath) == 0)
+  if (strcmp(src_relpath, dst_relpath) == 0)
 do_delete = TRUE;
   else
 do_add = TRUE;
@@ -670,9 +672,6 @@ drive_single_path(svn_editor_t *editor,
 }
   if (do_add)
 {
-  const char *src_relpath = svn_uri_skip_ancestor(repos_root,
-  path_info->src_url,
-  scratch_pool);
   SVN_ERR(svn_path_check_valid(path, scratch_pool));
 
   /* ### Need to get existing props, rather than just set mergeinfo




svn commit: r1325974 - /subversion/trunk/subversion/libsvn_subr/svn_string.c

2012-04-13 Thread stefan2
Author: stefan2
Date: Fri Apr 13 21:47:38 2012
New Revision: 1325974

URL: http://svn.apache.org/viewvc?rev=1325974&view=rev
Log:
Fix build on platforms that don't allow for unaligned data access.

* subversion/libsvn_subr/svn_string.c
  (COPY_TWO_BYTES): always put parentheses around macro parameters

Modified:
subversion/trunk/subversion/libsvn_subr/svn_string.c

Modified: subversion/trunk/subversion/libsvn_subr/svn_string.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_string.c?rev=1325974&r1=1325973&r2=1325974&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/svn_string.c (original)
+++ subversion/trunk/subversion/libsvn_subr/svn_string.c Fri Apr 13 21:47:38 
2012
@@ -938,12 +938,12 @@ static const char decimal_table[100][4]
 
 /* Copy the two bytes at SOURCE[0] and SOURCE[1] to DEST[0] and DEST[1] */
 #if SVN_UNALIGNED_ACCESS_IS_OK
-#define COPY_TWO_BYTES(dest,source)\
+#  define COPY_TWO_BYTES(dest,source)\
   *(apr_uint16_t*)(dest) = *(apr_uint16_t*)(source);
 #else
-#define COPY_TWO_BYTES(dest,source) \
-  dest[0] = source[0]; \
-  dest[1] = source[1];
+#  define COPY_TWO_BYTES(dest,source) \
+  (dest)[0] = (source)[0]; \
+  (dest)[1] = (source)[1];
 #endif
 
 apr_size_t




svn commit: r1325986 - /subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd

2012-04-13 Thread rhuijben
Author: rhuijben
Date: Fri Apr 13 22:21:39 2012
New Revision: 1325986

URL: http://svn.apache.org/viewvc?rev=1325986&view=rev
Log:
* tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
  Also try to kill fs-test.exe when restarting

Modified:
subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd

Modified: 
subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
URL: 
http://svn.apache.org/viewvc/subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd?rev=1325986&r1=1325985&r2=1325986&view=diff
==
--- subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd 
(original)
+++ subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd 
Fri Apr 13 22:21:39 2012
@@ -56,6 +56,7 @@ taskkill /im svnserve.exe /f 2> nul:
 taskkill /im svnrdump.exe /f 2> nul:
 taskkill /im svnsync.exe /f 2> nul:
 taskkill /im httpd.exe /f 2> nul:
+taskkill /im fs-test.exe /f 2> nul:
 taskkill /im op-depth-test.exe /f 2> nul:
 IF EXIST "%TESTDIR%\tests\subversion\tests\cmdline\httpd\" (
   rmdir /s /q  "%TESTDIR%\tests\subversion\tests\cmdline\httpd"




svn commit: r1325997 - /subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

2012-04-13 Thread stefan2
Author: stefan2
Date: Fri Apr 13 22:35:11 2012
New Revision: 1325997

URL: http://svn.apache.org/viewvc?rev=1325997&view=rev
Log:
* subversion/libsvn_subr/cache-membuffer.c
  (membuffer_cache_set): make sure, size is being initialized

Found by: rhuijben

Modified:
subversion/trunk/subversion/libsvn_subr/cache-membuffer.c

Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1325997&r1=1325996&r2=1325997&view=diff
==
--- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Fri Apr 13 
22:35:11 2012
@@ -1143,7 +1143,7 @@ membuffer_cache_set(svn_membuffer_t *cac
 {
   apr_uint32_t group_index;
   void *buffer = NULL;
-  apr_size_t size;
+  apr_size_t size = 0;
 
   /* find the entry group that will hold the key.
*/




svn commit: r1326019 - /subversion/branches/ev2-export/subversion/libsvn_client/add.c

2012-04-13 Thread hwright
Author: hwright
Date: Fri Apr 13 23:45:38 2012
New Revision: 1326019

URL: http://svn.apache.org/viewvc?rev=1326019&view=rev
Log:
On the ev2-export branch:
Update the repos-mkdir editor to use repos-root relative paths.

* subversion/libsvn_client/add.c
  (drive_editor): Construct and use repository-root relative paths for use in
the commit editor.
  (mkdir_urls): Provide the base_relpath to drive_editor()

Modified:
subversion/branches/ev2-export/subversion/libsvn_client/add.c

Modified: subversion/branches/ev2-export/subversion/libsvn_client/add.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/add.c?rev=1326019&r1=1326018&r2=1326019&view=diff
==
--- subversion/branches/ev2-export/subversion/libsvn_client/add.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/add.c Fri Apr 13 
23:45:38 2012
@@ -743,6 +743,7 @@ static svn_error_t *
 drive_editor(svn_editor_t *editor,
  apr_array_header_t *targets,
  apr_hash_t *children_hash,
+ const char *base_relpath,
  apr_pool_t *scratch_pool)
 {
   apr_hash_t *empty_props = apr_hash_make(scratch_pool);
@@ -757,6 +758,7 @@ drive_editor(svn_editor_t *editor,
   apr_array_header_t *children;
 
   svn_pool_clear(iterpool);
+  path = svn_relpath_join(base_relpath, path, iterpool);
 
   children = apr_hash_get(children_hash, path, APR_HASH_KEY_STRING);
   if (!children)
@@ -798,6 +800,8 @@ mkdir_urls(const apr_array_header_t *url
   apr_hash_t *targets_hash;
   apr_hash_t *commit_revprops;
   apr_hash_t *children_hash;
+  const char *repos_root;
+  const char *base_relpath;
   const char *common;
   int i;
 
@@ -945,6 +949,10 @@ mkdir_urls(const apr_array_header_t *url
   APR_ARRAY_PUSH(children, const char *) = basename;
 }
 
+  /* Calculate the base_relpath. */
+  SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
+  base_relpath = svn_uri_skip_ancestor(repos_root, common, pool);
+
   /* Fetch RA commit editor */
   SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
 svn_client__get_shim_callbacks(ctx->wc_ctx,
@@ -958,7 +966,7 @@ mkdir_urls(const apr_array_header_t *url
 pool, pool));
 
   return svn_error_trace(drive_editor(editor, targets, children_hash,
-  pool));
+  base_relpath, pool));
 }
 
 




svn commit: r1326052 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/adm_crawler.c subversion/tests/cmdline/depth_tests.py

2012-04-13 Thread svn-role
Author: svn-role
Date: Sat Apr 14 04:01:12 2012
New Revision: 1326052

URL: http://svn.apache.org/viewvc?rev=1326052&view=rev
Log:
Merge the r1296251 group from trunk:

 * r1296251, r1296303, r1297522
   Resolve issue 4136, "Deep commit followed by --depth immediates update
   triggers checksum failure"
   Justification:
 User reported regression since 1.7.0
   Votes:
 +1: stsp, rhuijben, philip

Modified:
subversion/branches/1.7.x/   (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c
subversion/branches/1.7.x/subversion/tests/cmdline/depth_tests.py

Propchange: subversion/branches/1.7.x/
--
  Merged /subversion/trunk:r1296251,1296303,1297522

Modified: subversion/branches/1.7.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1326052&r1=1326051&r2=1326052&view=diff
==
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Sat Apr 14 04:01:12 2012
@@ -142,11 +142,3 @@ Veto-blocked changes:
 
 Approved changes:
 =
-
- * r1296251, r1296303, r1297522
-   Resolve issue 4136, "Deep commit followed by --depth immediates update
-   triggers checksum failure"
-   Justification:
- User reported regression since 1.7.0
-   Votes:
- +1: stsp, rhuijben, philip

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c?rev=1326052&r1=1326051&r2=1326052&view=diff
==
--- subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c Sat Apr 14 
04:01:12 2012
@@ -495,10 +495,14 @@ report_revisions_and_depths(svn_wc__db_t
 {
   svn_boolean_t is_incomplete;
   svn_boolean_t start_empty;
+  svn_depth_t report_depth = ths->depth;
 
   is_incomplete = (ths->status == svn_wc__db_status_incomplete);
   start_empty = is_incomplete;
 
+  if (!SVN_DEPTH_IS_RECURSIVE(depth))
+report_depth = svn_depth_empty;
+
   /* When a <= 1.6 working copy is upgraded without some of its
  subdirectories we miss some information in the database. If we
  report the revision as -1, the update editor will receive an
@@ -526,7 +530,7 @@ report_revisions_and_depths(svn_wc__db_t
 dir_repos_root,
 ths->repos_relpath, iterpool),
 ths->revnum,
-ths->depth,
+report_depth,
 start_empty,
 ths->lock ? ths->lock->token
   : NULL,
@@ -535,7 +539,7 @@ report_revisions_and_depths(svn_wc__db_t
 SVN_ERR(reporter->set_path(report_baton,
this_report_relpath,
ths->revnum,
-   ths->depth,
+   report_depth,
start_empty,
ths->lock ? ths->lock->token : NULL,
iterpool));
@@ -549,7 +553,7 @@ report_revisions_and_depths(svn_wc__db_t
   dir_repos_root,
   ths->repos_relpath, iterpool),
   ths->revnum,
-  ths->depth,
+  report_depth,
   start_empty,
   ths->lock ? ths->lock->token : NULL,
   iterpool));
@@ -573,7 +577,7 @@ report_revisions_and_depths(svn_wc__db_t
   SVN_ERR(reporter->set_path(report_baton,
  this_report_relpath,
  ths->revnum,
- ths->depth,
+ report_depth,
  start_empty,
  ths->lock ? ths->lock->token : NULL,
  iterpool));

Modified: subversion/branches/1.7.x/subversion/tests/cmdline/depth_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/tests/cmdline/depth_tests.py?rev=1326052&r1=132605