Integrating Your Source Control System with Thy Bug-Tracker   Leave a comment


Difficulty: easy moderate challenging

In our day and age, working with a source control system and a bug-tracker is a must. The benefits of using each are clear and enormous. Even when you work on a small project alone, using one or even both options is useful. Combining them is extremely valuable, as you’ll soon discover.

Although there are some source control systems and numerous bug-trackers, I will use examples of Atlassian Jira as a bug-tracking system and SVN (SubVersioN) as a source control system. I don’t get commission from Atlassian (I wish); I am just one of their satisfied customers.

When you integrate the two systems, you would normally allow you bug-tracker to crawl through your source control’s data and meta-data and to match change-sets (changes of files) of your code with bugs. To be able to correlate the two, you ought to signal the crawler for which particular bug a change-set corresponds. Or, to put it in a different perspective, every time you commit a change, you have to mention the bug ID in your comment to allow the association of the two. On its next cycle, the crawler will pick up your change-set, which might include several files, and will know that the changes are due to the mentioned bug.

And so, the next time you’ll use your bug-tracker and navigate to the said bug, you will see the code changes that were made due to the bug. In Jira’s case, you will have a new tab named Source, where it will list all the change-sets, and for each, all the files that were changed, and for each file, only the lines of code that were removed, changed, or added. This allows you to revisit your changes, your boss to review your code, or your integrator to assess the riskiness of the version. In Jira, there are also other views for files, most remarkably Activity, which shows you only the change-sets that this file was involved with, for you to track its changes.

In Atlassian’s realm, in order to get the integration running, you have to install a separate service named FishEye. This is the crawler, which is also accessible through HTTP to allow independent browsing the source code and all changes to it. It will provide you with nifty statistics and graphs about the progress of your code, about individual contributors to the code and much more. And, you can even see all code changes each person did, if you want to. For me, while programming without this integration I felt alone in supporting our code-base; now that I have it, I feel a part of a team.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: