Move Quickly Between Source Control Providers #58
Chapter 6, Speed Hacks
|
225
HACK
HACK
#58
Move Quickly Between Source Control
Providers Hack #58
Using multiple version control systems is normally a tedious operation. Here’s
a free utility that makes it a snap.
Visual Studio provides a model for source control vendors to write source
control providers that plug into Visual Studio. A third-party source control,
or even Microsoft’s GotDotNet Workspaces source control, can work just
like using SourceSafe from Visual Studio. This is a great thing when you
switch between various source control providers, since the functionality and
UI are consistent across all tools when used through Visual Studio.
One problem though: it is not the easiest thing to switch between source
control providers. There is no quick switch in the IDE to choose what
source control provider you want to use, but thankfully Harry Pierson (bet-
ter known as DevHawk) has written an easy-to-use utility called SccSwitch
that will allow you to do just that.
To use this utility, you first need to download the tool from http://devhawk.
NET/art_sccswitch.aspx. The source and executable are both included in the
zip file. After extracting the executable and running it, you will see a screen
like the one shown in Figure 6-21.
To switch source control providers, simply check the box of the provider
you want to use and then click the Update button. This will switch what
provider you use, and the next time you start Visual Studio you should
notice the change.
If you would rather not download a utility, you can also make these changes
right in the registry. The key you will need to modify is
HKEY_LOCAL_MACHINE\
SOFTWARE\SourceCodeControlProvider
. The value of this key is a string that
identifies what source control provider is the active provider. The possible
values for this key are stored in a subkey called
InstalledSCCProviders. Any
Figure 6-21. SccSwitch
226
|
Chapter 6, Speed Hacks
#58 Move Quickly Between Source Control Providers
HACK
of the data values from this key can be substituted for the current provider
in the
SourceCodeControlProvider key. Making these changes in the registry
is easy, but using the utility is even easier.
As a consultant, I find this tool especially valuable, since going from project
to project you never know what source control you will be using. (Plenty of
times I use multiple source code providers on the same day.) This tool is
especially helpful if you get involved with projects on GotDotNet.

Get Visual Studio Hacks now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.