如何配置 Visual Studio 以使用不同的源代码控制提供程序

如何配置 Visual Studio 以使用不同的源代码控制提供程序

问题描述:

我参与了许多项目,每个项目都有自己的源代码控制提供程序.有没有办法将 Visual Studio 2010 配置为在每个项目的基础上自动选择正确的源代码管理?还是每个用户级别的工具 - 选项 - 源代码管理插件?

I'm involved in many projects and each project has their own source control provider. Is there a way to configure Visual Studio 2010 to automatically select the right source control on a per project basis? Or is the Tools - Options - Source Control plug in per user level?

让我澄清一下发生了什么.我有一个使用 Vault 的项目.当我打开它时,VS 将源代码管理设置为 Vault.然后我关闭项目(解决方案)并打开另一个使用 Mercurial (VisualHG) 的解决方案,我检查了源代码管理插件并且仍然选择了 Vault.为什么?是否可以自动选择正确的源代码管理?

Let me clarify what is happening. I have a project using Vault. When I open it VS sets the Source Control to Vault. I then close the project (solution) and open another solution that uses Mercurial (VisualHG) I check the Source Control plugin and Vault is still selected. Why? Is it possible to automatically select the right source control?

为了自动加载正确的源代码控制提供程序,解决方案文件必须包含 Scc 绑定.

In order to automatically load a proper source control provider the solution file must contain Scc bindings.

我不知道 VisualHG 是否支持它们.

I don't know if VisualHG supports them or not.

但是您可以尝试 HgSccPackage - 另一个支持 Scc 绑定的 MS Visual Studio 2008/2010 mercurial 插件.

But you can try HgSccPackage - another mercurial plugin for MS Visual Studio 2008/2010 which supports Scc bindings.

您可以在此处获取:http://www.newsupaplex.pp.ru/hgscc_news_eng.html

如果要将 Scc 绑定添加到现有的受控解决方案,请使用 Mercurial -> IDE 中的更改 SCC 绑定菜单.(当 HgSccPackage 处于活动状态并且您已加载受控解决方案时,此菜单将可用).

If you want to add Scc bindings to an existing controlled solution, use Mercurial -> Change SCC bindings menu from the IDE. (This menu will be available when the HgSccPackage is active and you have loaded a controlled solution).

对于新项目,HgSccPackage 会自动添加 Scc 绑定.不过,对于不喜欢这种行为的人来说,它可以通过选项进行配置.

For new projects HgSccPackage automatically adds Scc bindings. It is configurable via options though, for thouse who don't like this behavior.