[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH]code comment updates to take care 'next-id'->'next-key' in bdb tables

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: 2006-10-11 21:49:12 CEST

Forgot to copy dev list...

Hyrum K. Wright wrote:
> Kamesh Jayachandran wrote:
>> Can someone look into this?
>
> Filed as issue 2629.
>
> -Hyrum
>
>> Kamesh Jayachandran wrote:
>>> Hi All,
>>> Find the attached patch/log.
>>>
>>> With regards
>>> Kamesh Jayachandran
>>> ------------------------------------------------------------------------
>>>
>>> [[[
>>> Patch by: Kamesh Jayachandran <kamesh@collab.net>
>>>
>>> In the bdb tables we use 'next-key' to store next usable key.
>>> comments and variable need to be modified in this effect.
>>>
>>> * subversion/libsvn_fs_base/bdb/txn-table.c
>>> (svn_fs_bdb__open_transactions_table): Comment change from
>>> 'next-id' to 'next-key'.
>>> (svn_fs_bdb__get_txn_list):
>>> Variable name change from 'next_id_key_len' to 'next_key_key_len'.
>>> Comment change from 'next-id' to 'next-key'.
>>>
>>> * subversion/libsvn_fs_base/bdb/copies-table.c
>>> (svn_fs_bdb__open_copies_table):
>>> Comment change from 'next-id' to 'next-key'.
>>> (svn_fs_bdb__reserve_copy_id):
>>> Comment change from 'next-id' to 'next-key'.
>>>
>>> * subversion/libsvn_fs_base/bdb/nodes-table.c
>>> (svn_fs_bdb__open_nodes_table):
>>> Comment change from 'next-id' to 'next-key'.
>>> ]]]
>>>
>>> ------------------------------------------------------------------------
>>>
>>> Index: subversion/libsvn_fs_base/bdb/txn-table.c
>>> ===================================================================
>>> --- subversion/libsvn_fs_base/bdb/txn-table.c (revision 21673)
>>> +++ subversion/libsvn_fs_base/bdb/txn-table.c (working copy)
>>> @@ -55,7 +55,7 @@
>>> "transactions", 0, DB_BTREE,
>>> open_flags, 0666));
>>>
>>> - /* Create the `next-id' table entry. */
>>> + /* Create the `next-key' table entry. */
>>> if (create)
>>> {
>>> DBT key, value;
>>> @@ -234,7 +234,7 @@
>>> apr_pool_t *pool)
>>> {
>>> base_fs_data_t *bfd = fs->fsap_data;
>>> - apr_size_t const next_id_key_len = strlen(NEXT_KEY_KEY);
>>> + apr_size_t const next_key_key_len = strlen(NEXT_KEY_KEY);
>>> apr_pool_t *subpool = svn_pool_create(pool);
>>> apr_array_header_t *names;
>>> DBC *cursor;
>>> @@ -274,9 +274,9 @@
>>> svn_fs_base__track_dbt(&key, subpool);
>>> svn_fs_base__track_dbt(&value, subpool);
>>>
>>> - /* Ignore the "next-id" key. */
>>> - if (key.size == next_id_key_len
>>> - && 0 == memcmp(key.data, NEXT_KEY_KEY, next_id_key_len))
>>> + /* Ignore the "next-key" key. */
>>> + if (key.size == next_key_key_len
>>> + && 0 == memcmp(key.data, NEXT_KEY_KEY, next_key_key_len))
>>> continue;
>>>
>>> /* Parse TRANSACTION skel */
>>> Index: subversion/libsvn_fs_base/bdb/copies-table.c
>>> ===================================================================
>>> --- subversion/libsvn_fs_base/bdb/copies-table.c (revision 21673)
>>> +++ subversion/libsvn_fs_base/bdb/copies-table.c (working copy)
>>> @@ -47,7 +47,7 @@
>>> "copies", 0, DB_BTREE,
>>> open_flags, 0666));
>>>
>>> - /* Create the initial `next-id' table entry. */
>>> + /* Create the initial `next-key' table entry. */
>>> if (create)
>>> {
>>> DBT key, value;
>>> @@ -104,7 +104,7 @@
>>>
>>> svn_fs_base__str_to_dbt(&query, NEXT_KEY_KEY);
>>>
>>> - /* Get the current value associated with the `next-id' key in the
>>> + /* Get the current value associated with the `next-key' key in the
>>> copies table. */
>>> svn_fs_base__trail_debug(trail, "copies", "get");
>>> SVN_ERR(BDB_WRAP(fs, _("allocating new copy ID (getting 'next-key')"),
>>> Index: subversion/libsvn_fs_base/bdb/nodes-table.c
>>> ===================================================================
>>> --- subversion/libsvn_fs_base/bdb/nodes-table.c (revision 21673)
>>> +++ subversion/libsvn_fs_base/bdb/nodes-table.c (working copy)
>>> @@ -54,7 +54,7 @@
>>> "nodes", 0, DB_BTREE,
>>> open_flags, 0666));
>>>
>>> - /* Create the `next-id' table entry (use '1' because '0' is
>>> + /* Create the `next-key' table entry (use '1' because '0' is
>>> reserved for the root directory to use). */
>>> if (create)
>>> {

Received on Wed Oct 11 21:49:28 2006

This is an archived mail posted to the Subversion Dev mailing list.