subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1198831 - in /subversion/trunk/subversion/libsvn_client: merge.c util.c
Date Mon, 07 Nov 2011 17:36:06 GMT
Author: julianfoad
Date: Mon Nov  7 17:36:05 2011
New Revision: 1198831

URL: http://svn.apache.org/viewvc?rev=1198831&view=rev
Log:
Fix API abuse in libsvn_client.

* subversion/libsvn_client/merge.c
  (adjust_deleted_subtree_ranges): Don't abuse 'path_relative_to_root' to
    get the path relative to the session; use a proper API instead.

* subversion/libsvn_client/util.c
  (svn_client__path_relative_to_root): Remove a comment about that rogue
    caller.

Modified:
    subversion/trunk/subversion/libsvn_client/merge.c
    subversion/trunk/subversion/libsvn_client/util.c

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1198831&r1=1198830&r2=1198831&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon Nov  7 17:36:05 2011
@@ -3042,22 +3042,14 @@ adjust_deleted_subtree_ranges(svn_client
   svn_revnum_t older_rev = is_rollback ? revision2 : revision1;
   apr_array_header_t *segments;
   const char *rel_source_path;
-  const char *session_url;
   svn_error_t *err;
 
   SVN_ERR_ASSERT(parent->remaining_ranges);
 
   /* We want to know about PRIMARY_URL@peg_rev, but we need PRIMARY_URL's
      path relative to RA_SESSION's URL. */
-  SVN_ERR(svn_ra_get_session_url(ra_session, &session_url, scratch_pool));
-  SVN_ERR(svn_client__path_relative_to_root(&rel_source_path,
-                                            ctx->wc_ctx,
-                                            primary_url,
-                                            session_url,
-                                            FALSE,
-                                            ra_session,
-                                            scratch_pool,
-                                            scratch_pool));
+  SVN_ERR(svn_ra_get_path_relative_to_session(ra_session, &rel_source_path,
+                                              primary_url, scratch_pool));
   err = svn_client__repos_location_segments(&segments, ra_session,
                                             rel_source_path, peg_rev,
                                             younger_rev, older_rev, ctx,

Modified: subversion/trunk/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/util.c?rev=1198831&r1=1198830&r2=1198831&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/util.c (original)
+++ subversion/trunk/subversion/libsvn_client/util.c Mon Nov  7 17:36:05 2011
@@ -102,7 +102,6 @@ svn_client__path_relative_to_root(const 
 
       SVN_ERR_ASSERT(repos_relpath != NULL);
     }
-     /* Merge handling passes a root that is not the repos root */
   else if (repos_root != NULL)
     {
       repos_relpath = svn_uri_skip_ancestor(repos_root, abspath_or_url,



Mime
View raw message