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

Re: svn commit: r1554800 - in /subversion/trunk/subversion: include/svn_fs.h libsvn_fs/fs-loader.c libsvn_fs/fs-loader.h libsvn_fs_base/tree.c libsvn_fs_fs/tree.c libsvn_fs_x/tree.c

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Sat, 8 Mar 2014 13:44:51 +0100

On Fri, Mar 7, 2014 at 1:46 PM, Stefan Fuhrmann <
stefan.fuhrmann_at_wandisco.com> wrote:

> On Fri, Feb 28, 2014 at 1:10 PM, Julian Foad <julianfoad_at_btopenworld.com>wrote:
>
>> > Author: stefan2
>> > Date: Thu Jan 2 13:16:43 2014
>> > New Revision: 1554800
>> >
>> > URL: http://svn.apache.org/r1554800
>>
>> Hi Stefan. I just noticed a few things in this commit...
>>
>
> > Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
>> >
>> ==============================================================================
>> >
>> > +static svn_error_t *
>> > +fs_node_relation(svn_fs_node_relation_t *relation,
>> > + svn_fs_root_t *root_a, const char *path_a,
>> > + svn_fs_root_t *root_b, const char *path_b,
>> > + apr_pool_t *pool)
>> > +{
>> > + dag_node_t *node;
>> > + const svn_fs_id_t *id;
>> > + svn_fs_fs__id_part_t rev_item_a, rev_item_b, node_id_a, node_id_b;
>> > +
>> > + /* Root paths are a common special case. */
>> > + svn_boolean_t a_is_root_dir
>> > + = (path_a[0] == '\0') || ((path_a[0] == '/') &&
>> > (path_a[1] == '\0'));
>> > + svn_boolean_t b_is_root_dir
>> > + = (path_b[0] == '\0') || ((path_b[0] == '/') &&
>> > (path_b[1] == '\0'));
>> > +
>> > + /* Root paths are never related to non-root paths and path from
>> different
>> > + * repository are always unrelated. */
>>
>> It's possible to copy the root (svn cp ^/@123 ^/copy-of-old-root). Does a
>> copy not count as "related"? I'm not sure precisely what "related" means.
>>
>
> You are right, this is a bug. I've got confused by
> svn_fs_fs__node_id treating the root as a special
> case. And I've operated on the assumption that
> node_id 0 would always imply "root" - which is
> also false. Going to fix that now.
>

r1575320 handles the "nodeID 0 may be copied
as well" issue - basically simplifying the code.

r1575323 fixes the only place where I assumed
that nodeID==0 was equivalent to being root.

>
> Thanks for the review!
>

-- Stefan^2.

>
Received on 2014-03-08 13:45:37 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.