You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/05/26 04:07:46 UTC

svn commit: r948289 - /subversion/trunk/subversion/libsvn_client/deprecated.c

Author: hwright
Date: Wed May 26 02:07:46 2010
New Revision: 948289

URL: http://svn.apache.org/viewvc?rev=948289&view=rev
Log:
Rewrite a deprecated function to remove a subtle type of code duplication
(namely, that of calling a deep internal API and having to remember what the
"default" parameters are for the deprecated version of the API).

* subversion/libsvn_client/deprecated.c
  (svn_client_update): Reimplement in terms of svn_client_update2(), rather
    than svn_client__update_internal().

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

Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=948289&r1=948288&r2=948289&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Wed May 26 02:07:46 2010
@@ -1604,10 +1604,17 @@ svn_client_update(svn_revnum_t *result_r
                   svn_client_ctx_t *ctx,
                   apr_pool_t *pool)
 {
-  return svn_client__update_internal(result_rev, path, revision,
-                                     SVN_DEPTH_INFINITY_OR_FILES(recurse),
-                                     FALSE, FALSE, FALSE, NULL,
-                                     TRUE, FALSE, ctx, pool);
+  apr_array_header_t *paths = apr_array_make(pool, 1, sizeof(const char *));
+  apr_array_header_t *result_revs;
+  
+  APR_ARRAY_PUSH(paths, const char *) = path;
+
+  SVN_ERR(svn_client_update2(&result_revs, paths, revision, recurse, FALSE,
+                             ctx, pool));
+
+  *result_rev = APR_ARRAY_IDX(result_revs, 0, svn_revnum_t);
+
+  return SVN_NO_ERROR;
 }
 
 /*** From switch.c ***/