Section 8.1. Accessing SVN through a GUI Client


8.1. Accessing SVN through a GUI Client

Most modern desktop or workstation operating systems depend heavily on the use of a graphical user interface (GUI) for interaction with the systemso much so that in many cases, the command line is a dying art. With such heavy dependence on a GUI, it only makes sense that it will often be easier to interact with Subversion through the use of a GUI-based tool. Fortunately, there are a number of GUI clients for Subversion, available for Windows, Mac OS X, and other more traditional UNIX-based systems.

8.1.1. RapidSVN

Whatever your platform of choice, the odds are that you can use the RapidSVN GUI client for Subversion. Although RapidSVN is a natively compiled application (and thus runs with the speed you would expect from a native application), it was written in a very portable manner, which allows it to compile and run on most major platforms.

RapidSVN works as a complete standalone client for Subversion, and presents the user with a straightforward, easy-to-use interface, which users of WinCVS will find familiar. It can be downloaded from the project's Web site, at rapidsvn.tigris.org. Compiled binary installations are available as packages for some Linux distributions, and there is an installer for Windows. RapidSVN will run on a number of other platforms (such as Mac OS X and Solaris), but you may have to compile the program from source code.

Features

RapidSVN is a full-featured Subversion client interface, with access to most of the Subversion client commands. Repositories and working copies are presented in a three-paned interface, as you can see in Figure 8.1. The top-left pane shows a tree view of all of the repositories and working copies that you currently have "bookmarked" in RapidSVN. In the top-right pane, you can see details about each of the files in the directory that is selected in the tree view. Finally, the bottom pane is used for status output from the running of commands.

Figure 8.1. The RapidSVN interface.


RapidSVN shows the status of individual files through both the icon that is used to display the file and a textual representation in the "Status" column. For example, modified files are shown with a red file icon (with an M).

To perform a command on a file, you generally just have to select it and then select the command you would like to perform, either from the toolbar or a menu. If other options are required (such as a revision number), RapidSVN displays a dialog box for you to enter them. So, as an example, if you have a modified file that you would like to commit, you can select it in the file detail pane and click on the Commit Selected button on the toolbar. RapidSVN pops up a dialog for you to enter the log message, and away you go.

When you use RapidSVN to run Subversion commands, you do not always have access to all of the options available from the command line, such as the merge command, which does not give you the option of performing a dry run that shows which files will change without changing them, as you can do with svn merge. Furthermore, RapidSVN makes some complex operations more difficult, or even impossible. Log messages, for instance, cannot be queried recursivelynor is there a way for binary files to be added to a file as properties. With many commands, it is also not possible to run the command simultaneously on a group of files.

When Should I Use It?

RapidSVN is a great tool for casual or less technically adept users of a Subversion repository. It has a low learning curve and a reasonably intuitive interface. Command options are presented to the user as either checkboxes or text boxes, and generally default to the most commonly used options. Uncommon options are often eliminated entirely, which will frustrate power users, but makes the interface cleaner and much simpler for the novice to understand. If your Subversion needs aren't too demanding, and you would like to trade a little flexibility for more ease of use, RapidSVN is a good choice.

8.1.2. TortoiseSVN

If you use Windows, TortoiseSVN is a very nice alternative to a standalone GUI client like RapidSVN. TortoiseSVN takes advantage of the extendibility of Windows Explorer to integrate interaction with the repository directly into the Explorer GUI. TortoiseSVN is widely used by many Windows-based Subversion usersin fact, after the command line, it is probably the most widely used Subversion client available. If you are using Subversion from Windows, this is probably your best choice for a Subversion client (beyond even the command-line tools).

TortoiseSVN is free software (GPL license), and can be obtained from the TortoiseSVN Web site: tortoisesvn.tigris.org. Installing the software is trivial, as the program comes with an installer program. All you need to do is run it and follow the instructions. You should be able to install TortoiseSVN on any version of Windows from Win95 or later, although '95 and NT 4 may require you to upgrade your version of Internet Explorer.

Features

TortoiseSVN provides you with access to all of the Subversion client commands through context menus in Explorer. You are able to easily update, commit, switch, copy, merge, and so on. As you can see in Figure 8.2, each command is easily accessible, although TortoiseSVN has chosen to use different names for some of the commands. For example, instead of svn diff, you have the Create Patch... menu item, and instead of svn copy, you have the Branch/Tag... item.

