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

Re: Issue report: subversion 1.7.2 windows command line client cannot copy URL -> WC if URL contains externals

From: Paul Burba <ptburba_at_gmail.com>
Date: Wed, 22 Feb 2012 12:36:11 -0500

On Wed, Feb 22, 2012 at 12:05 PM, Philip Martin
<philip.martin_at_wandisco.com> wrote:
> Paul Burba <ptburba_at_gmail.com> writes:
>
>> Index: subversion/libsvn_client/copy.c
>> ===================================================================
>> --- subversion/libsvn_client/copy.c   (revision 1292379)
>> +++ subversion/libsvn_client/copy.c   (working copy)
>> @@ -1519,6 +1519,17 @@
>>          ctx->notify_baton2 = old_notify_baton2;
>>
>>          SVN_ERR(err);
>> +
>> +#ifdef WIN32
>> +        if (!ignore_externals)
>> +          {
>> +            /* Issue #4123: We may still hold file handles to the databases
>> +               for externals under TMP_ABSPATH.  We need to release these
>> +               handles before we move TMP_ABSPATH below or Windows will
>> +               raise an ERROR_ACCESS_DENIED error. */
>> +            SVN_ERR(svn_wc__externals_close(tmp_abspath, ctx->wc_ctx, pool));
>> +          }
>> +#endif
>
> I'm not sure why this would be windows specific.  Yes, Linux lets us
> move the dir with the handle open but I think it would be an error for
> the Subversion client to use the handle after the move.

Hi Philip,

OK, both you and Bert pointed this out, so it's gone.

> Is this the best way to do it?  It isn't what I was expecting.  I was
> expecting the checkout code to explicitly close the handles it was
> responsible for opening.  Then the copy code would not have to do
> anything special.

Are you thinking within svn_client__checkout_internal or from its
caller, like the attached patch?

Paul

Received on 2012-02-22 18:36:43 CET

This is an archived mail posted to the Subversion Dev mailing list.