Subversion : Java Glossary

go to home page S words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all) ©1996-2009 2008-07-26 Roedy Green, Canadian Mind Products
Subversion Subversion
aka SVN. A source code version control system to replace CVS. It is available as source or as binaries for 11 different operating systems. The latest version is 1.6.6 Last revised/verified: 2009-10-22. Subversion fixes many of the infuriating CVS problems e.g. Eclipse is still using CVS, but gradually the world is flipping over to Subversion. You can monitor the trend looking at which repository the various open source projects use. Subversion was designed originally for Linux/Unix. It does not dodge various inefficiencies of Windows and is hence about only half the speed of CVS.

There are five ways to access the Subversion server:

Ways to Access the Subversion Server
Protocol Notes
file:/// Direct repository access (on local disk), e.g. file:///D:/svnrep where snvrep is the directory where the repository is stored.
http:// Access via WebDAV protocol to Subversion-aware Apache server over the Internet
https:// Same as http://, but with SSL encryption
svn:// svn://localhost or svn://mindprod.dyndns.org will get you to the configured repository. Access via custom TCP/IP protocol over port 3690 to an svnserve server. Subversion usually runs as a Windows service you set up with SC.exe like this:
Your installer may do this for you automatically. Usually you configure your router to tunnel that port through your firewall to the outside so it is visible to the Internet world, possibly using DynDNS to make your face IP and port 3690 known and visible to the public. Users will need a username/password for access. SVN will authenticate it using an MD5 challenge scheme that does not require the password to be sent over the Internet, either in plain text or encrypted. You have to manually maintain the list of users and passwords in a file something like this:
# list of users
[users]
# user = password pairs
harry = sesame12
sally = sparkle76
Normally you would configure:
svn+ssh:// Same as svn://, but through an SSH tunnel
There are also groups who will host your Subversion project for you if you use one of the official open source licences. See distributing Java Source for details.

When you install Subversion, it uses three directories:

  1. C:\Users\user\AppData\Roaming\Subversion for the configuration files.
  2. F:\Program Files\CollabNet Subversion Server for the program files.
  3. F:\svn_repository for the repository files.

The server has no UI other than the config files. To control it you need some sort of client, e.g svn, svnadmin, Tortoise SVN.

There is no step-by-step set of instructions to install a simple system. They want you to understand it in fullness before you use it. Here is an abbreviated get started instructions:

  1. Download and install the Subversion server, the appropriate binary. Set it up for purely local access.
  2. Download and install Tortoise SVN client.
  3. Go to F:\svn_repository in my computer.
  4. Right click to wake up Tortoise, then create the repository files.
  5. Edit the config file. In particular set up these fields:
  6. Go into IntelliJ Idea and use Import into Subversion to make a snapshot of your development files in subversion. If you don’t have Intellij, do this with Tortoise.
  7. Use Tortoise to browse the repository using the URL file:///D:/svn_repository
  8. Then you must check out to a directory where you can then start editing the files. You must checkout even though there are no changes from the ones imported.
  9. I would suggest doing an expermental tiny repository to start till you get he hang of how to make sure your excludes work, and how to check things in to the correct place in the hierarchy, then throwing it away as many times as necessary before you do your production version.
The catch is this will capture all your files. There is no point in capturing class files, jars etc since they can easily be recreated from source code. I have not yet learned to teach Subversion to avoid capturing class files.

Tips

Subversion Hosting

You can use a subversion hosting service instead of hosting it yourself. For example, if you register with wush.net you (or others) can access the Subversion server with http://wush.net/svn/ mindprod or https://wush.net/svn/ mindprod where mindprod is your account. You may also permit https://wush.net/websvn/ mindprod for browser-based WebSVN access to your repository without an SVN client.

There are many advantages to hosting your repository with an ISP rather than hosting it on your own machine:

Mindprod Subversion Repository

You don’t have to download the entire package to browse the source code of any Canadian Mind Products programs, even ones not released officially, by looking in the Subversion repository which also track the history of changes.

view mindprod source in repository : novice
browse mindprod source in repository : intermediate
access mindprod source in repository with [Tortoise] Subversion client on wush.net/svn/mindprod/com/mindprod/ : advanced


CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/subversion.html J:\mindprod\jgloss\subversion.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.100]
You are visitor number 7,354.