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/07/16 23:27:23 UTC

svn commit: r964953 - /subversion/trunk/subversion/libsvn_client/commit.c

Author: hwright
Date: Fri Jul 16 21:27:23 2010
New Revision: 964953

URL: http://svn.apache.org/viewvc?rev=964953&view=rev
Log:
Use absolute paths consistently throughout the client commit code.

* subversion/libsvn_client/commit.c
  (get_ra_editor): Change param name, and assume an absolute path.
  (svn_client_import3): Get the absolute path, and use it.

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

Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=964953&r1=964952&r2=964953&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Fri Jul 16 21:27:23 2010
@@ -598,7 +598,7 @@ get_ra_editor(svn_ra_session_t **ra_sess
               void **edit_baton,
               svn_client_ctx_t *ctx,
               const char *base_url,
-              const char *base_dir,
+              const char *base_dir_abspath,
               const char *log_msg,
               const apr_array_header_t *commit_items,
               const apr_hash_t *revprop_table,
@@ -610,9 +610,6 @@ get_ra_editor(svn_ra_session_t **ra_sess
 {
   void *commit_baton;
   apr_hash_t *commit_revprops;
-  const char *base_dir_abspath;
-
-  SVN_ERR(svn_dirent_get_absolute(&base_dir_abspath, base_dir, pool));
 
   /* Open an RA session to URL. */
   SVN_ERR(svn_client__open_ra_session_internal(ra_session, base_url,
@@ -667,13 +664,17 @@ svn_client_import3(svn_commit_info_t **c
   svn_ra_session_t *ra_session;
   apr_hash_t *excludes = apr_hash_make(pool);
   svn_node_kind_t kind;
-  const char *base_dir = path;
+  const char *local_abspath;
+  const char *base_dir_abspath;
   apr_array_header_t *new_entries = apr_array_make(pool, 4,
                                                    sizeof(const char *));
   const char *temp;
   const char *dir;
   apr_pool_t *subpool;
 
+  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
+  base_dir_abspath = local_abspath;
+
   /* Create a new commit item and add it to the array. */
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
     {
@@ -702,9 +703,9 @@ svn_client_import3(svn_commit_info_t **c
         }
     }
 
-  SVN_ERR(svn_io_check_path(path, &kind, pool));
+  SVN_ERR(svn_io_check_path(local_abspath, &kind, pool));
   if (kind == svn_node_file)
-    base_dir = svn_dirent_dirname(path, pool);
+    base_dir_abspath = svn_dirent_dirname(local_abspath, pool);
 
   /* Figure out all the path components we need to create just to have
      a place to stick our imported tree. */
@@ -735,7 +736,7 @@ svn_client_import3(svn_commit_info_t **c
         }
     }
   while ((err = get_ra_editor(&ra_session,
-                              &editor, &edit_baton, ctx, url, base_dir,
+                              &editor, &edit_baton, ctx, url, base_dir_abspath,
                               log_msg, NULL, revprop_table,
                               commit_info_p, FALSE, NULL, TRUE, subpool)));