TMate – new look at the good old CVS

As soon as project modules are created source navigation shortcuts start to work in the TMate tool window. (Just don't forget to enable CVS integration in IDEA project properties.) I'm a keyboard-style user and of course all the famous IDEA navigation shortcuts are supported by TMate. I would even say that there is no action in TMate that couldn't be accessed from the keyboard.

Popup
Figure 5.

TMate's view allows changing its layout completely in a few seconds thus allowing taking a look at the source code from different points of view. For instance first you may be interested in a file's history, then in a history of a user's commits. TMate doesn't require any additional information – it is a tool that displays and lets you access existing CVS data in smart way.

There are predefined layouts and a way to quickly create new ones. Needless to say that TMate, like a good assistant, remembers all the changes you make and, tries whenever possible not make you do the same things again and again.

Users perspective, changes are grouped by modules
Figure 6. Users perspective, changes are grouped by modules
Users perspective, changes are grouped by modules Figure 7. Project structure perspective, changes are not grouped

So now, less then ten minutes after installing TMate, I know with some degree of precision:

  • What Tomcat subsystem is under most active development now
  • What problems are being worked on
  • Which developers are working on them
  • What the overall pace of development is

The Tomcat project team uses "Bugzilla" to track bugs and frequently references Bugzilla issues in the commit comments (that is actually a common practice). TMate provides a generic way of integrating source code and bug tracking systems. For the Tomcat project I defined the following regular expression and URL pattern in TMate connections properties:

Regular expression to match issues: “Bugzilla (\d+)”

Pattern to generate issue link: http://issues.apache.org/bugzilla/show_bug.cgi?id=$1

Now I may navigate to the issues referenced in commit comments with a single click:

Users perspective, changes are grouped by modules Figure 8.

Charts are another representation TMate could provide. Charts give you a certain project aspect overview on a longer-term scale that is not only useful for team leader, but may let team members measure their performance and efficiency in terms of influence on the source code.

Local Changes
Figure 9.

All axes are configurable, as well as stacking value. Charts may be saved to gif or exported to CSV for further processing (i.e. in Excel). All the filters applicable to the changes view may be independently applied to the chart.

More TMate Features

There are more TMate features that make a developer's life easier.

The Web interface makes TMate information accessible outside of IDEA, useful when one would like to track latest changes only and either does not have the ability, or would not like to start the whole IDE. The Web interface is not as rich as that of the plug-in, but it gives enough information structured in a way far better than the standard CVS web interface.

Developers will find useful the Local Changes tool window and Pending Updates tab in the changes tool window. These are valuable additions to the standard IDEA CVS integration.

The Local Changes window is similar to the IDEA “commit dialog”, but allows grouping modified files into change sets and committing them separately. And, what is even more important, it is not modal as “commit dialog”. It thus provides convenient navigation from the changes tree to the source code editor and back, and doesn't require the user to go out of the workflow to review changes to be committed. TMate updates the contents of this view automatically, so that it always contains up-to-date information.

Local Changes Figure 10.

Pending Updates is a view that takes advantage of the constant tracking of the CVS repository and displays project files that were changed by other users and need to be updated. This view allows updating only actually modified files and thus saves a lot of time  especially when working with a large project.

This view also highlights possible conflicts (i.e. files modified both in repository and in the local project) and suggests a way to resolve them faster.

I wrote this article on a weekend, and Tomcat project didn't contain any changes I should synchronize my project with. So, screenshot below is taken from the other project:

Local Changes Figure 11.

There are lots of other small, mostly invisible features in TMate that make it a pleasure to use and nice to look at, but I think that instead of reading about them in this article you'll have more fun discovering them yourself.

Conclusion

TMate of course is not a silver bullet and will not fit into every development process. First of all it works only with CVS version control. CVS in its turn is quite an old tool and a modern VCS, like Subversion, outweighs it with features. But switching to a new VCS is a time consuming and costly process that not every project can afford. These new VCS may not be as stable as CVS. Subversion, for example, lacks good IDEA integration at the moment.

In such situations TMate may be a valuable tool that brings work with the CVS to a higher level without changing anything in the current infrastructure. It is a transparent tool that is able to give bold results.

If you are interested in TMate you may always find more information and get a trial version at TMate Home Page and for those of you who read this article to this very lines and is working on an open source project I have one more good news to share – TMate is free to use in established open source projects – just send me a reference to your project home page and you will get a license for free.

References:

http://cvshome.org/ - CVS home
http://subversion.tigris.org/- Subversion home
http://tmatesoft.com/documentation/ - TMate online documentation
http://tmate.org/svn/ - JavaSVN library home page
Alexander Kitaev / TMate Software.
page 3 of 3