Wednesday, September 27, 2006

Install SVN on Win XP

Subversion (SVN)

From Eugene Lazutkin's blog

It looks like Subversion is the most reasonable choice for source control:

* It is free open source project available on virtually all platforms.
* It was designed as replacement for aging CVS, which is the most dominant source control system for distributed open source projects.
* It is well supported. After CVS it is the most mature and stable source control system.
* It is possible to find hosts, which offer SVN hosting for free or commercially.
* It looks like a preferred choice for new projects.
* It is easy to host internally.

A must read is free electronic book available in HTML and PDF formats here: http://svnbook.org/. Links to documentation, examples, tools, and clients can be found here: http://subversion.tigris.org/project_links.html.

Subversion provides access to repository using either Apache (via http or https) or its own proprietary svn protocol. The latter method supports secure SSH variation: svn+ssh protocol. Apache integration includes WebDAV support and (optional and not recommended) FrontPage support.

While there are many Subversion clients around, two are the most popular choices for Windows platform:

* RapidSVN (developed by Subversion developers)
* TortoiseSVN

I tried both of them and TortoiseSVN feels better for me. The caveat is it is integrated with Windows Explorer => pollutes right-click menu. RapidSVN is stand-alone program.

Let's install Subversion with TortoiseSVN. Below are step by step instructions inspired by Miguel Jimenez's excellent post on this subject: http://blogs.clearscreen.com/migs/archive/2005/01/21/824.aspx. Our goal is to run Subversion as a Windows service. In this case it may be placed on remote server and be available to all group members.

1. Download the latest Subversion binary.
2. Download the latest TortoiseSVN client software.
3. Download the latest SrvAny utility (it's a part of free Resource Kit, e.g. Windows Server 2003 Resource Kit Tools). Alternatively you can use my version extracted from the latest Resource Kit.
4. Install Subversion (run .msi file).
5. Install TortoiseSVN (run the installer). It will require to reboot.
6. Create a folder for your repository (e.g., C:\Repository). Create svn subfolder in it to keep SVN data separate from Trac data later on (e.g., C:\Repository\svn). Create one more subfolder in svn to host actual database (e.g., C:\Repository\svn\repo). Actual names and actual layout are up to you.
7. Right-click on repo subfolder (see example above) and select TortoiseSVN/Create Repository here....
1. It will ask you for type of repository.
2. Select FSFS — everybody recommends this new type. Ignore BDB.
3. Now you can run svnserve (it is in bin directory of Subversion) to test your installation: svnserve -d -r C:\Repository\svn\repo. It uses TCP port 3690.
4. Try to connect to it using TortoiseSVN or RapidSVN and make sure it works. Use connection string like that: svn://yourserver/.
8. Install SrvAny by copying it to a folder of your choice.
9. Install new service for svnserve (I've included a .doc file with manual for SrvAny and InstSrv).
1. Run InstSrv with following arguments: InstSrv svnserve SrvAny.exe. You can use any name instead of svnserve here. Sometimes fully qualified name is required for SrvAny.exe.
2. Run regedit and navigate to this key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\svnserve.
3. Create subkey Parameters.
1. Add Application string value with exact fully qualified path to svnserve, e.g., C:\Program Files\Subversion\bin\svnserve.exe.
2. Add AppParameters string value with following data: -d -r C:\Repository\svn\repo. If you used different repository folder, change the value accordingly.
4. Run the service using the standard Windows Services panel.
10. If you don't want to keep your repository wide open, it is time to modify security settings.
1. In subdirectory C:\Repository\svn\repo\conf create passwd file with following information:
[users]
user1 = password1
user2 = password2
2. Obviously you should use real user names and real passwords.
3. In the same directory create (or modify) file svnserve.conf:
[general]
anon-access = none
auth-access = write
password-db = passwd
realm = Subversion Repository
4. You can specify different file name for password-db and select different realm name. Realm is used to inform user about purpose of authentication.
5. Now use any SVN client to test connection to your new Subversion service.

If you want to serve several repositories, you should create several services for that. Obviously you should specify different ports for different repositories.

14 comments:

Anonymous said...

Hi
Companies House Webcheck
Webcheck Companies House
Company House Webcheck
Companies House Webcheck Service

[url=http://perosnalbinking.v3host.be/companies-house-webcheck.html]webcheck companies house[/url]

Anonymous said...

[url=http://desethepl.freehostia.com/dieta-kremlevskaya/bistro-pohudet-na-5-6-kg.php]Быстро похудеть на 5-6 кг[/url]
- хочу похудеть как бабкина
[url=http://desethepl.freehostia.com/75/07-06-2010.php]Как похудеть анита цой[/url]
- основы диетического питания
[url=http://desethepl.freehostia.com/dieta-pitaniya/237.php]Диета при язве желудка и панкреатите[/url]
- диета для оздоровления кишечника
[url=http://desethepl.freehostia.com/01-2010/11.php]Диета история успеха[/url]
- лицо похудело

[url=http://dnevnik.bigmir.net/groups/article/56377]диета для очень быстрого похудения [/url]

[url=http://dnevnik.bigmir.net/groups/article/56374]самая быстрая диета для похудения [/url]

Anonymous said...

I would like to exchange links with your site www.blogger.com
Is this possible?

Anonymous said...

I would like to exchange links with your site netcodemister.blogspot.com
Is this possible?

Anonymous said...

Amiable dispatch and this post helped me alot in my college assignement. Gratefulness you seeking your information.

Anonymous said...

[url=http://www.pi7.ru/foto/1530-kureznye-foto-15-foto.html ]Как найти среди коллег полоумного? [/url]
Не понимаю высоких девушек,от 175 и выше,которые не носят каблуки,стесняются собственного роста,у меня 177 я обожаю каблуки и чем выше тем лучше,без каблуков ощущаю себя ущербной,девчонки,откуда у вас комплексы роста?высокая девушка на высоких каблуках-это ж так красиво!Разве я не права?

Anonymous said...

[url=http://www.pi7.ru/zhenskiy-zhurnal/1647-reyting-samyh-luchshih-seksualnyh-poz.html ]Крик души! Меня трясёт уже!!!! [/url]
Девочки, возвращалась из Америки, Делта задержала рейс более чем на сутки, обещали компенсацию. Попыталась выйти на вебсайт авиафирмы через Инет, ничего не нашла. Обращаюсь к помощи форума, какие есть идеи? Кто-нибудь сталкивался

Anonymous said...

Prijatno chitat’ na russkom jazyke interesnye i umnye mysli. Uzhe pjat’ let v Anglii zhivu.

Anonymous said...

Читаю и чувствую себя как дома. Спасибо создателям за хороший ресурс!

Anonymous said...

Мне кажется ништяк!

Anonymous said...

в Москве жара такая, а у Вас еще как-то хватает сил писать…

Anonymous said...

Да уж По моему мнению, об этом пишут уже на каждом заборе :)

Anonymous said...

Подойдя к второму обзацу необходимо будет побороть в себе желание его пропустить

Anonymous said...

wjru tfiyc miasporn qzrdbi b mm y lfh