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 450EBCBB1 for ; Sun, 2 Feb 2014 01:37:56 +0000 (UTC) Received: (qmail 45579 invoked by uid 500); 2 Feb 2014 01:37:55 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 45492 invoked by uid 500); 2 Feb 2014 01:37:54 -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 45485 invoked by uid 99); 2 Feb 2014 01:37:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Feb 2014 01:37:54 +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; Sun, 02 Feb 2014 01:37:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5853C2388868; Sun, 2 Feb 2014 01:37:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1563539 - in /subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs: temp_serializer.c temp_serializer.h Date: Sun, 02 Feb 2014 01:37:33 -0000 To: commits@subversion.apache.org From: brane@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140202013733.5853C2388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: brane Date: Sun Feb 2 01:37:32 2014 New Revision: 1563539 URL: http://svn.apache.org/r1563539 Log: On the fsfs-ucsnorm branch: Another key vs. name clarification. * subversion/libsvn_fs_fs/temp_serializer.h (svn_fs_fs__extract_dir_entry): Document the semantics of the lookup key. Note that the only caller of this function already conforms to the restrictions. * subversion/libsvn_fs_fs/temp_serializer.c (svn_fs_fs__extract_dir_entry): Rename the local variable 'name' to 'key'. (svn_fs_fs__replace_dir_entry): Fix comment to mention 'key'. Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.c subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.h Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.c URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.c?rev=1563539&r1=1563538&r2=1563539&view=diff ============================================================================== --- subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.c (original) +++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.c Sun Feb 2 01:37:32 2014 @@ -829,7 +829,7 @@ svn_fs_fs__extract_dir_entry(void **out, apr_pool_t *pool) { const dir_data_t *dir_data = data; - const char* name = baton; + const char* key = baton; svn_boolean_t found; /* resolve the reference to the entries array */ @@ -840,9 +840,9 @@ svn_fs_fs__extract_dir_entry(void **out, const apr_uint32_t *lengths = svn_temp_deserializer__ptr(data, (const void *const *)&dir_data->lengths); - /* binary search for the desired entry by name */ + /* binary search for the desired entry by key */ apr_size_t pos = find_entry((svn_fs_fs__dirent_t **)entries, - name, + key, dir_data->count, &found); @@ -953,7 +953,7 @@ svn_fs_fs__replace_dir_entry(void **data svn_temp_deserializer__ptr((const char *)dir_data, (const void *const *)&dir_data->lengths); - /* binary search for the desired entry by name */ + /* binary search for the desired entry by key */ pos = find_entry(entries, replace_baton->key, dir_data->count, &found); /* handle entry removal (if found at all) */ Modified: subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.h URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.h?rev=1563539&r1=1563538&r2=1563539&view=diff ============================================================================== --- subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.h (original) +++ subversion/branches/fsfs-ucsnorm/subversion/libsvn_fs_fs/temp_serializer.h Sun Feb 2 01:37:32 2014 @@ -192,8 +192,11 @@ svn_fs_fs__get_sharded_offset(void **out * Implements #svn_cache__partial_getter_func_t for a single * #svn_fs_fs__dirent_t within a serialized directory contents hash, * identified by its key (const char @a *baton). + * + * Note: When normalized lookups are enabled, DATA must be the + * normalized form of the entry name; otherwise, it should be + * the original form of the entry name. */ -/* UCSNORM TODO: NAME must always be the (normalized) entry key. */ svn_error_t * svn_fs_fs__extract_dir_entry(void **out, const void *data,