Link CVS/SVN commit to GForge Tracker Item

Today I spent some time figuring out what the exact format of the CVS comment is when I want to link a commit to a GForge tracker item. I’ll try to explain it a bit simpler:

  • We have GForge installed at work. We use GForge to manage a software project for a customer.
  • The customer reports a bug in the Tracker of GForge. This bug gets assigned to me.
  • I read the code, find the problem and fix it. Now I want to commit the fix to the GForge integrated CVS, and have it automatically linked to the Tracker item for future reference.

I spent 30 minutes Googling for an example, and did find a lot of info, but no real usage examples. The info says “Include the tracker item id in the commit comment”. I spent anther 10 to 20 minutes trying to figure out if this meant just the number, the number with the prefix, or brackets, or both. To save more people from searching, you should copy-paste the complete tracker id from the tracker item screen.

Example:

To connect a CVS commit to Tracker Item 123, use the following comment:

cvs commit xyz.txt “This is a commit comment for [#123] in GForge project XYZ”

GForge will then automatically link the commit to the tracker item(s). You can have multiple item id’s in there, and you can also do multiple commits for a single tracker item.

Another great tip:  Enable the “Require Tracker Item ID on commit” to force people to do this. Then, create a seperate tracker item titled “Generic Work” so that people who are NOT working on a specific Tracker kan still commit. This forces people to think about what thei’re committing for.

One step further would be to have a seperate tracker item for “refactoring” and “configuration management” or have todo tracker items for a release. This way you can link commits to certain types of work, maybe even to a time tracking tool.

3 Responses to Link CVS/SVN commit to GForge Tracker Item

  1. Abhijit Gurav says:

    Thxs it work fine.

  2. allan says:

    how come svn doesn’t automatically assign tracker id to about-to-be-added files?

  3. rolfje says:

    Hi Allan,

    I don’t understand your question. Tracker-id’s are things which are unrelated to added files to SVN. Besides, how is a system supposed to know that you are to add a file before you add it?

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