On Fri, Mar 7, 2014 at 1:46 PM, Stefan Fuhrmann < stefan.fuhrm...@wandisco.com> wrote:
> On Fri, Feb 28, 2014 at 1:10 PM, Julian Foad > <julianf...@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. >