subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
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 GMT
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,



Mime
View raw message