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

Re: svn commit: r1036087 - in /subversion/trunk/subversion/libsvn_wc: entries.c entries.h upgrade.c wc_db.c wc_db.h

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Wed, 24 Nov 2010 09:27:31 +0000

On Wed, 2010-11-17, philip_at_apache.org wrote:
> Author: philip
> Date: Wed Nov 17 15:53:03 2010
> New Revision: 1036087
>
> URL: http://svn.apache.org/viewvc?rev=1036087&view=rev
> Log:
> Start making upgrade handle SVN_WC__OP_DEPTH, don't create base nodes
> for nodes that should not have them. This commit makes two tests FAIL
> that used to PASS, but they PASSed erroneously since they were creating
> base nodes within an added tree.

Nice.

[...]
> * subversion/libsvn_wc/upgrade.c
> (upgrade_to_wcng): Add dir_baton and parent_baton parameters, pass to
> svn_wc__write_upgraded_entries.
> (upgrade_working_copy): Add dir_baton, parent_baton and result_pool
> parameters, pass to upgrade_to_wcng and upgrade_working_copy.
> (svn_wc_upgrade): Pass NULL parent_baton to upgrade_working_copy.
[...]

> /* */
> static svn_error_t *
> -upgrade_working_copy(svn_wc__db_t *db,
> +upgrade_working_copy(void **dir_baton,

Looks like the dir_baton output of this function (unlike others in this
commit) is not needed by callers: they always discard it.

- Julian

> + void *parent_baton,
> + svn_wc__db_t *db,
> const char *dir_abspath,
> svn_wc_upgrade_get_repos_info_t repos_info_func,
> void *repos_info_baton,
> @@ -1463,6 +1467,7 @@ upgrade_working_copy(svn_wc__db_t *db,
> void *cancel_baton,
> svn_wc_notify_func2_t notify_func,
> void *notify_baton,
> + apr_pool_t *result_pool,
> apr_pool_t *scratch_pool)
> {
> int old_format;
> @@ -1507,7 +1512,7 @@ upgrade_working_copy(svn_wc__db_t *db,
> }
>
>
> - SVN_ERR(upgrade_to_wcng(db, dir_abspath, old_format,
> + SVN_ERR(upgrade_to_wcng(dir_baton, parent_baton, db, dir_abspath, old_format,
> repos_info_func, repos_info_baton,
> repos_cache, data, scratch_pool, iterpool));
>
> @@ -1520,15 +1525,16 @@ upgrade_working_copy(svn_wc__db_t *db,
> for (i = 0; i < subdirs->nelts; ++i)
> {
> const char *child_abspath = APR_ARRAY_IDX(subdirs, i, const char *);
> + void *child_baton;
>
> svn_pool_clear(iterpool);
>
> - SVN_ERR(upgrade_working_copy(db, child_abspath,
> + SVN_ERR(upgrade_working_copy(&child_baton, *dir_baton, db, child_abspath,
> repos_info_func, repos_info_baton,
> repos_cache, data,
> cancel_func, cancel_baton,
> notify_func, notify_baton,
> - iterpool));
> + iterpool, iterpool));
> }
>
> svn_pool_destroy(iterpool);
> @@ -1590,6 +1596,7 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
> struct upgrade_data_t data = { NULL };
> svn_skel_t *work_item, *work_items = NULL;
> const char *pristine_from, *pristine_to, *db_from, *db_to;
> + void *parent_baton;
>
> if (!is_old_wcroot(local_abspath, scratch_pool))
> return svn_error_createf(
> @@ -1611,12 +1618,12 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
> scratch_pool, scratch_pool));
>
> /* Upgrade the pre-wcng into a wcng in a temporary location. */
> - SVN_ERR(upgrade_working_copy(db, local_abspath,
> + SVN_ERR(upgrade_working_copy(&parent_baton, NULL, db, local_abspath,
> repos_info_func, repos_info_baton,
> apr_hash_make(scratch_pool), &data,
> cancel_func, cancel_baton,
> notify_func, notify_baton,
> - scratch_pool));
> + scratch_pool, scratch_pool));
>
Received on 2010-11-24 10:28:21 CET

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