- Create project - Client
software - Play with Tortoise
Subversion is a free tool
that allows you to manage files that you need to share with other
people in a project, need on different locations, want to keep
different versions, ... It is nowadays the standard tool for doing so.
You need to do three things:
synchronize your data!!
- Understand Subverion's philosophy.
- Create a repository on a server.
- Install client software.
Your files are stored on
a server in what is called the repository
It keeps the latest version of each file (called the HEAD), but also
all previous versions. You start with performing a checkout
, by which you link a local
folder to the repository. The files of the repository are downloaded
from the server and you can work freely on this local copy.
New files are uploaded to the repository by the add
command. Uploading changes to
existing files is called a commit
Downloading changes to files that others have made is called an update
. To verify you local copy
with the version on the server is called synchronization
makes file sharing
||The only difficulty that might
occur is when two persons have made changes to the same file.
Consider the following example (figure on the left) in which Sally has
made a change to file
A, commited this change and Harry wants to commit his changes.
This results in an out-of-date error.
Harry first has to update his file, merge Sally's changes with his. See
figure on the right. Only then he might commit the merged file.
The merge of Harry's and Sally's changes can happen automatically
unless both made changes to the same lines in the file. Then, Harry
should manually perform the merge. This is called conflict resolution.
Create a project
You can freely create a
repository at the following locations. You'll get a user
and host url
, which you will need later.
- You need a Google login. If you have a gmail account, your user
name can be used as login (what is in front of @).
- Look under source =>
Checkout for host
url and generated password that you will need (something like https://javacannon.googlecode.com/svn).
- Register and create a space (You'll get 200MB).
- Provide a url name (may
be identical as space name).
- Check the Software
Developers box to create a subversion repository!
- Under Trac/SVN, you'll find the host url (something like http://svn2.assembla.com/svn/myproject).
You'll need some software to access the server.
which allows you to synchronize with the repository in Windows
Explorer. (It is installed in the PC rooms of the 3rd floor).
- download and run the 32-bit TortoiseSVN-184.108.40.20637-win32-svn-1.4.6.msi
, you install the
subclipse plugin from http://subclipse.tigris.org/update_1.2.x
Play with Subversion
|Subversion installs itselfs in
the context menu of Windows Explorer.
To Checkout a project, create a new folder, right click and choose
You will be asked for host url, user name and password.
It's wise to use an empty
From then on you see a green
'v'-symbol appearing on each folder or file that is synchronized with
In the context menu you'll find the commit and update commands.
With each commit you can optionally add comment about the changes you
If you try to update but your file is not up-to-date, you get an
To solve it, do a synchronize: choose TortoiseSVN => Check for
Modifications and double click on the file to be merged.
In the TortoiseMerge window, you'll see at the left the version of the
repository and on the right your version.
All differences are indicated. In the right version you select for each
line what you want.
If you have resolved all conflicts, close the merge window after having
saved your file.
Then indicate that you resolved all conflicts by choosing Resolved from the Tortoise
Finally, perform a commit.
If you do an update, Subversion tries to manually merge your changes
with that of the server.
For conflicts, both versions will appear in your file. Like this:
First your version is given and below
that of the server.
* == TORTOISE == *
(Note that subversion also makes a copy of your file and the server's).
Choose whatever you want, mark the file as resolved and commit.
use Windiff to
compare two folders or two files