You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2010/06/11 15:51:02 UTC
Re: svn commit: r953695 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
On Fri, Jun 11, 2010 at 09:35, <ph...@apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jun 11 13:35:24 2010
>...
> @@ -4856,11 +4857,31 @@ svn_wc__db_global_relocate(svn_wc__db_t
> &rb.repos_relpath, &old_repos_root_url,
> &rb.repos_uuid,
> NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> + &base_shadowed,
> NULL, NULL,
> db, local_dir_abspath,
> scratch_pool, scratch_pool));
>
> + if (status == svn_wc__db_status_excluded
> + || status == svn_wc__db_status_incomplete)
> + {
> + svn_sqlite__stmt_t *stmt;
> +
> + SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
> + STMT_SELECT_BASE_NODE));
> + SVN_ERR(svn_sqlite__bindf(stmt, "is",
> + pdh->wcroot->wc_id, rb.local_relpath));
> + SVN_ERR(svn_sqlite__step(&rb.have_base_node, stmt));
> + SVN_ERR(svn_sqlite__reset(stmt));
> + }
> + else if (base_shadowed || status == svn_wc__db_status_normal
> + || status == svn_wc__db_status_absent
> + || status == svn_wc__db_status_not_present)
Is it possible to get an absent WORKING_NODE with 'svn cp URL WC' ? It
seems that we would want an absent node so that the client cannot
attempt to add/copy/move a node to that name.
>...
Cheers,
-g
Re: svn commit: r953695 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Posted by Greg Stein <gs...@gmail.com>.
On Fri, Jun 11, 2010 at 11:51, Greg Stein <gs...@gmail.com> wrote:
> On Fri, Jun 11, 2010 at 09:35, <ph...@apache.org> wrote:
>>...
>> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jun 11 13:35:24 2010
>>...
>> @@ -4856,11 +4857,31 @@ svn_wc__db_global_relocate(svn_wc__db_t
>> &rb.repos_relpath, &old_repos_root_url,
>> &rb.repos_uuid,
>> NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>> - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>> + NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>> + &base_shadowed,
>> NULL, NULL,
>> db, local_dir_abspath,
>> scratch_pool, scratch_pool));
>>
>> + if (status == svn_wc__db_status_excluded
>> + || status == svn_wc__db_status_incomplete)
>> + {
>> + svn_sqlite__stmt_t *stmt;
>> +
>> + SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
>> + STMT_SELECT_BASE_NODE));
>> + SVN_ERR(svn_sqlite__bindf(stmt, "is",
>> + pdh->wcroot->wc_id, rb.local_relpath));
>> + SVN_ERR(svn_sqlite__step(&rb.have_base_node, stmt));
>> + SVN_ERR(svn_sqlite__reset(stmt));
>> + }
>> + else if (base_shadowed || status == svn_wc__db_status_normal
I also think you should test base_shadowed first, so that you could
avoid the extra sql query.
>...
Cheers,
-g
Re: svn commit: r953695 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Posted by Philip Martin <ph...@wandisco.com>.
Greg Stein <gs...@gmail.com> writes:
> Is it possible to get an absent WORKING_NODE with 'svn cp URL WC' ? It
> seems that we would want an absent node so that the client cannot
> attempt to add/copy/move a node to that name.
It might, but that would be a copy bug. svn_wc__db_read_info asserts
that status!=absent for the working node.
Copying an absent node is explicitly disallowed in the the wc-to-wc
code because there is no way to commit such a copy. (My original plan
was to represent the copied node as not-present so that it got deleted
on commit, but the commit fails early when the parent is copied.)
--
Philip