Troubleshooting Subversion Integration - FogBugz Knowledge Exchange most recent 30 from http://fogbugz.stackexchange.com 2013-05-22T05:42:26Z http://fogbugz.stackexchange.com/feeds/question/931 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://fogbugz.stackexchange.com/questions/931/troubleshooting-subversion-integration Troubleshooting Subversion Integration FogBugz FAQ 2009-12-07T14:40:11Z 2012-09-10T21:33:02Z <p>My Subversion integration isn't working. Is it your fault, mine, or Subversion's?</p> http://fogbugz.stackexchange.com/questions/931/troubleshooting-subversion-integration/932#932 Answer by Rich Armstrong for Troubleshooting Subversion Integration Rich Armstrong 2009-12-07T14:47:26Z 2012-09-10T21:33:02Z <p>FogBugz Subversion Source Control integration consists of two parts:</p> <ol> <li>a trigger script run from the source control system to notify FogBugz of a checkin</li> <li>a link in FogBugz to a web front end of the source control system</li> </ol> <h3>If you check in a file and don't see any corresponding info appear in the FogBugz bug:</h3> <ul> <li><p>Make sure you are using the correct syntax when referring to the case. Try BugzID:1 (if you have a case number 1)</p></li> <li><p>See if the trigger is running. </p> <ol> <li><p>The <code>post-commit</code> script for Subversion has a line at the end that says</p> <p><code>rm /var/tmp/$LOGSVNCHANGEFILE</code> (unix)</p> <p><code>del %temp%\%logsvnfile%</code> (windows)</p></li> <li><p>Add a <code>#</code> character to the beggining of this line so after the commit runs it does NOT delete the file in <code>/var/tmp</code> (or <code>c:\temp</code>, <code>c:\windows\temp</code>)</p></li> <li><p>Run a commit again and validate the file is there</p></li> <li><p>If the file is not there, try running the <code>post-commit</code> script directly (to make sure the problem is not svn failing to run it):</p> <ol> <li><p>Go to your svn hooks directory</p></li> <li><p>Run <code>post-commit /path/to/svn/root/directory 1234</code> 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.</p></li> </ol></li> </ol></li> <li><p>See if the <code>logBugDataSVN</code> 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.)</p> <p><strong>Unix:</strong></p> <p>&nbsp;&nbsp;&nbsp;<code>svnlook changed -r $REV $REPOS &gt; /var/tmp/svnfile</code></p> <p>&nbsp;&nbsp;&nbsp;<code>svnlook log -r $REV $REPOS | perl /path/to/logBugDataSVN.pl $REV /var/tmp/svnfile $REPOS</code></p> <p><strong>Windows:</strong></p> <p><code>svnlook changed -r $REV $REPOS &gt; /var/tmp/svnfile</code></p> <p><code>svnlook log -r $REV $REPOS | cscript /path/to/logBugDataSVN.vbs $REV /var/tmp/svnfile $REPOS</code></p> <ol> <li><p>If the above lines DID make an entry on your case, focus on the <code>post-commit</code> script. It's likely that <code>svnlook</code> 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 <code>cscript.exe</code> (on windows).</p></li> <li><p>If the above lines DID NOT make an entry on your case, <code>logBugDataSVN</code> is failing. If you are using On Demand, or have a SSL FogBugz install, one of the most common reasons for <code>logBugDataSVN.pl</code> failing is the script cannot find <code>wget</code>. At the top of the script it may say <strong>$wget_path = `which wget`;</strong> and you should change this to <code>$wget_path = "/actual/path/to/wget";</code></p> <p>Also at the bottom of the script you should change the line that calls <code>system</code> to be <code>system("$wget_path --no-check-certificate '$url' -q -O /dev/null");</code></p></li> </ol></li> </ul> <h3>If the info is actually getting into FogBugz but the link back to WebSVN is not working:</h3> <ul> <li><p>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 <strong>Admin -> Source Control</strong></p></li> <li><p>If you are using an older version of FogBugz and you see %2F in the URLs where you should see "/", change your <a href="http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes" rel="nofollow">Apache AllowEncodedSlashes configuration</a>. </p></li> </ul> <h3>If none of that works...</h3> <p>These steps work for most people, but not all.</p> <p>If you're still having trouble, go to <a href="http://contact.fogcreek.com" rel="nofollow">http://contact.fogcreek.com</a> and contact us. Friendly people are standing by to help!</p>