10/15/05
Installing and using Subversion on Windows with Eclipse -
Categories: Eclipse Platform, CVS, Subversion, Eclipse plug-ins, Tutorials -
admin
@ 08:26:47 am
![]() |
I want to move from CVS to Subversion. Both are version control systems, but Subversion is a better CVS as explained in this article. For us, the main reason to switch from CVS to Subversion is that files and directories can be renamed or moved and directories are versionned as files. So the first questions are: how to install Subversion on Windows? What about the Subversion integration with Eclipse. This blog note will try to answer these questions. In a next note, I will deal with CVS to Subversion repository conversion using cvs2svn tool. |
Installation of Subversion on Windows
First, I want to install Subversion on Windows (don't blame me :-). Here is a quick manual of use of Subversion installation on Windows:
- Download svn-1.2.3-setup.exe, the setup of Subversion for Windows from this link. Launch the installation and follow instructions.
- For Windows, you also need a SVN Service Wrapper for Windows. You can download it here. Put the SVNService.exe binary in the c:\Program Files\Subversion\bin diretory. Then type "SVNService.exe -install -d -r c:\svnrepo". Go in the Windows services to start the service and to change it to automatic startup instead of manual startup.
- Subversion
needscan be used with Apache 2.0. You should download and install it. As I had an EasyPHP with an Apache 1.3 for test purpose that was listening on port 80, I changed this port to port 81. My Apache 2.0 will listen to port 80. - Copy the mod_dav_svn.so and mod_authz_svn.so from C:\Program Files\Subversion\bin to C:\Program Files\Apache Group\Apache2\modules.
Add the following lines in httpd.conf (note that this is only basic authentication. You should use HTTPS):
# For Subversion modules
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
# For Subversion repository
<Location /repos>
DAV svn
SVNPath "C:\svnrepo"
AuthType Basic
AuthName "Subversion repository"
AuthUserFile "c:\svnrepo\conf\passwd"
Require valid-user
</Location>
- Create users in Apache by typing in "c:\Apache Group\Apache 2\htpasswd.exe" -cm "c:\svnrepo\conf\passwd" username. Retype the same command without -c to add next users.
- Optionally, you can download TurtoiseSVN, a subversion client for Windows (it's like TurtoiseCVS).
- Download and install Subclipse, the Eclipse plug-in for Subversion. Before installating Subclipse, you should first check that Subclipse is not already installed using the following menu: Help | About Eclipse SDK | Plugins. Subclipse is installed with some other plug-ins (when install PHPEclipse for example).
- You can use a single browser to view the repository. Type http://127.0.0.1/repos.
Use of Subversion in Eclipse
- Open the SVN Repository Exploring Perspective.
- Right click and choose New | Repository Location... In URL, type http://127.0.0.1/repos. Enter your login and password.
Comments:
In fact, in the second step you install the standalone Subversion server (svnserve) as a service - that's it!
You have more choices concerning authorization with Apache though, but installation is much easier with svnserve!
I need Apache if I want to make my SVN repository available thru the Internet. Am I right?
You need Apache if you want to be able to access to your SVN repository throw WebDAV protocol.
To, a simple web browser ou webdav client or file browser (like nautilus or windows explorer) can be enough to work with svn.
And it's usefull if you want to re-use security rules of your apache config.
But you can use svn+ssh:// protocole over the internet without any problem.
If I want to use Subversion with Eclipse and Subclise, do I need to install Apache?
You can use Subclipse with svnserve and without Apache. Instead of using a http: scheme in the repository URL, you use svn:, or svn+ssh: over an unsecure network.
HTH
Neil.
In general, firewalls block incomming request and not outcomming ones. So if you want to use svn protocol instead of http over the internet, you just need to configure your server firewall to accepte incomming requests on the svn default port (3690).
Yan.
This post has 1 feedback awaiting moderation...
Leave a comment:
Pingbacks:
No Pingbacks for this post yet...
This post has 1 feedback awaiting moderation...
