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

Re: svn commit: r893179 - in /subversion/trunk/subversion/libsvn_fs_base: dag.c revs-txns.c

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 23 Dec 2009 12:16:50 +0000

julianfoad_at_apache.org writes:

> + if (txn_obj->copies)
> + {
> + int i;
> +
> + for (i = 0; i < txn_obj->copies->nelts; i++)
> + {

Is this loop big enough to warrent an iteration pool?

> + const char *txn_copy_id = APR_ARRAY_IDX(txn_obj->copies, i,
> + const char *);
> + const char *final_copy_id;
> + copy_t *copy;
> + const char *id_node_id, *id_copy_id, *id_txn_id;
> +
> + /* Get the old copy */
> + SVN_ERR(svn_fs_bdb__get_copy(&copy, trail->fs, txn_copy_id, trail,
> + pool));
> +
> + /* Modify it: change dst_noderev_id's txn_id to the new txn's id */
> + id_node_id = svn_fs_base__id_node_id(copy->dst_noderev_id);
> + id_copy_id = svn_fs_base__id_copy_id(copy->dst_noderev_id);
> + id_txn_id = svn_fs_base__id_txn_id(copy->dst_noderev_id);
> + /* SVN_ERR_ASSERT(svn_fs_base__key_compare(id_copy_id, old_copy_id)
> + == 0); */
> + /* SVN_ERR_ASSERT(svn_fs_base__key_compare(id_txn_id, old_txn_id)
> + == 0); */

Do those comparisons fail or what?

> + copy->dst_noderev_id = svn_fs_base__id_create(id_node_id,
> + id_copy_id,
> + txn->id,
> + pool);
> +
> + /* Save the new copy */
> + final_copy_id = id_copy_id;
> + SVN_ERR(svn_fs_bdb__create_copy(trail->fs, final_copy_id,
> + copy->src_path, copy->src_txn_id,
> + copy->dst_noderev_id, copy->kind,
> + trail, pool));
> + }
> + }

-- 
Philip
Received on 2009-12-23 13:17:29 CET

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.