FogBugz 6.0 Online Help

Setting up Visual SourceSafe

There are two steps in setting up FogBugz-Visual SourceSafe integration:

  1. Getting VSS to transmit changes to FogBugz
  2. Getting FogBugz to display VSS diffs and logs.

    Getting VSS to transmit changes to FogBugz

    Log on to FogBugz as an administrator, and go to Settings | Site. In the Main tab, you will see a link to download scripts.

    Download the VSS script.

    This gives you a file named vss_fbupdate.wsf.safe. FogBugz adds the extension .safe to the name of the file that you downloaded, to keep it from running accidentally. Rename it to vss_fbupdate.wsf.

    Edit the vss_fbupdate.wsf file as follows:

    Find out the path to your VSS database directory. For example:

    C:\Program Files\Microsoft Visual Studio\Common\VSS

    You can identify the VSS database directory because it contains a file named SrcSafe.ini. (Read more at Microsoft's website).

    In vss_fbupdate.wsf, look for the commented-out line

    'Call ProcessVSSJournal("Project Name", "Path to VSS Database directory")

    Uncomment this and make a copy of each VSS project you have. For example:

    Call ProcessVSSJournal("Test", "C:\Program Files\Microsoft Visual Studio\Common\VSS")

    Note: If you are using MySQL, you cannot have an underscore in the file path, since it will be replaced by MySQL with a dash, and you cannot use a backslash \ since MySQL will interpret that as an escape character, so use forward slashes (/)instead.

    For each VSS Database you have, run the Admin Console and choose Tools | Options.  Make sure it is set to create a file called journal.txt in the VSS Database directory.

    Using the example above, the "Log all actions in journal file" would point to "C:\Program Files\Microsoft Visual Studio\Common\VSS\journal.txt".

    [Image]

    If VSS says no such path exists, try using a UNC path (\\server\share\...). You will then have to use this in vss_fbupdate.wsf as well.

    Set the vss_fbupdate.wsf file to run as a scheduled task every so often -- at least hourly, or even more often if you like. The task will complete very quickly so don't worry about running it too often.

    Make sure this scheduled task runs as a user that has privileges to rename/delete files in the VSS directories (usually NOT the FogBugz user, but instead an admin on the machine).  Use the //B option to wscript so the script does NOT run in interactive mode:

    c:\winnt\system32\wscript.exe //B "C:\Program Files\fogbugz\accessories\SourceControl\vss\vss_fbupdate.wsf"

    Make sure that the FogBugz user (or whomever you installed FogBugz to run as) has READ access on all your VSS folders and all subfolders. The user must also have FULL CONTROL on the names.dat and the rights.dat files, and the LoggedIn directory.  Also it must have FULL CONTROL ON THE SSUS.DLL and SSAPI.DLL in order to create the SourceSafe COM object.

    Getting FogBugz to display VSS diffs and logs

    We suggest setting up VSS to run on the same machine as FogBugz so that you can use our internal tools to view diffs and logs. If this is not feasible for you, you can install a separate instance of FogBugz on IIS on the VSS machine, whose sole purpose is to read VSS files and show you the diffs and logs. Be sure the FogBugz user in that IIS has permissions on the VSS files on that server as specified above. FogBugz On-Demand users (and those who do not wish to install FogBugz on the same machine that runs VSS) can use VSS Remoting to display diffs and logs. 

    Log on to FogBugz on your main FogBugz server as an administrator, and go to Settings | Site. In the Main tab:

    If you are not using VSS Remoting:

    Under Source Control URL for logs, enter

    http://your fogbugz URL/default.asp?pg=pgShowVSSFileHist&FILE=^FILE

    Under Source Control URL for diffs, enter

    http://your fogbugz URL/default.asp?pg=pgShowVSSFileDiff&FILE=^FILE&R1=^R1&R2=^R2

    If you are using VSS Remoting:

    Under Source Control URL for logs, enter

    https://.../dbview.srf?target=^FILE

    Under Source Control URL for diffs, enter

    https://.../diff.srf?target=^FILE&v1=^R1&v2=^R2