There are two aspects to FogBugz-CVS integration:
- Getting CVS to transmit changes to FogBugz
- Getting FogBugz to provide links to CVSweb, the web-based CVS repository browser
Setting up the repository in FogBugz
The starting point for setting up source control integration is to create the repository in FogBugz. To do so, log into FogBugz as an administrator and go to Admin -> Source Control. Click Create New Repository. In the resulting dialog, select CVS as the type and give the repository a display name. Click Next.
The resulting dialog contains a script and instructions for getting CVS to transmit changes to FogBugz. Those instructions are provided in more detail below. Select the appropriate tab for the server CVS runs on and download the script. Before you close the dialog, choose whether you want FogBugz to provide links to your check-ins. You can change this setting later by clicking the Edit icon next to the repository on the Admin -> Source Control page.
Diff and log links
In order to have FogBugz link to checked-in files directly from cases, you need something that allows you to view file diffs and history logs from a web browser. We recommend CVSweb (If you run CVSNT on Windows, you can use CVSWEB NT). Once you have CVSWeb installed and working with your CVS repository, set the path to it in the New Repository dialog and click OK to complete the setup.
Getting CVS to transmit changes to FogBugz
Check out the CVSROOT directory.
Find the logBugData script you downloaded above and copy it into your CVSROOT directory. Add it to the repository with cvs add.
If your CVS server is Linux or Unix, make sure that Perl is installed. If your CVS server is Windows, make sure it has Windows Scripting version 5.6 or later installed.
Edit the file loginfo, adding one line at the end as shown below. Change the file path shown here to point to the logBugData file in your CVS repository on your CVS server.
Using Perl on Unix:
ALL perl -s /path to cvs/logBugData.pl "%{sVv}"
Using Perl on Windows:
ALL perl -s C:\path to cvs\logBugData.pl "%{sVv}"
Using VBScript on Windows:
ALL cscript.exe C:\path to cvs\logBugData.vbs "%{sVv}"
Edit the file checkoutlist, adding the following line at the end as shown in these examples:
Using Perl:
logBugData.pl Error-logBugData.pl
Using VBScript:
logBugData.vbs Error-logBugData.vbs
Check in your changes.
If your CVS repository is on Unix make sure to set execute permissions on the logBugData.pl file (chmod +x logBugData.pl).
Entering Case Numbers in CVS Commits
Once everything is set up, when you commit a change using CVS, just include a single line of the form BugzID: case number in the log after the other comments, for example:
Here’s a screenshot of a check-in that successfully connected to FogBugz (this screenshot is of CVSNT on Windows, utilizing logBugData.vbs, that’s why you see “Windows Script Host” poking its face in):
Notice that it says “Adding bug info for Bug ID #1” — this means that when you view bug number 1 in FogBugz you see the check-in in the left hand column.