在Visual Studio中使用Subversion与使用Visual Source Safe相同 [英] Working with Subversion the same as with Visual Source Safe in Visual Studio

查看:111
本文介绍了在Visual Studio中使用Subversion与使用Visual Source Safe相同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在工作中,我刚开始将Subversion与AnkhSVN结合使用,而不是Visual Source Safe.我设法很好地集成了它,但是看起来并不一样. 使用VSS会发生以下情况:

At work I just started using Subversion with AnkhSVN instead of Visual Source Safe. I managed to integrate it well enough but it doesn't seem the same. Using VSS the following would happen:

用户通过右键单击并选择签出"或通过编辑来签出文件.如果另一个用户试图修改相同的文件,他将得到一个错误.没有2个用户可以同时编辑同一文件.没有花哨的合并.没有冲突,也没有解决冲突的方法.

A user check out a file by right clicking and selecting "check out" or by editing it. If another user tried to modify the same file he would get an error. No 2 users could edit the same file at the same time. No fancy merging. No conflicts and no conflict resolutions.

我了解Subversion背后的哲学是不同的,但是可以用Subversion复制上述行为吗?

I understand the the philosophy behind Subversion is different but is there any way that this behavior described above could be duplicated with Subversion?

AnkhSVN中有一个名为更改时自动锁定文件..."的选项,但是即使我在编辑文件时激活此选项,也永远不会自动锁定该选项. 即使此选项有效,其他用户也不会提交该文件,直到他们提交了文件.尝试像在Visual Source Safe中一样进行编辑时,不会出现错误.

There is an option in AnkhSVN called "Automatically lock files on change..." but even if I activate this option when I edit a file it never gets automatically locked. Even if this option worked the other users wouldn't see the lock until they commited the file. They wouldn't get an error when they tried to edit it like they would in Visual Source Safe.

所以基本上:可以使用Subversion和AnkhSVN复制Visual Source Safe的行为吗?

So basically: can Visual Source Safe's behavior be duplicated using Subversion and AnkhSVN?

推荐答案

对源代码安全使用Subversion的要点是您拥有排他锁,并且许多人可以在同一个文件上工作

The point of using subversion over source safe is that you don't have exclusive lock and many people can work on the same file.

如果您开始对文件使用排他锁来使用SVN,则会失去很多SVN的优势.

You are loosing quite a lot of the benefits of SVN if you start using it with exclusive locks on files.

这个想法是,您可以在代码合并期间解决冲突.

The idea is that you fix conflicts during merges of code.

请参见常见问题解答有关问题的讨论(Revision control locking: Is the jury still out?).

See this SO question and answers for a bit of a discussion on the issues (Revision control locking: Is the jury still out?).

这篇关于在Visual Studio中使用Subversion与使用Visual Source Safe相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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