SVN externals repo "is already locked" on update
Asked Answered
N

1

17

Basically I have to repo on the same server:

svn://repo/foo
-> checked out to d:\foo

svn://repo/bar
-> d:\foo has an svn:external property set to check this out into d:\foo\bar

When an "svn:update" or a new "svn:checkout" this is gist of the error:

Command - Update
Updated - D:\foo
External - D:\foo\bar
External failed - D:\foo\bar
Error - d:\foo\bar is already locked via d:\foo

After I "clean" or manually release the lock, the problem still persists.

Any insights would be greatly appreciated. Thanks!

Update:

Attila nailed it in the comment. I had "foo/bar" existing in the repository.

For future reference - when using SVN:External property, SVN will create the destination folder for the external reference.

Niemann answered 22/3, 2012 at 14:56 Comment(2)
Do you have an svn://repo/foo/bar folder in the repository? That could cause problems when you are trying to check out the external to the same directory (d:\foo\bar)Escapee
Actually Attila that is exactly what happened. I expected that the folder would have to exist. Turns out "svn:externals" property will create the destination folder if it doesn't exist. Thanks for the advice.Niemann
E
13

As resolved in the comments (just to have it in proper answer as well):

When using svn:externals, the directory where the externals repository is checked out should not exist in the original repository

Escapee answered 22/3, 2012 at 20:25 Comment(2)
Just to add another case where this comes up... I had a directory myLib within a repo. The repo had externals myLib/partA and myLib/partB. I wanted instead to have myLib external directly to the parent of partA and partB within my external library. Before I could do this I not only had to svn delete the myLib directory, but also commit that change otherwise myLib kept getting recreated even if I 'regular' deleted it.Bluet
This is confusing, can you elaborate on this and maybe provide a screenshot/directory structure to show an example? I'm getting this error and not sure which directory I should be removing...Mordant

© 2022 - 2024 — McMap. All rights reserved.