You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/06/18 08:39:32 UTC
svn commit: r955846 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Author: stylesen
Date: Fri Jun 18 06:39:31 2010
New Revision: 955846
URL: http://svn.apache.org/viewvc?rev=955846&view=rev
Log:
Remove usage of 'svn_wc__node_'
* subversion/libsvn_wc/update_editor.c
(make_editor): Read the repository parameters from wc_db.
Modified:
subversion/trunk/subversion/libsvn_wc/update_editor.c
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=955846&r1=955845&r2=955846&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri Jun 18 06:39:31 2010
@@ -5208,10 +5208,12 @@ make_editor(svn_revnum_t *target_revisio
if (depth == svn_depth_unknown)
depth_is_sticky = FALSE;
- /* Get the anchor entry, so we can fetch the repository root. */
- SVN_ERR(svn_wc__node_get_repos_info(&repos_root, &repos_uuid, wc_ctx,
- anchor_abspath, TRUE, FALSE,
- result_pool, scratch_pool));
+ /* Get the anchor's repository root and uuid. */
+ SVN_ERR(svn_wc__db_read_info(NULL,NULL, NULL, NULL, &repos_root, &repos_uuid,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, wc_ctx->db, anchor_abspath,
+ result_pool, scratch_pool));
/* With WC-NG we need a valid repository root */
SVN_ERR_ASSERT(repos_root != NULL && repos_uuid != NULL);
RE: svn commit: r955846 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Greg Stein [mailto:gstein@gmail.com]
> Sent: zondag 20 juni 2010 0:44
> To: Senthil Kumaran S
> Cc: dev@subversion.apache.org
> Subject: Re: svn commit: r955846 -
> /subversion/trunk/subversion/libsvn_wc/update_editor.c
>
> On Sat, Jun 19, 2010 at 01:47, Senthil Kumaran S <se...@collab.net>
> wrote:
> > Greg Stein wrote:
> >> On Fri, Jun 18, 2010 at 02:39, <st...@apache.org> wrote:
> >>> ...
> >>> +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri Jun
> 18 06:39:31 2010
> >>> @@ -5208,10 +5208,12 @@ make_editor(svn_revnum_t *target_revisio
> >>> if (depth == svn_depth_unknown)
> >>> depth_is_sticky = FALSE;
> >>>
> >>> - /* Get the anchor entry, so we can fetch the repository root. */
> >>> - SVN_ERR(svn_wc__node_get_repos_info(&repos_root, &repos_uuid,
> wc_ctx,
> >>> - anchor_abspath, TRUE, FALSE,
> >>> - result_pool, scratch_pool));
> >>> + /* Get the anchor's repository root and uuid. */
> >>> + SVN_ERR(svn_wc__db_read_info(NULL,NULL, NULL, NULL, &repos_root,
> &repos_uuid,
> >>> + NULL, NULL, NULL, NULL, NULL, NULL,
> NULL, NULL,
> >>> + NULL, NULL, NULL, NULL, NULL, NULL,
> NULL, NULL,
> >>> + NULL, NULL, wc_ctx->db,
> anchor_abspath,
> >>> + result_pool, scratch_pool));
> >>
> >> These are not equivalent. The read_info() might return NULL values
> for
> >> repos_*, indicating they are inherited from the parent. The node
> >> function will grab the data from the parent, if/when necessary.
> >
> > What will be the alternative function to use here?
>
> Stick to the node function, or go look at its contents.
>
> The point is: if NULL is returned, then you need to scan upwards for
> the repository information.
>
> The other thing to note here: I believe that the BASE node *must*
> exist if you're going to run an update on it. Thus, read_info() is a
> bit of overkill, and you can simply use base_get_info() and (if
> needed) scan_base_repos(). I'd suggest this latter approach, if
> possible.
This last part is not the case; it can be valid on not existing or WORKING
only nodes:
Update can be used to get a node that is not in the working copy such as
excluded (directly or by a limiting depth on its parent) or which is just a
local addition (but added in the repository by somebody else) into the
working copy.
Bert
Re: svn commit: r955846 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Posted by Greg Stein <gs...@gmail.com>.
On Sat, Jun 19, 2010 at 01:47, Senthil Kumaran S <se...@collab.net> wrote:
> Greg Stein wrote:
>> On Fri, Jun 18, 2010 at 02:39, <st...@apache.org> wrote:
>>> ...
>>> +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri Jun 18 06:39:31 2010
>>> @@ -5208,10 +5208,12 @@ make_editor(svn_revnum_t *target_revisio
>>> if (depth == svn_depth_unknown)
>>> depth_is_sticky = FALSE;
>>>
>>> - /* Get the anchor entry, so we can fetch the repository root. */
>>> - SVN_ERR(svn_wc__node_get_repos_info(&repos_root, &repos_uuid, wc_ctx,
>>> - anchor_abspath, TRUE, FALSE,
>>> - result_pool, scratch_pool));
>>> + /* Get the anchor's repository root and uuid. */
>>> + SVN_ERR(svn_wc__db_read_info(NULL,NULL, NULL, NULL, &repos_root, &repos_uuid,
>>> + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>>> + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>>> + NULL, NULL, wc_ctx->db, anchor_abspath,
>>> + result_pool, scratch_pool));
>>
>> These are not equivalent. The read_info() might return NULL values for
>> repos_*, indicating they are inherited from the parent. The node
>> function will grab the data from the parent, if/when necessary.
>
> What will be the alternative function to use here?
Stick to the node function, or go look at its contents.
The point is: if NULL is returned, then you need to scan upwards for
the repository information.
The other thing to note here: I believe that the BASE node *must*
exist if you're going to run an update on it. Thus, read_info() is a
bit of overkill, and you can simply use base_get_info() and (if
needed) scan_base_repos(). I'd suggest this latter approach, if
possible.
Cheers,
-g
Re: svn commit: r955846 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Posted by Senthil Kumaran S <se...@collab.net>.
Greg Stein wrote:
> On Fri, Jun 18, 2010 at 02:39, <st...@apache.org> wrote:
>> ...
>> +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri Jun 18 06:39:31 2010
>> @@ -5208,10 +5208,12 @@ make_editor(svn_revnum_t *target_revisio
>> if (depth == svn_depth_unknown)
>> depth_is_sticky = FALSE;
>>
>> - /* Get the anchor entry, so we can fetch the repository root. */
>> - SVN_ERR(svn_wc__node_get_repos_info(&repos_root, &repos_uuid, wc_ctx,
>> - anchor_abspath, TRUE, FALSE,
>> - result_pool, scratch_pool));
>> + /* Get the anchor's repository root and uuid. */
>> + SVN_ERR(svn_wc__db_read_info(NULL,NULL, NULL, NULL, &repos_root, &repos_uuid,
>> + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>> + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
>> + NULL, NULL, wc_ctx->db, anchor_abspath,
>> + result_pool, scratch_pool));
>
> These are not equivalent. The read_info() might return NULL values for
> repos_*, indicating they are inherited from the parent. The node
> function will grab the data from the parent, if/when necessary.
What will be the alternative function to use here?
Thank You.
--
Senthil Kumaran S
http://www.stylesen.org/
Re: svn commit: r955846 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Posted by Greg Stein <gs...@gmail.com>.
On Fri, Jun 18, 2010 at 02:39, <st...@apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri Jun 18 06:39:31 2010
> @@ -5208,10 +5208,12 @@ make_editor(svn_revnum_t *target_revisio
> if (depth == svn_depth_unknown)
> depth_is_sticky = FALSE;
>
> - /* Get the anchor entry, so we can fetch the repository root. */
> - SVN_ERR(svn_wc__node_get_repos_info(&repos_root, &repos_uuid, wc_ctx,
> - anchor_abspath, TRUE, FALSE,
> - result_pool, scratch_pool));
> + /* Get the anchor's repository root and uuid. */
> + SVN_ERR(svn_wc__db_read_info(NULL,NULL, NULL, NULL, &repos_root, &repos_uuid,
> + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> + NULL, NULL, wc_ctx->db, anchor_abspath,
> + result_pool, scratch_pool));
These are not equivalent. The read_info() might return NULL values for
repos_*, indicating they are inherited from the parent. The node
function will grab the data from the parent, if/when necessary.
Cheers,
-g