SVN file locked by me, now cannot commit it

随声附和 提交于 2019-12-20 16:28:32

问题


Scenario: An binary file needs a svn lock to modify. To modify, the file was first locked, modified, and then while committing, cancelled the commit using the "Cancel" button. Due to some reason, deleted the whole folder containing the locked file (including the .svn folder).

Problem: I used "SVN update" through tortoise svn. All the files were updated. But the file which was locked previously does not indicate as locked with the lock symbol. Nevertheless, I modified the file and tried to commit.

Error while committing:

 Server sent unexpected return value (423 Locked) in response to PUT request for '/****/!svn/wrk/9f89b6b6-7932-9f45-82e8-fafbd5426290/trunk/***'

While I try to acquire the lock again using "SVN Get Lock" it fails showing:

Error when trying to acquire the lock:

.`...is already locked by user 'kr***' in filesystem '/data/svn/dir/***/repos/***/db'`

What I feel, is that the lock information on the client side is missing but still present on the server side.

Please suggest a way out.

Version info: TortoiseSVN 1.6.8, Build 19260 - 32 Bit , 2010/04/16 20:20:11

NOTE: Few paths and logins are masked using *


回答1:


According to Simon Large (co-author of TortoiseSVN):

Use the repo browser and 'break lock' from the context menu.

Screenshot:

Note that this item will only appear if the item is, in fact, locked. There's also a 'Release lock...' command outside of the repo browser, shown here:




回答2:


A Clean up on the working copy root fixed the issue for me. I, too, had done a Cancel while doing a SVN Commit.




回答3:


In the terminal,

svn cleanup 

will break the locks.




回答4:


Sometimes back I was using the SVN, You can take a fresh checkout and then merge your changes on that file. Once you merge it you can commit the file to SVN.



来源:https://stackoverflow.com/questions/8470730/svn-file-locked-by-me-now-cannot-commit-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!