On 07/08/2010 02:27 AM, Daniel Shahaf wrote:
> Eric Peers wrote on Wed, 7 Jul 2010 at 04:44 -0000:
>
>> Incidentally, where is [svn_ra_reparent] defined??? I can't
>> find it in the libraries, but I see it in libsvn_ra-1.so but not in the
>> libsvn_ra directory...
>>
> % grep svn_ra_reparent tags
> svn_ra_reparent ./subversion/include/svn_ra.h /^svn_ra_reparent(svn_ra_session_t *ra_session,$/;" p signature:(svn_ra_session_t *ra_session, const char *url, apr_pool_t *pool)
> svn_ra_reparent ./subversion/libsvn_ra/ra_loader.c /^svn_error_t *svn_ra_reparent(svn_ra_session_t *session,$/;" f signature:(svn_ra_session_t *session, const char *url, apr_pool_t *pool)
>
>
> To save you some work: you'll see it calls vtable->reparent(). So the
> functions you *really* want are svn_ra__*_reparent():
>
> % grep _reparent tags | awk '{print $1,$2}' | grep -v tools/server-side/
> ra_svn_reparent ./subversion/libsvn_ra_svn/client.c
> svn_log__reparent ./subversion/include/private/svn_log.h
> svn_log__reparent ./subversion/libsvn_subr/log.c
> svn_ra_local__reparent ./subversion/libsvn_ra_local/ra_plugin.c
> svn_ra_neon__reparent ./subversion/libsvn_ra_neon/session.c
> svn_ra_reparent ./subversion/include/svn_ra.h
> svn_ra_reparent ./subversion/libsvn_ra/ra_loader.c
> svn_ra_serf__reparent ./subversion/libsvn_ra_serf/serf.c
> test_reparent ./subversion/bindings/swig/ruby/test/test_ra.rb
>
>
I ended up writing a routine that uses the reparent call as previously
discussed with a minor rework of the svn_client__update_internal to
accomodate this. Overall time to update: 3.09s rather than 53s
originally by reusing the session. Once I polish up the code, I'll post
a copy on my blog if anybody wants it.
This is well within acceptable ranges for performance in my mind.
@Les: tags/branches don't work in this case because an edit on this can
change the tag/branch and because the merge of local edits + local
version changes becomes cumbersome (if not impossible) on the svn switch
to the branch/tag. Perforce style tagging does work, svn does not since
it's a branch unfortunately. We did consider this option.
Thanks Daniel!
one last q though: is the vtable->reparent the equivalent of a
C++/Object Oriented Virtual Method? Where any given session (ssh,
svnserve, file, http) can override as necessary?
--Eric
Received on 2010-07-08 19:13:53 CEST