subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r919106 - in /subversion/trunk/subversion/libsvn_wc: adm_files.c adm_files.h
Date Thu, 04 Mar 2010 18:15:39 GMT
Author: julianfoad
Date: Thu Mar  4 18:15:39 2010
New Revision: 919106

URL: http://svn.apache.org/viewvc?rev=919106&view=rev
Log:
Declare that two more WC functions always use absolute paths.

* subversion/libsvn_wc/adm_files.h,
  subversion/libsvn_wc/adm_files.c
  (open_adm_file, svn_wc__open_writable_base): Rename path parameters to
    indicate they are always absolute paths. No code changes are necessary.
    (Each has only one caller and the caller already supplies absolute paths
    as input.)

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_files.c
    subversion/trunk/subversion/libsvn_wc/adm_files.h

Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.c?rev=919106&r1=919105&r2=919106&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.c Thu Mar  4 18:15:39 2010
@@ -374,17 +374,17 @@
 /*** Opening and closing files in the adm area. ***/
 
 /* Create and open a writable file in the admin temporary area of the WC
-   directory PATH, in a subdirectory named SUBDIR (such as "text-base"),
+   directory DIR_ABSPATH, in a subdirectory named SUBDIR (such as "text-base"),
    with the name FNAME and extra EXTENSION (such as ".svn-base").  If the
    file already exists, first delete it.  Set *STREAM to a writable stream
-   to this file, and (if SELECTED_PATH is not NULL) set *SELECTED_PATH to
+   to this file, and (if SELECTED_ABSPATH is not NULL) set *SELECTED_PATH to
    the path to this file, both allocated in RESULT_POOL.
 
    Closing the stream will close (but not delete) the file. */
 static svn_error_t *
 open_adm_file(svn_stream_t **stream,
-              const char **selected_path,
-              const char *path,
+              const char **selected_abspath,
+              const char *dir_abspath,
               const char *subdir,
               const char *fname,
               const char *extension,
@@ -394,18 +394,18 @@
   svn_error_t *err;
 
   /* Extend with tmp name. */
-  path = extend_with_adm_name(path, extension, TRUE, result_pool,
-                              subdir, fname, NULL);
-  if (selected_path)
-    *selected_path = path;  /* note: built in result_pool */
+  dir_abspath = extend_with_adm_name(dir_abspath, extension, TRUE, result_pool,
+                                     subdir, fname, NULL);
+  if (selected_abspath)
+    *selected_abspath = dir_abspath;  /* note: built in result_pool */
 
-  err = svn_stream_open_writable(stream, path, result_pool, scratch_pool);
+  err = svn_stream_open_writable(stream, dir_abspath, result_pool, scratch_pool);
   if (err && APR_STATUS_IS_EEXIST(err->apr_err))
     {
       /* Exclusive open failed, delete and retry */
       svn_error_clear(err);
-      SVN_ERR(svn_io_remove_file2(path, FALSE, scratch_pool));
-      err = svn_stream_open_writable(stream, path, result_pool, scratch_pool);
+      SVN_ERR(svn_io_remove_file2(dir_abspath, FALSE, scratch_pool));
+      err = svn_stream_open_writable(stream, dir_abspath, result_pool, scratch_pool);
     }
 
   /* Examine the error from the first and/or second attempt at opening. */
@@ -442,19 +442,19 @@
 
 svn_error_t *
 svn_wc__open_writable_base(svn_stream_t **stream,
-                           const char **temp_base_path,
-                           const char *path,
+                           const char **temp_base_abspath,
+                           const char *local_abspath,
                            svn_boolean_t need_revert_base,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool)
 {
-  const char *parent_path;
+  const char *parent_abspath;
   const char *base_name;
 
-  svn_dirent_split(path, &parent_path, &base_name, scratch_pool);
+  svn_dirent_split(local_abspath, &parent_abspath, &base_name, scratch_pool);
 
-  return open_adm_file(stream, temp_base_path,
-                       parent_path,
+  return open_adm_file(stream, temp_base_abspath,
+                       parent_abspath,
                        SVN_WC__ADM_TEXT_BASE,
                        base_name,
                        need_revert_base

Modified: subversion/trunk/subversion/libsvn_wc/adm_files.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.h?rev=919106&r1=919105&r2=919106&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.h (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.h Thu Mar  4 18:15:39 2010
@@ -116,15 +116,16 @@
                                      apr_pool_t *scratch_pool);
 
 
-/* Open the normal or revert text base, associated with PATH, for writing.
+/* Open the normal or revert text base, associated with LOCAL_ABSPATH, for
+   writing.
    The selection is based on NEED_REVERT_BASE. The opened stream will be
    returned in STREAM and the selected path will be returned in,
-   TEMP_BASE_PATH, and both will be allocated in RESULT_POOL. Any temporary
+   TEMP_BASE_ABSPATH, and both will be allocated in RESULT_POOL. Any temporary
    allocations will be performed in SCRATCH_POOL. */
 svn_error_t *
 svn_wc__open_writable_base(svn_stream_t **stream,
-                           const char **temp_base_path,
-                           const char *path,
+                           const char **temp_base_abspath,
+                           const char *local_abspath,
                            svn_boolean_t need_revert_base,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool);



Mime
View raw message