SVN中的单用户结帐 [英] Single user checkout in SVN

查看:34
本文介绍了SVN中的单用户结帐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做以下事情:

当一个用户正在编辑一个文件时SVN,没有其他用户可以编辑此文件直到第一个用户提交他的变化.也就是说会有一些svn 中文件的一种写锁.

When one user is editing a file from SVN, no other user can edit this file until the first user commits his changes. That is there would be some kind of writelock on files in svn.

这在 SVN 中可行吗?怎么做?是否可以为单个文件或目录(而不是整个存储库)设置此项?

Is this possible in SVN? How to do it? Is it possible to set this for a single file or directory (not for the whole repository)?

为什么这会有用?二进制文件和其他一些文件的冲突不容易解决.我想以上述方式将 svn 中的 excel 文件设置为写锁定.

Why would this be useful? Conflicts on binary and some other files cannot be easily resolved. I would like to set my excel files in svn to be write locked in the way described above.

我欢迎指导如何在我使用的 VisualSVN 或 TortoiseSVN 中执行此操作.

I would welcome guide on how to do this in VisualSVN or TortoiseSVN which I use.

推荐答案

您可以在此类文件上设置属性 svn:needs-lock,然后该文件将被检出只读".如果你想编辑它,你必须用 svn lock 锁定文件.该工作流程正是针对这种情况.

You can set the property svn:needs-lock on such files, then the file gets checked out "read only". If you want to edit it, you have to lock the file with svn lock. That workflow is there for exactly this case.

请参阅此处http://svnbook.red-bean.com/en/1.5/svn.ref.properties.html 有关 svn:needs-lock 的信息.

See here http://svnbook.red-bean.com/en/1.5/svn.ref.properties.html for info on svn:needs-lock.

这篇关于SVN中的单用户结帐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