Interfacing with External Programs
CVS is rarely used alone. There are a number of project-management tools available, each used to perform a different set of tasks. The scripting files can be used to connect CVS to other project-management tools, such as bug trackers and build scripts.
Interfacing with Bug Trackers
Interfacing with a bug tracker is easiest if the tracker
accepts input from standard input or via an email form. Use the
rcsinfo file to have the cvs
commit editor screen include the template your bug tracker
requires, and use the verifymsg file to ensure
that all fields are filled in appropriately. Then have a script in
verifymsg or loginfo mail
the log data to your bug tracker.
Example 7-11 and Example 7-12 show how to integrate with the
Bugzilla
bug-tracking tool, available at
http://bugzilla.mozilla.org/. These examples
assume that the Bugzilla email gateway has been enabled. The
@resolution field in the message template allows
you to change a project’s status and is supported
directly by Bugzilla.
Use the verifymsg script in Example 7-11 to separate out the bug ID so it can be used
in the mail subject (which must have the format [Bug
XXXX]). The rest of the log message can be sent as the
mail body. The script uses the read command to
get the bug ID from the first line of the log message, checks that
the first line it reads uses the format it expects, and then mails
the bug ID and the rest of the stdin input to
the user bugzilla on the same computer. The script returns ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access