Subversion UI Shootoutby Jeremy Jones
Subversion is a revision control system intended to be a better CVS. The three "featured projects" on the Tigris page under the SCM category are Subversion, TortoiseSVN, and RapidSVN. This article compares some of the major features of Subversion among the three featured clients (the CLI, RapidSVN, and TortoiseSVN) and some principles around the usability of tools that have both CLI and GUI incarnations. As it discusses a feature where either the CLI or GUI is superior to the other and a general principle is apparent, it points out the principle of superiority.
TortoiseSVN integrates with Windows Explorer and makes all of its features available there. All commands are available through context-sensitive right-click menus in Windows Explorer. Here are the options available on a file that a user has changed in the local repository:
RapidSVN is "a cross-platform GUI front end for the Subversion revision system written in C++ using the wxWidgets framework." This is a standard standalone application with all features available through main menus and right-click menus. Here are the options available with a right-click:
Standard Command Line SVN Client
The command line SVN client is a command line utility that can perform all SVN commands.
Here are the Subversion commands I use most frequently with a comparison among each of the three SVN clients.
status command provides information about the local repository
relative to the server repository. It will show any modifications, additions,
or deletions to a file or directory since the last commit.
This status command shows one file having been modified:
[jjones@cerberus cli_co]$ svn status M folder1/tttt.txt
RapidSVN shows the status of files and directories by way of color coding and overlaying images over the icons for files and directories. For example, changed files will be red, and new files not in the repository will have a blue question mark image overlying the folder/file icon. Here is an example of Rapid showing a modified file:
Like RapidSVN, TortoiseSVN shows the status of files and directories by way of images overlaying the file and directory icons in Windows Explorer. Up-to-date files and directories have an image of a green circle with a white check mark in them. Modified files and directories have an image of a red circle with an exclamation point in them. Here is an example of Tortoise showing a modified file:
It is less "work" to see the status from the GUI tools if you are only interested in the files in your current directory. All you have to do is look, with no typing and no clicking. If you are interested instead in the status of all files and directories under a specific directory, the GUI operations grow more complicated. The CLI client command is recursive by default, and as such, is perhaps more helpful in this regard. There is no way (at least that I have found) to see recursive statuses in RapidSVN. In Tortoise, you have to start a commit to show this information; more on that later.
diff command shows what has changed (or the difference) between two
versions of a file, most commonly between the current version being worked on
and the version most recently committed to the repository.
Here is the CLI command and result for a
diffbetween the current working version and the most recently checked in version of the file tttt.txt (
diffing between the current working version and the most recently checked in version is the default):
[jjones@cerberus cli_co]$ svn diff folder1/tttt.txt Index: folder1/tttt.txt =================================================================== --- folder1/tttt.txt (revision 3) +++ folder1/tttt.txt (working copy) @@ -2,3 +2,4 @@ 4 +test line 3
- In order to perform a
diffin RapidSVN, right-click on the file and select
difffrom the menu. As with the CLI, the default behavior is to
diffthe current working version against the most recently checked in version in the repository. One item of note is that you have to configure a
diffutility manually. On the Linux laptop I am writing this article on,
gvimdiffcomes through in a pinch.
- Again, as with RapidSVN, TortoiseSVN provides
difffunctionality with a right mouse click on the file to
diff. As with both other clients, the default behavior is
diffing the current working version against the most recently checked in version.
The ease of performing the default
diff is, arguably, comparable among each
of the three clients. However, when it comes to complicated
diffs, such as
between two versions in the repository, it is easier to do in one of the GUIs
(and both are equally easy). All you have to do is select a file, view the GUI
SVN log, select the versions to
diff, and select
diff. With the CLI, you have
to view a log first to find the versions, then remember what the parameters are
diff two versions (
remember the versions, then plug the two versions into the command line. It's
not a tremendous hassle, but having the versions right in front of your face
makes it a little easier.
GUI Principle #1
GUIs are superior when graphical representations add clarification.
A good example of this is a standard GUI
diff utility. While it is possible to
figure out what has changed with a unified
diff output, it is very helpful to
have a split-framed
diff utility (such as
vimdiff or Tortoise's
diff) and see the old file and new file side by side with changes