如何在Visual Studio 2010中快速切换源代码管理提供程序? [英] How to quickly switch source control providers in Visual Studio 2010?

查看:369
本文介绍了如何在Visual Studio 2010中快速切换源代码管理提供程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在研究使用Git或Mercurial(Hg)源控件的.Net项目。我为所有这些项目使用Visual Studio 2010。因为我经常需要切换源代码管理提供程序,所以我想知道是否有快速的方法来执行此操作,所以我不必每小时一次去Tools - > Options - > Source Control。

I'm currently working on .Net projects that are using either Git or Mercurial (Hg) source controls. I use Visual Studio 2010 for all of these projects. As I often have to switch source control providers I was wondering if there's a quick way to do this, so I don't have to go Tools -> Options -> Source Control once an hour.

如果Visual Studio能够识别出它需要的源代码控制提供者,或者记得某个项目使用了哪个提供者,那么更好的解决方案是。可以这样做吗?

A much better solution would be if Visual Studio would recognize which source control provider it needs or maybe remember which provider was used for a certain project. Can that be done?

推荐答案

随着在正确的方向微调,我设法处理这个问题甚至更好,然后预期 - 没有切换必需。

With a nudge in the right direction I managed to handle this problem even better then expected - no switching necessary.

对于Mercurial解决方案,我使用 VisualHG 和for Git我使用 Git Source Control Provider 。我还安装了 HgSccPackage 。现在我不知道它是如何工作的,但是我在设置中选择了GitSCC作为源代码控制提供程序,但是当我加载VisualHG接管的Mercurial项目时。我所要做的就是在我第一次打开项目时将SCC设置为VisualHG,关闭项目,更换回GitSCC,并在项目重新加载时使用VisualHG。

For Mercurial solutions I use VisualHG and for Git I use Git Source Control Provider. I also installed HgSccPackage. Now I don't really know how or why this works, but I've got GitSCC selected as the Source Control Provider in the settings, but when I load a Mercurial project VisualHG takes over. All I have to do is set the SCC to VisualHG the first time I open the project, close the project, change back to GitSCC and when the project is reloaded VisualHG will be used for it.

有趣的是,如果没有安装HgSccPackage,它将无法正常工作。如果有人可以解释这一点,请做。

Interestingly it does not work without HgSccPackage installed. If someone can explain this, please do.

请注意,它似乎不能相反。

Note that it does not seem to work the other way round.

这篇关于如何在Visual Studio 2010中快速切换源代码管理提供程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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