On Tue, Jun 30, 2009 at 21:40, Hyrum K. Wright<hyrum_at_hyrumwright.org> wrote:
>...
> +++ trunk/subversion/libsvn_wc/update_editor.c  Tue Jun 30 12:40:57 2009     (r38273)
>...
> @@ -1754,8 +1755,8 @@ already_in_a_tree_conflict(const char **
> Â ancestors = apr_array_make(pool, 0, sizeof(const char *));
>
> Â /* If PATH is under version control, put it on the ancestor list. */
> - Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, ancestor, pool));
> - Â err = svn_wc__get_entry(&entry, db, local_abspath, TRUE,
> + Â SVN_ERR(svn_dirent_get_absolute(&ancestor_abspath, ancestor, pool));
> + Â err = svn_wc__get_entry(&entry, db, ancestor_abspath, TRUE,
> Â Â Â Â Â Â Â Â Â Â Â Â Â svn_node_unknown, FALSE, pool, pool);
If you create the iterpool sooner, then you could use it here.
> Â if (err)
> Â Â {
> @@ -1775,11 +1776,15 @@ already_in_a_tree_conflict(const char **
>
> Â /* Append to the list all ancestor-dirs in the working copy. Â Ignore
> Â Â Â the root because it can't be tree-conflicted. */
> + Â iterpool = svn_pool_create(pool);
> Â while (! svn_path_is_empty(ancestor))
> Â Â {
> Â Â Â svn_boolean_t is_wc_root;
>
> - Â Â Â SVN_ERR(check_wc_root(&is_wc_root, NULL, ancestor, db, pool));
> + Â Â Â svn_pool_clear(iterpool);
> + Â Â Â SVN_ERR(svn_dirent_get_absolute(&ancestor_abspath, ancestor, iterpool));
> + Â Â Â SVN_ERR(check_wc_root(&is_wc_root, NULL, db, ancestor_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â iterpool));
These loops do a lot of svn_dirent_get_absolute() calls. Instead, you
could have a running pair of ancestor/ancestor_abspath. Put the
abspath into the array, and then the last loop wouldn't need a get_abs
at all.
>...
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2381386
Received on 2009-08-07 19:08:29 CEST