views:

29

answers:

2

Hello all

I am having a problem with version control in subversion. I checked out a working copy from respository and got locks on all of its files. Then, without releasing the locks I have deleted the folder from disk.

  • I can't delete the folder from repository, since its got a lock
  • If the I and try to release the locks recursively, it says there are no locks to be released.
  • In Browse Repository view, I can only break the locks on particular, not folders recursively.

How can I break the locks residing in repository. I am using TortoiseSVN on Windows. Is there a command to break locks recursively for a folder?

Regards

A: 

Ok I got it.

  • What I did was I checked out a working copy.
  • Then went in explorer menu, TortoiseSVN -> Check for modifications...
  • Clicked on Check repository button
  • Select All the files, right click and select the break lock option.
  • Delete the working copy and the one in repository. Voila! :)

Regards

ShiVik
+1  A: 

From the advance locking section

$ svn status -u
M              23   bar.c
M    O         32   raisin.jpg
       *       72   foo.h
Status against revision:     105
$ svn unlock raisin.jpg
svn: 'raisin.jpg' is not locked in this working copy

That simply means the file is not locked in your current working directory , but if it is still locked at the repository level, you can force the unlock ("breaking the lock")

$ svn unlock http://svn.example.com/repos/project/raisin.jpg
svn: Unlock request failed: 403 Forbidden (http://svn.example.com)
$ svn unlock --force http://svn.example.com/repos/project/raisin.jpg
'raisin.jpg' unlocked.

(which is what you did through the TortoiseSVN GUI)

VonC
I also did what you told in the repository, but if I had to do it one file each, it would have taken me ages. Since my limited knowledge with cli didn't allow me to find a recursive command, that is why it took me a little more time. :)
ShiVik
@ShiVik: true there is no recursive option, but you can find some way to script it: http://old.nabble.com/recursive-find-locks-unlock-in-repository-td25010776.html `svnadmin lslocks <path_to_repo> |grep -B2 Owner |grep Path |sed "s/Path: \///" | xargs svn unlock --force` for example. But the TortoiseSVN GUI is a good solution too.
VonC