Source Control Integration Setup

There are two main steps to setting up integration between FogBugz and your source control system.

1.)  Getting Source Control to Transmit Changes to FogBugz 
You need to install a "trigger" script in your source control system to notify FogBugz whenever a check-in occurs that is related to a particular bug. (For the .vbs and .wsf files we provide below, you will need Windows Scripting 5.6 or later.)

** If you are a trial user, you can download the trial versions of these scripts by logging into FogBugz and clicking "Demo Source Control Integration" on the main menu.  If you decide to buy FogBugz, you can convert your trial script to work with your own installation with just a few modifications.

Subversion, CVS, and Perforce scripts

The way these scripts work is they send the check-in information via HTTP to a FogBugz ASP page named cvsSubmit.asp, using a URL like this: 

http://your.fogbugz.server/cvsSubmit.asp?ixBug=bugID&sFile=file&sPrev=x&sNew=y

  • bugID is the FogBugz bug number
  • file is the source file that is being checked in
  • x is the previous revision number
  • y is the new revision number

Note: If you serve up FogBugz over SSL, and you get a prompt about your SSL certificate when you access FogBugz from a computer that is not the web server, you need to turn off SSL for cvsSubmit.asp, because that prompt will prevent this integration from working.

Although you can create your trigger script in any language, we provide the following sample scripts in Perl and VBScript:

Alternately, if you prefer, you could write a script that notifies FogBugz by using a data access library such as ODBC or OLEDB to insert a new record directly in the table named CVS containing the above four values.  

    Visual Source Safe scripts

    If you use Visual Source Safe, you need to run a script that reads the journal file written by VSS when checkins are made. The script we provide then connects to FogBugz and adds the check-in info. You can set up this script as a scheduled task. Be sure to set the journal file for all the appropriate projects in the VSS Admin Console (Tools->Options->General tab).

    Vault integration

    If you are using Vault, please read this document instead.  We currently do not provide Vault integration for trial users.

    2.)  Getting FogBugz to Provide Hyperlinks to Your Source Control Viewer
    Now let's configure FogBugz to create hyperlinks from the check-in information to a web page that shows either the logs or the diffs.

    You will need a tool with which to view your file diffs and logs from a web browser. This tool will be different depending on which source control system you use. Following are the viewing tools we suggest:  

    Subversion: WebSVN (Make sure that WebSVN uses the same user to create and write to the temp file.  On some Windows systems, WebSVN has the iuser user create the file and the IWAM user updating it.)

    CVS: CVSweb (If you run CVSNT on Windows, you can use CVSWEB NT)

    Perforce: P4Web

    VSS: FogBugz itself will display the diffs and logs (Trial users: FogBugz cannot use its normal method of displaying the diffs and logs for trial users, so we suggest using VSS Remoting).

    Once you have your web viewing tool set up, log into FogBugz as an admin, click on Site (top right), and set the two Source Control URLs to point to your web viewing tool, following the examples on that page.