Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB4A610D48 for ; Mon, 1 Dec 2014 14:32:03 +0000 (UTC) Received: (qmail 84031 invoked by uid 500); 1 Dec 2014 14:32:03 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 84002 invoked by uid 500); 1 Dec 2014 14:32:03 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 83992 invoked by uid 99); 1 Dec 2014 14:32:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2014 14:32:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2014 14:31:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2274C23892E7; Mon, 1 Dec 2014 14:31:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1642690 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/externals.c Date: Mon, 01 Dec 2014 14:31:08 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141201143109.2274C23892E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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)