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

Re: [PATCH] Speed up svn:externals updates by using an internal "svn switch" rather than a straight delete.

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-01-04 23:09:02 CET

Ross Mark <rossm@controllingedge.com.au> writes:

> Philip Martin wrote:
>
>>What's the reason for calling svn_client_cleanup? Given that cleanup
>>will steal WC locks it's probably not the right thing to do.
>>
> The problem is, if the new url for the externals entry points to a
> different repository the attempted switch obtains the locks then bails
> out leaving the locks once it realise that the repositories are
> different. This is the one part of the process that I didn't like and
> am happy to take any suggestions.

I see, that happens because a failed switch doesn't explicitly close
the access baton leaving pool cleanup to remove unnecessary locks.
How about something like:

    /* Note: using a subpool to cleanup WC locks if the switch fails */
    apr_pool_t *subpool = svn_pool_create (pool)
    err = svn_client_switch (... subpool);
    svn_pool_destroy (subpool);
    if (err)
      {
          // No call to svn_client_cleanup required
      }

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 4 23:10:19 2005

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.