subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1098446 - in /subversion/trunk/subversion/libsvn_wc: adm_files.c adm_files.h adm_ops.c
Date Sun, 01 May 2011 23:54:43 GMT
Author: gstein
Date: Sun May  1 23:54:42 2011
New Revision: 1098446

URL: http://svn.apache.org/viewvc?rev=1098446&view=rev
Log:
Move svn_wc__nonexistent_path() near its single caller and make it private
to the file. Keeping as a separate function in case it needs to be exposed
again in the future.

* subversion/libsvn_wc/adm_ops.c:
  (nonexistent_path): moved here from adm_files.c::svn_wc__nonexistent_path.
    Dropped the unused DB param and renamed ADM_ABSPATH to WCROOT_ABSPATH
    to better reflect its purpose.
  (svn_wc_get_pristine_copy_path): rename localvar to WCROOT_ABSPATH and
    update function call to nonexistent_path (name and params).

* subversion/libsvn_wc/adm_files.c:
  (svn_wc__nonexistent_path): moved to nonexistent_path.

* subversion/libsvn_wc/adm_files.h:
  (svn_wc__nonexistent_path): deleted

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

Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.c?rev=1098446&r1=1098445&r2=1098446&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.c Sun May  1 23:54:42 2011
@@ -624,13 +624,3 @@ svn_wc_create_tmp_file2(apr_file_t **fp,
 
   return SVN_NO_ERROR;
 }
-
-
-const char *
-svn_wc__nonexistent_path(svn_wc__db_t *db,
-                         const char *adm_abspath,
-                         apr_pool_t *scratch_pool)
-{
-  return svn_wc__adm_child(adm_abspath, SVN_WC__ADM_NONEXISTENT_PATH,
-                           scratch_pool);
-}

Modified: subversion/trunk/subversion/libsvn_wc/adm_files.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.h?rev=1098446&r1=1098445&r2=1098446&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.h (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.h Sun May  1 23:54:42 2011
@@ -154,14 +154,6 @@ svn_wc__adm_cleanup_tmp_area(svn_wc__db_
                              apr_pool_t *scratch_pool);
 
 
-/* Return a path where nothing exists on disk, within the admin directory
-   belonging to the versioned directory ADM_ABSPATH in DB. */
-const char *
-svn_wc__nonexistent_path(svn_wc__db_t *db,
-                         const char *adm_abspath,
-                         apr_pool_t *scratch_pool);
-
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1098446&r1=1098445&r2=1098446&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Sun May  1 23:54:42 2011
@@ -1822,6 +1822,16 @@ svn_wc_revert4(svn_wc_context_t *wc_ctx,
 }
 
 
+/* Return a path where nothing exists on disk, within the admin directory
+   belonging to the WCROOT_ABSPATH directory.  */
+static const char *
+nonexistent_path(const char *wcroot_abspath, apr_pool_t *scratch_pool)
+{
+  return svn_wc__adm_child(wcroot_abspath, SVN_WC__ADM_NONEXISTENT_PATH,
+                           scratch_pool);
+}
+
+
 svn_error_t *
 svn_wc_get_pristine_copy_path(const char *path,
                               const char **pristine_path,
@@ -1844,19 +1854,20 @@ svn_wc_get_pristine_copy_path(const char
     {
       /* The node doesn't exist, so return a non-existent path located
          in WCROOT/.svn/  */
-      const char *adm_abspath;
+      const char *wcroot_abspath;
 
       svn_error_clear(err);
 
-      err = svn_wc__db_get_wcroot(&adm_abspath, db, local_abspath,
+      err = svn_wc__db_get_wcroot(&wcroot_abspath, db, local_abspath,
                                   pool, pool);
       if (err == NULL)
-        *pristine_path = svn_wc__nonexistent_path(db, adm_abspath, pool);
+        *pristine_path = nonexistent_path(wcroot_abspath, pool);
     }
 
    return svn_error_compose_create(err, svn_wc__db_close(db));
 }
 
+
 svn_error_t *
 svn_wc_get_pristine_contents2(svn_stream_t **contents,
                               svn_wc_context_t *wc_ctx,



Mime
View raw message