11

I'm trying to create to create a tag in svn repo for my project. I use Eclipse and Subversive plugin. Every time I try tagging, I get the following error:

Tag operation for some of selected resources failed. svn: Commit failed (details follow): svn: No write-lock in '/home/project/directory'

Where /home/directory is a directory in my project. I'm pretty sure that if I would delete the project and re-checkout it, then all will work.

Does anybody know what is the source of the problem and if there is a workaround to get it working without delete-checkout cycle?

Konstantin Burov
  • 68,980
  • 16
  • 115
  • 93

6 Answers6

5

Thanks for raising this issue! I just ran into this with Subversive 2.2.2 on Eclipse Indigo (3.7).

Cleaning up repository didn't work, but I noticed that the local copy has an old revision number (like 2, where the current is 37), although I am sure I committed before tagging.

So I ended up replacing the local code with the latest from repository, which updated the revision number. After that tagging worked like charm.

Nick G.
  • 557
  • 9
  • 18
4

You find that error popping up from time (2008) (to time (2009)) to time (2010).
Since there isn't any answer, that usually means the problem got away (like relaunching Eclipse was enough to pass that ordeal).
It could be a permission issue, or a resource (like a file or directory) blocked by a process.

But if it is more complicated, you still have the command-line alternative (a svn copy)


VJ. reports in the comments:

I eventually tried svn update which explained me that the write lock is present in another path of SVN.
So I issued a svn clean for the from the root tree. Which cleared the issue.
Post that, svn update worked as well as svn switch.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you, I ended up with using the svn copy through the SVN Repository perspective of subversive. – Konstantin Burov Aug 26 '10 at 08:55
  • I was facing this same issue. I eventually tried `svn update` which explained me that ther write lock is present in another path of SVN. So I issued a `svn clean` for the from the root tree. which cleared the issue. Post that `svn update` worked as well as `svn switch`. Hope that helps someone. – VJ. Jul 18 '13 at 05:47
  • @VJ. interesting. I have included your process in the answer for more visibility. – VonC Jul 18 '13 at 06:00
3

You need to delete the File called 'lock' in the .svn Directory, then svn should work again. regards.

Quick n Dirty
  • 569
  • 2
  • 7
  • 15
1

You need to Clean up your project.

Right Click > Team > Cleanup

Then you can Switch to any branch you want

Ale_
  • 85
  • 7
0

same issue here(just tried to create a branch instead of a tag in this case). check out the ultimate solution : 1) commit the code. 2) disconnect the project from SVN. 3) delete the project from the workspace. 4) check out the project. 5) try again.

voila! its a bit overkill, but this works 100%

Yaniv
  • 164
  • 1
  • 9
-1

For me the solution was a simple "svn up" at the top of the project directory.

unSinn
  • 301
  • 3
  • 8