[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: Thu, 23 Feb 2012 10:23:04 -0500

On Wed, Feb 22, 2012 at 12:36 PM, Paul Burba <ptburba_at_gmail.com> wrote:
> 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?

Doh, of course the attached patch *is* within on of
svn_client__checkout_internal's helpers; that's what I get for a quick
patch. This fixes the issue and passes all tests; committed it in
r1292827.

Paul
Received on 2012-02-23 16:23:38 CET

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.