subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1642690 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/externals.c
Date Mon, 01 Dec 2014 14:31:08 GMT
Author: stsp
Date: Mon Dec  1 14:31:08 2014
New Revision: 1642690

URL: http://svn.apache.org/r1642690
Log:
Rename and document a parameter of svn_wc_parse_externals_description3().

The docstring did not explain the meaning of the 'parent_directory' parameter,
it merely stated how it is used internally.
The name 'parent_directory' is misleading since the parameter is supposed
to be the path or URL to the directory on which the svn:externals property
corresponding to the externals description is set. This property is not
necessarily set on the direct parent directory of the external, it can be
set on any parent. Usually the term 'defining directory' is used in this
context, so rename the parametr to 'defining_directory'.

* subversion/include/svn_wc.h
  (svn_wc_parse_externals_description3): Rename 'parent_directory' to
    'defining_directory'.

* subversion/libsvn_wc/externals.c
  (svn_wc_parse_externals_description3): Rename 'parent_directory' to
    'defining_directory' and 'parent_directory_display' to
    'defining_directory_display'. No functional change.

Modified:
    subversion/trunk/subversion/include/svn_wc.h
    subversion/trunk/subversion/libsvn_wc/externals.c

Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1642690&r1=1642689&r2=1642690&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Mon Dec  1 14:31:08 2014
@@ -907,13 +907,15 @@ svn_wc_external_item_dup(const svn_wc_ex
  *
  * Allocate the table, keys, and values in @a pool.
  *
- * Use @a parent_directory only in constructing error strings.
+ * @a defining_directory is the path or URL of the directory on which
+ * the svn:externals property corresponding to @a desc is set.
+ * @a defining_directory is only used when constructing error strings.
  *
  * @since New in 1.5.
  */
 svn_error_t *
 svn_wc_parse_externals_description3(apr_array_header_t **externals_p,
-                                    const char *parent_directory,
+                                    const char *defining_directory,
                                     const char *desc,
                                     svn_boolean_t canonicalize_url,
                                     apr_pool_t *pool);

Modified: subversion/trunk/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/externals.c?rev=1642690&r1=1642689&r2=1642690&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/externals.c (original)
+++ subversion/trunk/subversion/libsvn_wc/externals.c Mon Dec  1 14:31:08 2014
@@ -159,7 +159,7 @@ find_and_remove_externals_revision(int *
 
 svn_error_t *
 svn_wc_parse_externals_description3(apr_array_header_t **externals_p,
-                                    const char *parent_directory,
+                                    const char *defining_directory,
                                     const char *desc,
                                     svn_boolean_t canonicalize_url,
                                     apr_pool_t *pool)
@@ -167,8 +167,8 @@ svn_wc_parse_externals_description3(apr_
   int i;
   apr_array_header_t *externals = NULL;
   apr_array_header_t *lines = svn_cstring_split(desc, "\n\r", TRUE, pool);
-  const char *parent_directory_display = svn_path_is_url(parent_directory) ?
-    parent_directory : svn_dirent_local_style(parent_directory, pool);
+  const char *defining_directory_display = svn_path_is_url(defining_directory) ?
+    defining_directory : svn_dirent_local_style(defining_directory, pool);
 
   /* If an error occurs halfway through parsing, *externals_p should stay
    * untouched. So, store the list in a local var first. */
@@ -231,7 +231,7 @@ svn_wc_parse_externals_description3(apr_
           (SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION, NULL,
            _("Error parsing %s property on '%s': '%s'"),
            SVN_PROP_EXTERNALS,
-           parent_directory_display,
+           defining_directory_display,
            line);
 
       /* To make it easy to check for the forms, find and remove -r N
@@ -242,7 +242,7 @@ svn_wc_parse_externals_description3(apr_
       SVN_ERR(find_and_remove_externals_revision(&rev_idx,
                                                  (const char **)line_parts,
                                                  num_line_parts, item,
-                                                 parent_directory_display,
+                                                 defining_directory_display,
                                                  line, pool));
 
       token0 = line_parts[0];
@@ -258,7 +258,7 @@ svn_wc_parse_externals_description3(apr_
              "cannot use two absolute URLs ('%s' and '%s') in an external; "
              "one must be a path where an absolute or relative URL is "
              "checked out to"),
-           SVN_PROP_EXTERNALS, parent_directory_display, token0, token1);
+           SVN_PROP_EXTERNALS, defining_directory_display, token0, token1);
 
       if (0 == rev_idx && token1_is_url)
         return svn_error_createf
@@ -266,7 +266,7 @@ svn_wc_parse_externals_description3(apr_
            _("Invalid %s property on '%s': "
              "cannot use a URL '%s' as the target directory for an external "
              "definition"),
-           SVN_PROP_EXTERNALS, parent_directory_display, token1);
+           SVN_PROP_EXTERNALS, defining_directory_display, token1);
 
       if (1 == rev_idx && token0_is_url)
         return svn_error_createf
@@ -274,7 +274,7 @@ svn_wc_parse_externals_description3(apr_
            _("Invalid %s property on '%s': "
              "cannot use a URL '%s' as the target directory for an external "
              "definition"),
-           SVN_PROP_EXTERNALS, parent_directory_display, token0);
+           SVN_PROP_EXTERNALS, defining_directory_display, token0);
 
       /* The appearance of -r N or -rN forces the type of external.
          If -r is at the beginning of the line or the first token is
@@ -316,7 +316,7 @@ svn_wc_parse_externals_description3(apr_
            _("Invalid %s property on '%s': "
              "target '%s' is an absolute path or involves '..'"),
            SVN_PROP_EXTERNALS,
-           parent_directory_display,
+           defining_directory_display,
            item->target_dir);
 
       if (canonicalize_url)



Mime
View raw message