You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Näslund <da...@longitudo.com> on 2009/08/25 17:29:39 UTC

What's up with SVNTreeUnequal: Expected and actual SVN_ROOT_NODE differs

> > > Yes, please add a svn_wc__adm_retrieve_(with/via/...?)_context()  
> > > helper.
> > >
> > > I think that would be a useful helper in more places of  
> > > libsvn_client, until libsvn_wc accepts wc_ctx, abspath everywhere.

> > Note that we already have a svn_wc__adm_retrieve_internal2() API which  
> > accepts an wc_db and abspath, and just fetches the baton from the db's  
> > set of cached batons.  Perhaps this might be of some use.  One catch  
> > here is that the *type* of the baton needs to be correct.  In other  
> > words, we should return a cached read baton, when the caller asks for  
> > a read/write baton.  (I tried making *all* batons read/write at one  
> > point, but that introduces problems of it's own, believe it or not.)

I've written svn_wc__adm_retrieve_from_context() as a simple wrapper
around svn_wc__adm_retrieve_internal2(). It just returns the result in
adm_access.

When using it like this in libsvn_client/merge.c (merge_file_changed):

  SVN_ERR(svn_dirent_get_absolute(&mine_dir_abspath, 
                                  svn_dirent_dirname(mine, subpool),
                                  subpool));
  
  SVN_ERR(svn_wc__adm_retrieve_from_context(&adm_access, wc_ctx,
                                            mine_dir_abspath,
                                            subpool));

I get an SVNTreeUnequal exception and a message that says: 

Expected '__SVN_ROOT_NODE' and actual '__SVN_ROOT_NODE' in skip tree are
different!
...
Unequal Types: one Node is a file, the other is a directory

I get it for atleast five of the merge_tests.  My interpretation is that
my adm_access refers to a path that is a file when it should refer to
the directory above. But mine should refer to the file and using
svn_dirent_dirname() should give me a path to the parent directory of
the file.

I will continue to poke around but I'm grateful for any suggestions.

Mvh
Daniel

(Sorry for all theese questions. I'm a slow starter but hopefully I will
gain speed soon.)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387237