Multiple Repositories - Multiple Source Control Systems

FogBugz has a very open and configurable source control integration system.  Many users might have multiple repositories or multiple systems and they want to know how to set it up so FogBugz can link to all of them.

FogBugz 6.1 and higher supports multiple repositories within a single source control system. This will even work for FogBugz On Demand users, unlike the other suggestion below. FogBugz 6.1 added the sRepo field to the CVS table for FogBugz which can be used in the Source Control URLs. To do so, add the sRepo argument to the trigger script for your source control system (on the line where the URL with sFile and sPrev and sNew is constructed). To refer to the sRepo value in the Source Control URL, use ^REPO. For instance, if you were using Mercurial and entered the fully-qualified repository URL as sRepo, then the corresponding Source Control URL for logs would be: ^REPO/log/^R2/^FILE

If you are running FogBugz on your Server, or are using multiple source control systems, another way to do this is to have a director script gather your FogBugz requests when you click on links and figure out where to send the user to, based on the repository of that checked in file. This method will work on FogBugz 4 and higher.

  1. Download this script (windows, unix, mac)
  2. Modify the rgRepos array at the top of the file
    Add the name of the repository and the two urls, first the log url then the diff url.  These urls should be in the same format that FogBugz would have taken them in.  (see your Site page in FogBugz for examples)
  3. Then replace the Source Control urls in FogBugz (on the Site page) with
    LOG: repo.asp?LOG=1&FILE=^FILE&R1=^R1&R2=^R2
    DIFF: repo.asp?DIFF=1&FILE=^FILE&R1=^R1&R2=^R2
  4. Have your hook scripts pass the repository in prepended to the FILE parameter
    At the bottom of the hook scripts you will see a request to CVSSUBMIT and you should see something that says "sFile=" & sFile which you would just change to "sFile=repo1:" & sFile for repo1's hook script.

Example for two Source Control Systems