On Wed, Apr 20, 2011 at 19:37, <rhuijben_at_apache.org> wrote:
> Author: rhuijben
> Date: Wed Apr 20 23:37:59 2011
> New Revision: 1095558
>
> URL: http://svn.apache.org/viewvc?rev=1095558&view=rev
> Log:
> Don't reimplement insert_base_node if we can just use the real thing.
Nice.
>...
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Apr 20 23:37:59 2011
>...
> @@ -10272,29 +10216,35 @@ svn_wc__db_temp_op_set_new_dir_to_incomp
> {
> svn_wc__db_wcroot_t *wcroot;
> const char *local_relpath;
> - struct set_new_dir_to_incomplete_baton_t baton;
> + struct insert_base_baton_t ibb;
>
> SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
> SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision));
> SVN_ERR_ASSERT(repos_relpath && repos_root_url && repos_uuid);
>
> - baton.repos_relpath = repos_relpath;
> - baton.repos_root_url = repos_root_url;
> - baton.repos_uuid = repos_uuid;
> - baton.revision = revision;
> - baton.depth = depth;
> -
> SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
> db, local_abspath,
> scratch_pool, scratch_pool));
>
> VERIFY_USABLE_WCROOT(wcroot);
>
> - SVN_ERR(flush_entries(wcroot, local_abspath, scratch_pool));
> + blank_ibb(&ibb);
> +
> + /* Calculate repos_id in insert_base_node() to avoid extra transaction */
> + ibb.repos_root_url = repos_root_url;
> + ibb.repos_uuid = repos_uuid;
> +
> + ibb.status = svn_wc__db_status_incomplete;
> + ibb.repos_relpath = repos_relpath;
> + ibb.revision = revision;
> + ibb.depth = depth;
I think you should explicitly set svn_wc__db_kind_dir rather than rely
on it having the value zero.
>...
Cheers,
-g
Received on 2011-04-21 04:40:22 CEST