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

RE: svn commit: r39270 - trunk/subversion/libsvn_wc

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Sun, 13 Sep 2009 13:16:29 +0200

> -----Original Message-----
> From: Greg Stein [mailto:gstein_at_gmail.com]
> Sent: zondag 13 september 2009 12:57
> To: svn_at_subversion.tigris.org
> Subject: svn commit: r39270 - trunk/subversion/libsvn_wc
>
> Author: gstein
> Date: Sun Sep 13 03:56:34 2009
> New Revision: 39270
>
> Log:
> Multiple minor cleanups.
>
> * subversion/libsvn_wc/status.c:
> (assemble_status): tighten the scope of several variables
> (send_status_structure): constify the WB param.
> (is_external_path): take an EXTERNALS hash, rather than the broader
> walker baton (WB). use svn_apr_hash_index_key() for some clarity.
> (send_unversioned_item): constify the WB param. update params to the
> is_external_path call.
> (handle_externals): constify the WB parameter. drop the RESULT_POOL
> parameter since it wasn't correct thru the tortuous editor
> callbacks.
> grab the hash's pool, and replicate the keys into that pool.
> (get_dir_status): constify the WB param. rename POOL to SCRATCH_POOL.
> create the ITERPOOL earlier, in order to use it as a scratch pool
> for
> various sub-calls. use svn_hash_from_cstring_keys() rather than a
> dup
> implementation. ignore the actual tree conflict item, and simply
> record the path which has a conflict (ie. store "" in the hash).
>

> @@ -950,26 +956,22 @@ get_dir_status(struct walk_status_baton
> if (depth == svn_depth_unknown)
> depth = svn_depth_infinity;
>
> + /* Make our iteration pool. */
> + iterpool = svn_pool_create(subpool);
> +
> /* Load list of childnodes. */
> {
> const apr_array_header_t *child_nodes;
> - int i;
>
> SVN_ERR(svn_wc__db_read_children(&child_nodes, wb->db,
> local_abspath,
> - subpool, subpool));
> -
> - nodes = apr_hash_make(subpool);
> - for (i = 0; i < child_nodes->nelts; i++)
> - {
> - const char *key = APR_ARRAY_IDX(child_nodes, i, const char*);
> - apr_hash_set(nodes, key, APR_HASH_KEY_STRING, key);
> - }
> + iterpool, iterpool));
> + SVN_ERR(svn_hash_from_cstring_keys(&nodes, child_nodes, subpool));
> }

svn_hash_from_cstring_keys copies all values, this code didn't. (Was a premature optimization on my part. I knew about that function).

(In an older version of my patch there was some more processing in that loop)

        Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2394218
Received on 2009-09-13 13:16:45 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.