lock failed,is already lockedd求助

android 异常(26)
&&一、问题描述
& & & & 今天在 Eclipse 中用 SVN 插件提交代码时遇到&org.apache.subversion.javahl.ClientException: Attempted to lock an already-locked dir&的问题,&SVN 客户端异常:试图锁定一个已经锁定的目录&,嘛意思啊!报错如下图:
& & & & 详情为:
& & & &&org.apache.subversion.javahl.ClientException: Attempted to lock an already-locked dir
& & & & svn: Commit failed (details follow):
& & & & svn: Working copy 'E:\x\xx\src\com\xxx\ui' locked.
& & & & svn: 'E:\x\xx\src\com\xxx\ui' is already locked.
& & & & 这是什么错误呢?根据提示能够想到,我要提交代码的时候,SVN 所做的工作中有一个操作步骤是&锁定&,所以才会有&Attempted to lock &这一步,至于&an already-locked dir&,我忽然想到,昨晚下班我尝试过一次提交代码,但是由于忘记切换网络而作罢(我们 SVN 部署在内网上,而平时可以联外网)。而 SVN 正好在这里有个问题——如果你的环境没有联上有效的 SVN 仓库,那么在提交的时候就会卡在这里,会有一个 Progress 一直在跑但又跑不完,我就是在这种情况下使用资源管理器强制关闭进程,所以今天再提交的时候会&the
dir you Attempted to lock has been already-locked&。所以我也可以肯定,SVN 提交代码第一步就是 lock 你要提交代码所在的 dir,(我的经历证明,没有有效的资源库联接,这之后都不能工作)然后才检查资源库代码版本...提交...。
& & & &&二、问题处理
& & & & 找到原因就好办了。
& & & & 一个小插曲(但是对理解很重要):按说按照提示&尝试锁定一个已经被锁定的目录&,就像&你去把门锁上,其实门就是锁上的&,这一命令就没法执行了。应该只要 &release lock&就可以再次进行锁定了。然而并非如此,原因就是:此 lock 非彼 lock !你在右键 SVN 菜单中能找到所有 & [ * ] lock& 命令都是对 SVN 仓库所做的操作,不信你试试,都会让你填操作说明的,说明这是对仓库源有改变(这里的lock是指在代码库中标记为锁定状态,不允许更改);我们这里的锁定只是在一次代码提交阶段暂时性&举起手来,不许动&,等提交操作完成了就取消锁了,是为了保证在提交过程中不被更改(提交代码需要网络通信,如果网络质量不好就比较耗时,你可能在此过程中对正在提交的代码更改),所以我只要
cleanup 上次的锁定就可以了。
& & & & 这里提供3中方法:
& & & & (一)Eclipse SVN 插件处理
& & & &&使用 SVN 插件时,选中能包含所有待提交代码的最小的包(当然你可以直接选择工程也无可厚非,我只是为了最小影响范围原则而已),右键选择 Team & Refresh/Cleanup ,再进行提交操作(前提是具备有效的SVN仓库联接)就可以了。
& & & & (二)SVN 客户端处理
& & & & (1)如果你安装了SVN客户端(就那个小乌龟),*并不是说要通过客户端操作,只是安装了客户端,右键才有 SVN 子菜单* 打开 workspace 中对应的文件夹,右键 TortoiseSVN & clean up... ,妥了。
& & & & (2)如果你身具极客风度,也可以使用 svn 命令:svn cleanup ...(操作目标目录路径)
& & & & (三)删除lock文件
& & & &&还有网上看到一种方法说是,直接进入到上面的文件夹下的.svn目录,删除lock文件就可以了。(这个方法我没试过,其实是因为笨得根本就没找见 lock 文件)哪位大大用过这种方式,麻烦不吝赐教,程序猿在此谢过!
转载:http://blog.csdn.net/a_running_wolf/article/details/
Android学习交流群:
(如果您觉得有用,欢迎加入,一起学习进步)
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:6406次
排名:千里之外
原创:39篇
转载:134篇
(33)(108)(34)1230人阅读
eclipse 在提交的过程中死掉了,重新启动就出现了这个错误
Attempted to lock an already-locked dir
svn: Working copy 'D:\....\doc' locked
在网上查了一下需要清理
doc --tearm--清理不可执行
doc上级目录 --tearm--清理
&报错如下 :
org.tigris.subversion.javahl.ClientException: Problem running log
svn: In directory 'D:\...........\doc'
svn: Error processing command 'committed' in 'D:\...........\doc'
Attempted to lock an already-locked dir
svn: Working copy 'D:\...........\doc' locked
删除 .svn下的lock文件报错如下
org.tigris.subversion.javahl.ClientException: Item already exists in filesystem
svn: Commit failed (details follow):
svn: While preparing 'D:\..................' for commit
svn: 文件已经存在: 文件系统“D:\svn\repository\db”,事务“69-28”,路径“...../doc”
最终无解,郁闷~~~
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:26254次
排名:千里之外
原创:22篇
转载:14篇
(1)(3)(1)(3)(1)(1)(2)(1)(1)(8)(5)(2)(2)(2)(3)lock failed,already locked求助_百度知道
lock failed,already locked求助
我有更好的答案
结果重复上锁而出现的提示,或不知道已上锁,但因不确定、锁定,已经锁住”,通常出现在实际已锁好。
  这种情况:“锁定失败  意思是
其他类似问题
为您推荐:
lock的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁svn - Commit failed: already locked - Stack Overflow
to customize your list.
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
J it only takes a minute:
Join the Stack Overflow community to:
Ask programming questions
Answer and help your peers
Get recognized for your expertise
I just tried to add & commit about 25,000 files to VisualSVN using TortoiseSVN.
The commit dialog locked up (to be expected I guess), but after a while of the thread being blocked, I killed Tortoise, hoping to commit smaller chunks of files at a time.
Now I get this error:
Error: Commit failed (details follow):
Working copy 'C:\INTERNAL\Icons\Oxygen 4.10.1' locked.
'C:\INTERNAL\Icons\Oxygen 4.10.1\scalable\places\PaxHeaders.14455' is already locked
I've killed TortoiseProc.exe and restarted VisualSVN a couple of times, but I'm still getting the error.
I've also right-clicked the folder and chose Release lock, but I get:
There's nothing to unlock. No file has a lock in this working copy.
When I run svn st, I get a huge long output of all the files waiting to be added.
Even when I try to commit something unrelated (a couple of dirs up), I get the same error.
I am able to commit successfully to a separate repo on the same server.
How can I release the lock and commit these files?
9,593145090
Try doing a SVN Cleanup. I had the same issue and after doing that the locks cleared up.
Specifically from :
If a Subversion command cannot complete successfully, perhaps due to
server problems, your working copy can be left in an inconsistent
state. In that case you need to use TortoiseSVN → Cleanup on the
folder. It is a good idea to do this at the top level of the working
In the cleanup dialog, there are also other useful options to get the
working copy into a clean state.
Clean up working copy status As stated above, this option tries to get
an inconsistent working copy into a workable and usable state. This
doesn't affect any data you have but only the internal states of the
working copy database. This is the actual Cleanup command you know
from older TortoiseSVN clients or other SVN clients.
Here is a screenshot of the recommended SVN Cleanup options:
2,59721936
Just a small addition to Jordan's answer, I had the same issue but cleanup on the offending folder was failing due to the lock. To fix it I had to do an SVN cleanup on the parent directory, then on the offending directory.
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled

我要回帖

更多关于 lockrect failed 的文章

 

随机推荐