之前一直一个人用svn,后来团队扩编,同事使用svn下载项目后。我却无法提交了,出现以下错误:
locked in another working copy
No lock on path
(Status 423 on PUT Request)
Server sent unexpected return value (423 Locked) in response to PUT request for
可以明确的一点是,同事只是down了文件。对于此,先是走了常见的clean up方法。但是结果依然很挫。提交还是如此错误。
既然被锁住了,那我就去获取锁吧。笔者的svn右键菜单是没有什么break lock的。只有ReleaseLock,Get Lock.此刻只有Get Lock。那就去获取一下,结果依然是失败。
Path '/Game/Assets/NGUIData/AllUIS1.png' is already locked
by user 'xxx' in filesystem 'E:/code/game3d/db'
这下蛋碎了。看来只能CMD。
CMD管理员进入项目根目录,根目录下有.svn文件夹。
我们要用的svn命令就是:svn lock.
D:heJiangGame>svn help lock
lock: Lock working copy paths or URLs in the repository, so that
no other user can commit changes to them.
usage: lock TARGET...
Use --force to steal the lock from another user or working copy.
使用force 强制获取锁定哦。
先试一下lock
D:heJiangGame>svn lock "D:GameAssetsScenesTestScene.unity"
svn: warning: W160035: Path '/Game/Assets/Scenes/TestScene.unity' is already locked by user 'xxxx' in filesystem 'E:/code/game3d/db'
看来给svn好好说不行啊
那就来电强力的。force!
D:heJiangGame>svn lock --force "D:GameAssetsScenesTestScene.unity"
'TestScene.unity' locked by user '笔者svn name'.
再回到工作目录commit.成功了。
麻烦KO,还有个unlock的命令。具体参见命令:svn help