哪些版本控制系统一次只允许一个用户处理一个文件?
我希望这样当我签出一个文件时,在我重新签入之前没有其他人可以编辑它。是否有版本控制系统允许我执行此操作?我目前使用 Subversion,我知道它具有“锁定”功能,但我希望它能够自动执行此操作,而不必在我正在处理的每个文件上请求它。
I'd like it so when I check out a file no one else can edit it until I check it back in. Is there a version control system that allows me to do this? I currently use Subversion and I know it has the 'lock' feature but I want it to do that automatically without me having to request it on each file I'm working on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
有很多。
Source Safe 因无法以任何其他方式工作而臭名昭著。
Serena Dimensions 可以这样配置。
TFS 将允许您进行独家结账。
大多数源代码控制系统都允许您执行此操作,有些系统是以这种方式构建的,其他系统则具有所需的功能。
然而,如果你在一个团队中工作,这样做只会损害进步。能够让许多人同时处理同一个文件不仅可以节省时间,而且可以更有效地利用资源并加快工作速度。您应该只在特殊情况下使用独占锁,在这种情况下您确实不能让其他人处理该文件。
There are lots of them.
Source Safe is notorious for not working any other way.
Serena Dimensions can be configured that way.
TFS will allow you to do an exclusive checkout.
Most source control systems will allow you to do this, some are built that way, other have the functionality in case it is needed.
However, if you are working in a team, doing this will only hurt progress. Being able to have many people work on the same file at one time is not only a time saver but is more efficient use of resources and speeds work along. You should only use exclusive lock in special circumstances, where you really can't have anyone else work on the file.
CVS
Clearcase
典型的现代 VCS 似乎不赞成开发的锁定模型,而
更喜欢合并模型。
编辑:在我看来,SVN 合并已经被破坏了。一旦您使用过 ClearCase/Mercurial/git 合并...您就会学得很快。 :)
CVS
Clearcase
--
Typically modern VCSs seem to deprecate the lock model of development, preferring a merge model.
edit: SVN merging is - in my opinion - broken. Once you've used ClearCase/Mercurial/git merging... you'll learn that fast. :)
我认为旧的 IBM“CMVC”工具就是这样工作的。然而,想到这一点让我感到不舒服和隐约悲伤。
The old IBM "CMVC" tool works that way, I think. It makes me feel uncomfortable and vaguely sad to think about that however.
Peforce 做了一些接近的事情。
Peforce does something close.
微软 SourceSafe(恶心)。
Microsoft SourceSafe (yuck).
RCS 使用锁作为管理编辑的主要方法。您签出该文件,如果您打算编辑它,则将其锁定。您可以强制覆盖其他人的锁,但如果这样做,您就会破坏他们的更改。例如,请参阅此最佳实践讨论了解更多信息信息。
RCS uses locks as the main approach to managing edits. You check out the file, and if you intend to edit it, you lock it. You can force an override on someone else's lock, but if you do, you clobber their changes. See for example this best-practices discussion for more info.
你可以在颠覆中做到这一点。我建议您不要这样做,而是学习如何合并。以下是更多信息:
http://svnbook.red-bean。 com/en/1.2/svn.advanced.locking.html
You can do it in subversion. I'd recommend that you dont and instead learn how to merge. Here's some more information:
http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html