After a short trial of using TFS, I was disappointed in him, because he consumes so many resources, and for me alone, there is little exhaust from him. After a brief inspection of other options for replacing the version control system, I stopped at
Mercurial . For:
1. Works without problems on Windows and NIX;
2. Stable;
3. A decent list of features;
4. Many utilities for integration with a variety of IDE and shells;
5. Uses a minimum of resources;
6. Many plugins.
Having a little rummaged in Google, I found a plug-in for Visual Studio 2010 -
VisualHG , judging by the description, is pretty decent. It remains for him to get access to Mercurial's repositories on another server under Windows 2008. Since VisualHG works only in conjunction with TortoiseHG, I had to create a separate web interface to the repositories, the benefit of IIS is already on the server.
To begin with, we will create a separate directory in the IIS site tree, although in principle a separate website is also possible.
For clarity, let it be:
localhost / hg / , and the physical path will correspond to
V: \ hg \ .
Together with the Mercurial distribution kit,
Python 'e scripts are distributed to create a repository web page. They are located in the library.zip archive in the distribution directory, if it was finitely indicated to extract them during installation. This very archive is unpacked into some child directory from localhost / hg /, for example
localhost / hg / lib / , as a physical path it will be -
V: \ hg \ lib \ .
To run scripts under IIS from additional software, you will only need Python 2.6 x86. If you use the distribution kit with amd64 binaries, then the scripts simply will not work. What is the reason, I did not understand.
Connection of Python'a occurs through the IIS panel in the settings of "Mapping Handlers". There you need to add a "script mapping" with the following parameters:
Request Path: * .cgi
Executable file: C: \ Python26_x86 \ python.exe -u "% s% s"
Name: Python
The name and path to the Python distribution can naturally be different.
To check the performance, you can create a file
V: \ hg \ test.cgi with the contents:
print 'Status: 200 OK'
print 'Content-type: text / html'
print ''
print '<html> <head> <title> Test Page </ title> </ head>'
print '<body>'
print '<h1> Test page! </ h1>'
print '</ body> </ html>
If everything is displayed normally, then you can proceed further.
After this, you need to add the
hgwebdir.cgi file to the
hg folder to run python scripts.
After editing it, the changes look like this:


Also in this directory you need to add the hgweb.config file with the following contents:
[paths]
/ = repos / *
[web]
baseurl = / hg
push_ssl = false
allow_push = *
Where repos is the repository directory, the full path to which is
v: \ hg \ repos .
For more convenient and visual use, you can still attach URL Rewrite. It allows you to remove hgwebdir.cgi from the address
bar . To do this, you need to create a rule with similar parameters:
Requested URL: Matches and Pattern
Using: Wildcards
Pattern: *
Action type: Rewrite
Rewrite URL: hgwebdir.cgi / {R: 1}
All other parameters by default.
To create a repository as a test, you can use the console command:
hg.exe init v: \ hg \ repos \ test .
View repository list:

Now to use the repository, as a minimum requirement, there will only be TortoiseHG on an arbitrary computer. To use Mercurial's repositories from MS VS 2010, simply install the VisualHG plugin, create a repository in the project directory and open this project in the studio. Now it will be possible to manage the commits from there, and from TortoiseHG upload them to the server.
Used software:
Mercurial 1.5.4
TortoiseHG 1.0.4
Python 2.6.4 x86
IIS 7.5
MS VS 2010