1

2

My Subversion integration isn't working. Is it your fault, mine, or Subversion's?

flag

1 Answer

2

FogBugz Subversion Source Control integration consists of two parts:

  1. a trigger script run from the source control system to notify FogBugz of a checkin
  2. a link in FogBugz to a web front end of the source control system

If you check in a file and don't see any corresponding info appear in the FogBugz bug:

  • Make sure you are using the correct syntax when referring to the case. Try BugzID:1 (if you have a case number 1)

  • See if the trigger is running.

    1. The post-commit script for Subversion has a line at the end that says

      rm /var/tmp/$LOGSVNCHANGEFILE (unix)

      del %temp%\%logsvnfile% (windows)

    2. Add a # character to the beggining of this line so after the commit runs it does NOT delete the file in /var/tmp (or c:\temp, c:\windows\temp)

    3. Run a commit again and validate the file is there

    4. If the file is not there, try running the post-commit script directly (to make sure the problem is not svn failing to run it):

      1. Go to your svn hooks directory

      2. Run post-commit /path/to/svn/root/directory 1234 where the first argument is the root directory of your svn directory and "1234" is a revision number containing a fogbugz case id. If anythings goes wrong, you will see it on your console output.

  • See if the logBugDataSVN file is working. The easiest way to do this is to call it from the command line. (In the commands below, replace $REV with a valid revision number and $REPOS with the path to your repository.)

    Unix:

       svnlook changed -r $REV $REPOS > /var/tmp/svnfile

       svnlook log -r $REV $REPOS | perl /path/to/logBugDataSVN.pl $REV /var/tmp/svnfile $REPOS

    Windows:

    svnlook changed -r $REV $REPOS > /var/tmp/svnfile

    svnlook log -r $REV $REPOS | cscript /path/to/logBugDataSVN.vbs $REV /var/tmp/svnfile $REPOS

    1. If the above lines DID make an entry on your case, focus on the post-commit script. It's likely that svnlook is not in the scripts path and you need to rewrite those lines in the script to use the full path to svnlook. Or the user that subversion runs as may not have permission to run cscript.exe (on windows).

    2. If the above lines DID NOT make an entry on your case, logBugDataSVN is failing. If you are using On Demand, or have a SSL FogBugz install, one of the most common reasons for logBugDataSVN.pl failing is the script cannot find wget. At the top of the script it may say $wget_path = `which wget`; and you should change this to $wget_path = "/actual/path/to/wget";

      Also at the bottom of the script you should change the line that calls system to be system("$wget_path --no-check-certificate '$url' -q -O /dev/null");

If the info is actually getting into FogBugz but the link back to WebSVN is not working:

  • Outside of FogBugz navigate to your site and make sure WebSVN is working on its own. Note the URLs that it is using and make sure you have set the appropriate pointers to this install. You can edit the URLs by editing your repo settings in Admin -> Source Control

  • If you are using an older version of FogBugz and you see %2F in the URLs where you should see "/", change your Apache AllowEncodedSlashes configuration.

If none of that works...

These steps work for most people, but not all.

If you're still having trouble, go to http://contact.fogcreek.com and contact us. Friendly people are standing by to help!

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.