There are two steps in setting up FogBugz-Perforce integration:
These instructions are for trigger scripts written in VBScript. (See instructions for Perl, or for setting up the DTG)
First you need to get the Perl script that will be used in the trigger:
Perforce passwords cannot be accessed from trigger scripts, so the good folks at Perforce will give you a free "background" or "automation" user for this purpose. Please contact them at support@perforce.com to pursue this option.
If you do NOT have Perforce passwords enabled, leave P4PASSWORD blank.
Perforce will let you call an executable every time files are submitted (actually, just before the submission occurs). This is called a trigger. We want to use a trigger to call the logBugDataP4.vbs file every time any files are submitted in Perforce. To do this, do the following:
The trigger looks slightly different depending on what version of Perforce you use:
Perforce Version 2003.2 - all triggers are of type "submit", no need to specify type:
FogBugzTrigger //... "cscript.exe C:\path\to\your\logBugDataP4.vbs %changelist% %serverport% %client%"Perforce Version 2004.2 - you must specify the type of trigger as "submit":
FogBugzTrigger submit //... "cscript.exe C:\path\to\your\logBugDataP4.vbs %changelist% %serverport% %client%"Perforce Version 2005.2 - you must specify the type of trigger as "change-submit":
FogBugzTrigger change-submit //... "cscript.exe C:\path\to\your\logBugDataP4.vbs %changelist% %serverport% %client%"Note that this new line has a tab at the beginning. Adjust the path to the logBugDataP4.vbs file to make sure it points to logBugDataP4.vbs on your server (wherever you put it).
IMPORTANT: The paths in the trigger cannot contain any spaces. A path with spaces in it will generate an error like the following:
Input Error: There is no file extension in "C:\Program".Click here for more information on setting paths without spaces.
If you don't see the checkin entries in the FogBugz case, here is some troubleshooting help:
In order to browse a Perforce repository, you need something that allows you to view file diffs and history logs from a web browser. With Perforce, you use P4Web, the Perforce Web Client.
Once that is installed and working with your Perforce repository, log onto FogBugz as an administrator and go to the Settings | Site screen, in the Main tab.
If the trigger script is sending changelists instead of files (the default), enter the following:
http://path to P4Web:8080/@md=d&cd=//&c=6fI@/^R2?ac=10
http://path to P4Web:8080/@md=d&cd=//&c=6fI@/^R2?ac=10
If you've modified the trigger script to send files instead of changelists, enter the following:
http://path to P4Web:8080/@md=d&c=@^FILE?ac=22
http://
path to P4Web:8080/@md=d&cdf=^FILE&ra=s&dw=wu&c=@^FILE?ac=19&rev1=^R1&rev2=^R2