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

Re: svn commit: r1094692 - /subversion/trunk/subversion/libsvn_repos/rev_hunt.c

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 19 Apr 2011 08:12:48 -0400

On 04/18/2011 02:38 PM, philip_at_apache.org wrote:
> Author: philip
> Date: Mon Apr 18 18:38:58 2011
> New Revision: 1094692
>
> URL: http://svn.apache.org/viewvc?rev=1094692&view=rev
> Log:
> Make "blame -g" more efficient on the server when svn:mergeinfo is
> large.
>
> * subversion/libsvn_repos/rev_hunt.c
> (get_merged_mergeinfo): Use the FS path_changed API to check
> for property changes before doing expensive svn:mergeinfo
> manipulations, don't treat newly created paths as a merge,
> avoid allocating some empty hashes.
>
> Modified:
> subversion/trunk/subversion/libsvn_repos/rev_hunt.c
>
> Modified: subversion/trunk/subversion/libsvn_repos/rev_hunt.c

[...]

> @@ -1045,6 +1046,30 @@ get_merged_mergeinfo(apr_hash_t **merged
> apr_pool_t *subpool = svn_pool_create(pool);
> apr_hash_t *curr_mergeinfo, *prev_mergeinfo, *deleted, *changed;
> svn_error_t *err;
> + svn_fs_root_t *root;
> + apr_hash_t *changed_paths;
> + const char *path = old_path_rev->path;
> +
> + /* Getting/parsing/diffing svn:mergeinfo is expensive, so only do it
> + if there is a property change. */
> + SVN_ERR(svn_fs_revision_root(&root, repos->fs, old_path_rev->revnum,
> + subpool));
> + SVN_ERR(svn_fs_paths_changed2(&changed_paths, root, subpool));
> + while (1)
> + {
> + svn_fs_path_change2_t *changed_path = apr_hash_get(changed_paths,
> + path,
> + APR_HASH_KEY_STRING);
> + if (changed_path && changed_path->prop_mod)
> + break;
> + if (svn_dirent_is_root(path, strlen(path)))

I'd need to get my bearings before reviewing the meat of this change, but
this use of the wrong path API caught my eye. These aren't dirents. They
are probably fspaths.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
Received on 2011-04-19 14:13:26 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.