Return-Path: Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: (qmail 79640 invoked from network); 9 Mar 2010 11:17:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Mar 2010 11:17:23 -0000 Received: (qmail 27767 invoked by uid 500); 9 Mar 2010 11:16:56 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 27750 invoked by uid 500); 9 Mar 2010 11:16:56 -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, commits@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 27743 invoked by uid 99); 9 Mar 2010 11:16:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Mar 2010 11:16:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Tue, 09 Mar 2010 11:16:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D13DA2388906; Tue, 9 Mar 2010 11:16:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r920801 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/update_editor.c Date: Tue, 09 Mar 2010 11:16:32 -0000 To: commits@subversion.apache.org From: rhuijben@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100309111632.D13DA2388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhuijben Date: Tue Mar 9 11:16:32 2010 New Revision: 920801 URL: http://svn.apache.org/viewvc?rev=920801&view=rev Log: Update some comments on svn_wc_add_repos_file4() and drop an unused argument. * subversion/include/svn_wc.h (svn_wc_add_repos_file4): Bring comment a bit to the WC-NG world. * subversion/libsvn_wc/update_editor.c (install_added_props): Update comment, drop dir_abspath argument. (svn_wc_add_repos_file4): Update caller. Modified: subversion/trunk/subversion/include/svn_wc.h subversion/trunk/subversion/libsvn_wc/update_editor.c Modified: subversion/trunk/subversion/include/svn_wc.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=920801&r1=920800&r2=920801&view=diff ============================================================================== --- subversion/trunk/subversion/include/svn_wc.h (original) +++ subversion/trunk/subversion/include/svn_wc.h Tue Mar 9 11:16:32 2010 @@ -4376,13 +4376,13 @@ svn_wc_add(const char *path, /** Add a file to a working copy at @a local_abspath, obtaining the *text-base's contents from @a new_base_contents, the wc file's - * content from @a new_contents, its base properties from @a - * new_base_props and wc properties from @a new_props. Use @a wc_ctx - * for accessing the working copy. - * - * The base text and props normally come from the repository file - * represented by the copyfrom args, see below. The new file will - * be scheduled for addition with history. + * content from @a new_contents, its unmodified properties from @a + * new_base_props and its actual properties from @a new_props. Use + * @a wc_ctx for accessing the working copy. + * + * The unmodified text and props normally come from the repository + * file represented by the copyfrom args, see below. The new file + * will be marked as copy. * * @a new_contents and @a new_props may be NULL, in which case * the working copy text and props are taken from the base files with @@ -4391,8 +4391,7 @@ svn_wc_add(const char *path, * @a new_contents must be provided in Normal Form. This is required * in order to pass both special and non-special files through a stream. * - * @a adm_access, or an access baton in its associated set, must - * contain a write lock for the parent of @a dst_path. + * @a wc_ctx must contain a write lock for the parent of @a dst_path. * * If @a copyfrom_url is non-NULL, then @a copyfrom_rev must be a * valid revision number, and together they are the copyfrom history @@ -4400,8 +4399,8 @@ svn_wc_add(const char *path, * * The @a cancel_func and @a cancel_baton are a standard cancellation * callback, or NULL if no callback is needed. @a notify_func and - * @a notify_baton are a notification callback, and will be notified - * of the addition of this file. + * @a notify_baton are a notification callback, and (if not NULL) + * will be notified of the addition of this file. * * Use @a scratch_pool for temporary allocations. * Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=920801&r1=920800&r2=920801&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_wc/update_editor.c (original) +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue Mar 9 11:16:32 2010 @@ -5983,22 +5983,18 @@ svn_wc_get_actual_target2(const char **a return SVN_NO_ERROR; } -/* TODO ### Update to mention LOCAL_ABSPATH, DIR_ABSPATH; not DST_PATH, - ADM_ACCESS. - - Write, to LOG_ACCUM, commands to install properties for an added DST_PATH. - NEW_BASE_PROPS and NEW_PROPS are base and working properties, respectively. - BASE_PROPS can contain entryprops and wcprops as well. ADM_ACCESS must - be an access baton for DST_PATH. - Use @a POOL for temporary allocations. */ +/* Write, to DB, commands to install properties for an added LOCAL_ABSPATH + in DB. UNMODIFIED_PROPS and NEW_PROPS are the properties to be installed + in WORKING_NODE and ACTUAL_NODE, respectively. + UNMODIFIED_PROPS can contain entryprops and wcprops as well. + Use SCRATCH_POOL for temporary allocations. */ static svn_error_t * install_added_props(struct last_change_info **last_change, svn_wc__db_t *db, - const char *dir_abspath, const char *local_abspath, - apr_hash_t **new_base_props, + apr_hash_t **unmodified_props, apr_hash_t *new_props, - apr_pool_t *pool) + apr_pool_t *scratch_pool) { apr_array_header_t *regular_props = NULL, *wc_props = NULL, *entry_props = NULL; @@ -6009,19 +6005,19 @@ install_added_props(struct last_change_i /* Diff an empty prop has against the new base props gives us an array of all props. */ - SVN_ERR(svn_prop_diffs(&prop_array, *new_base_props, - apr_hash_make(pool), pool)); + SVN_ERR(svn_prop_diffs(&prop_array, *unmodified_props, + apr_hash_make(scratch_pool), scratch_pool)); SVN_ERR(svn_categorize_props(prop_array, &entry_props, &wc_props, ®ular_props, - pool)); + scratch_pool)); /* Put regular props back into a hash table. */ - *new_base_props = prop_hash_from_array(regular_props, pool); + *unmodified_props = prop_hash_from_array(regular_props, scratch_pool); } /* Install the entry props. */ SVN_ERR(accumulate_last_change(last_change, NULL, db, local_abspath, - entry_props, pool, pool)); + entry_props, scratch_pool, scratch_pool)); return SVN_NO_ERROR; } @@ -6213,8 +6209,8 @@ svn_wc_add_repos_file4(svn_wc_context_t /* Install the props before the loggy translation, so that it has access to the properties for this file. */ - SVN_ERR(install_added_props(&last_change, db, dir_abspath, - local_abspath, &new_base_props, new_props, pool)); + SVN_ERR(install_added_props(&last_change, db, local_abspath, &new_base_props, + new_props, pool)); /* Copy the text base contents into a temporary file so our log can refer to it. Compute its checksum as we copy. */