Figure 8.2. The TortoiseSVN interface.


TortoiseSVN also makes it easy to quickly see the status of versioned files, by placing an overlay icon on each versioned file. For example, in Figure 8.2, you can see that each folder has a circle with a checkmark over the lower-left corner of the icon. If the picture were in color, you would be able to see that the icon is green in color. This indicates that each of those directories has no uncommitted modifications.

8.1.3. ViewCVS

ViewCVS has for quite some time been the top choice for providing a Web-based interface to the CVS version control system. Recently, the ViewCVS project has expanded its support to include Subversion, although Subversion support is not yet available in an official release. To get ViewCVS with Subversion support, you will need to check out the ViewCVS CVS repository. Slow down and take a few deep breaths. Unfortunately, ViewCVS hasn't seen the light and moved to Subversion for its repository yet. The ViewCVS project can be found at viewcvs.sf.net.

Features

ViewCVS allows users to easily browse through a Subversion repository. Its view is similar to the view that you get when accessing the WebDAV share of a repository through a Web browser. The top level of the repository is listed, with links to each directory or file at that level. You can then view files by clicking on them, or descend into subdirectories. As you can see in the screenshot in Figure 8.3 though, the ViewCVS screen is much more advanced than the simple page provided by Apache/WebDAV. In addition to letting you browse the HEAD revision of the repository, ViewCVS gives you a number of other options.

  • You can move to specific revisions and view all of the repository at that revision.

  • When you select a specific revision, you can look at the log message for that revision, as well as the files that changed in that revision. For each changed file, you can also ask to see a diff of the changes made to it.

  • For individual files, you can view the contents of the file, or the complete log for that file.

  • You can obtain diffs of arbitrary revisions for a file, in a number of different formats, such as a color-coded side-by-side view, or a unified diff suitable for use with patch.

Figure 8.3. The Subversion project's ViewCVS page.


Because ViewCVS Subversion support is still in development, there may very well be more features supported by the time you read this. There may even be a version 1.0 release. In the meantime, there are some stable CVS snapshots available. I would suggest that you look at the ViewCVS package maintained by Christopher Baus, at his Web site (www.baus.net/archives/000069.html), which has a stable snapshot of ViewCVS. He also has an excellent set of installation instructions.

When Should I Use It?

ViewCVS is a great tool if you have users who need to access the Subversion repository, but might not need or want the overhead of installing a Subversion client. If your repository contains files that users would be likely to download individually, it can be an easy way to facilitate that, too. It can also be useful for developers who do have and use a Subversion client to check out and commit, but would like a quick way to see files from specific revisions or diffs of different revisions of a file.

ViewCVS is stable enough that you should be able to use it in a production environment. Because it doesn't modify the repository, there is little reason to worry about it corrupting your repository if a bug is encountered.

8.1.4. WebSVN

Another good choice for Web-based repository browsing is WebSVN. WebSVN is similar to ViewCVS and supports many of its features, along with some new ones that ViewCVS doesn't support. Because it was designed from the ground up to support Subversion, it also feels more at home with Subversion. The project itself is located at the WebSVN Web site (http://websvn.tigris.org), and installs very easily. In fact, installation is as simple as putting the WebSVN source in a Web-accessible directory and editing the include/config.inc file (which you need to create by copying the template file include/distconfig.inc).

Features

In addition to repository browsing features similar to ViewCVS, WebSVN offers a number of other ways to get information about the repository.

  • Support for the Subversion blame command, which shows an annotated view of the selected file, with columns showing the user who last committed each line, along with the revision where the commit was made.

  • RSS feeds that allow you to track changes to the repository.

  • Comparisons of two directories, which show the differences between each file in the chosen directories. This makes it easy to compare the differences between the trunk and a branch or tag (or between two branches, and so on).

When Should I Use It?

WebSVN is useful in the same instances as ViewCVS, and the choice between the two is mostly a matter of taste. ViewCVS is a bit more mature than WebSVN (even though Subversion support hasn't been officially released), but WebSVN has more Subversion-friendly features. If you are planning on using one for your repository, I suggest that you try both (they're both reasonably easy to install) and see which one suits your needs best.



    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    ISBN: 131855182
    EAN: N/A
    Year: 2005
    Pages: 132

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net