Lachlan O'Dea wrote:
> I'm having some difficulty when using svn switch on directories with
> an svn:externals property. Client is 1.0.4, server 1.0.1. Is there a
> preferred method of doing this?
> I want to switch to another directory that has different
> svn:externals. This does change the property, but it does not seem to
> correctly switch the directories that were already checked out via the
> previous externals.
> I can switch each external directory individually, but this tends to
> cause problems when trying to do things like svn update from the top,
> since the externals property is out of sync with what's checked out.
> Messages like "svn: Working copy 'blah' not locked". It can also be
> somewhat laborious to switch each one.
Version 1.1 includes a patch (r10005 and r10006) which fixed this. It
was a client issue in that when it tried to delete your wc, in order to
checkout the new svn:externals entry, it did a non recursive lock and
then complained that the sub directories weren't locked.
With 1.1 the changes in svn:externals should be detected and your
working copy updated correctly. I haven't check the 1.1 version but my
guess is that it will have the same behavior as the 1.0 in which it does
the update by deleting all the files in the sub dir and checking them
out again. This is only if the url in the svn:external doesn't match the
working copy. Its a real sledgehammer approach that will work (unless
you have local mods you need merged). Locally we used a patched version
of the 1.0 which internally does an 'svn switch' and if that fails it
reverts to the delete and checkout. In our cases this is almost always
the correct thing to do as the most common change to the svn:externals
entries is to change the tag a wc points to. Deleting a 16M wc and
checking it out again just because it references a new tag was a bit
I have been hesitant to submit the patch to the dev list as I'm not sure
the logic would be approved of as it goes along the following lines.
If (wc->url != external->url)
if (svn switch external->url fails)
svn cleanup wc
Do existing delete and clean checkout.
The logic is a bit more complicated than that but not much. What I'm
concerned about is the call to svn cleanup which is required because svn
switch would leave the wc locked if it failed.
I was going to wait until 1.1 was fully released before trying to submit
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Thu Jul 22 03:31:06 2004