[实践OK]linux svn工作空间锁定无法更新的解决方法(Working copy ‘.’ locked)

jackxiang 2015-7-14 09:51 | |
linux svn工作空间锁定无法更新的解决方法(Working copy ‘.’ locked)
背景:有人在linux上直接修改文件(可能是debug),但没有提交成功。产生这种情况大多是因为上次svn更新命令执行失败且被自动锁定了。
于是会出现如下情况:
[root@localhost justwinit_devel]# /usr/bin/svn  update --username xiangdong --password xiangdong
svn: Working copy '.' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
怎么办?

两步解决:
步骤1:
写个脚本批量清,cleanuplocked.sh:
#!/bin/sh
for lk in `find /data/htdocs/justwinit_devel -name "lock"`
do
`rm $lk`
done
exit


步骤二:运行命令svn cleanup:
[root@localhost justwinit_devel]# svn cleanup
[root@localhost justwinit_devel]# /usr/bin/svn  update --username xiangdong --password xiangdong

-----------------------------------------------------------------------
ATTENTION!  Your password for authentication realm:

   <http://svn.jackxiang.com:80> Authorization Realm

can only be stored to disk unencrypted!  You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible.  See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/root/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
At revision 2736.


参考:http://www.xuebuyuan.com/1112787.html

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/8174/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!

评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]