Baccou Bonneville Blogs Eclipse Blog Process Improvement Blog Java Blog Web Design Blog Miscellaneous .NET Blog

10/15/05

English (US)   Installing and using Subversion on Windows with Eclipse  -  Categories: Eclipse Platform, CVS, Subversion, Eclipse plug-ins, Tutorials  -  @ 08:26:47 am
Subversion logo

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.

[More:]

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:

  1. Download svn-1.2.3-setup.exe, the setup of Subversion for Windows from this link. Launch the installation and follow instructions.

  2. 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.

  3. Subversion needs can 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.

  4. 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.

  5. 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>


  6. 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.

  7. Optionally, you can download TurtoiseSVN, a subversion client for Windows (it's like TurtoiseCVS).

  8. 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).

  9. You can use a single browser to view the repository. Type http://127.0.0.1/repos.

Use of Subversion in Eclipse

  1. Open the SVN Repository Exploring Perspective.

  2. Right click and choose New | Repository Location... In URL, type http://127.0.0.1/repos. Enter your login and password.
Technorati tags:
9 comments

Comments:

Comment from: Michael [Visitor]
You don't need Apache to run a Subversion repository on your windows pc!

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!
PermalinkPermalink 10/16/05 @ 05:45
Comment from: admin [Member] Email · www.baccoubonneville.com
Michael,

I need Apache if I want to make my SVN repository available thru the Internet. Am I right?
PermalinkPermalink 10/16/05 @ 09:19
Comment from: Gizmo [Visitor]
No, you're wrong.
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.
PermalinkPermalink 10/17/05 @ 09:50
Comment from: Serge Baccou [Member] Email · http://www.baccoubonneville.com
Gizmo,

If I want to use Subversion with Eclipse and Subclise, do I need to install Apache?
PermalinkPermalink 10/17/05 @ 11:24
Comment from: Neil Greenwood [Visitor]
Serge,

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.
PermalinkPermalink 10/18/05 @ 10:02
Comment from: Serge Baccou [Member] Email · http://www.baccoubonneville.com
Ok, but if I want to use Subclipse with svnserve using svn: over the Internet, I certainly have to configure Subversion to use port 80 or 443 I guess (other ports will be blocked by some firewalls on the other side). Is that correct?
PermalinkPermalink 10/18/05 @ 12:06
Comment from: Yan [Visitor]
Serge,

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.
PermalinkPermalink 01/01/06 @ 21:55
Comment from: sandeep [Visitor] Email · http://www.yahoo.com
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).

PermalinkPermalink 02/21/07 @ 20:23
Comment from: Imran Md [Visitor] Email · http://www.hotmail.com
When i create/add remotely a folder to the repository it is giving authorization failed error. I am using TortoiseSVN as client. I configured the svn without a Apache. Do i need Apache to solve the Authorization problem.
PermalinkPermalink 10/29/07 @ 05:06

This post has 1 feedback awaiting moderation...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

Pingbacks:

No Pingbacks for this post yet...

This post has 1 feedback awaiting moderation...

powered by
b2evolution

Credits: blog software | web hosting | monetize