Incorrect detection of SVN repository relative paths (affects

Review Request #1957 — Created Nov. 30, 2010 and submitted

This patch fixes a bug with correct detection of the relative path in an svn repository. The 0.2 version wasn't allowing me to post a review to the review board instance from a git-svn local repo.

The Apache svn instance has one huge repository with every project as a top level directory and the repo root is:

When you pick up the official git mirror its root URL is: is registered as the url for the repo in (which is what you'd expect to allow for reviews of branch code).

Unfortunately the previous relative path detecting code would try to match ['', 'qpid', 'trunk'] with ['', 'qpid'] and fail rather than matching only the same number of components of the path as exist in the root so as to strip of the common prefix and return the actual relative path.

[I've not reported a bug yet as I don't have a google account and it's a little painful to create one just to get this bug fixed - I will if it's absolutely necessary though]
Correctly posted review 128 to for qpid. (
  1. Thanks. Committed along with some unit tests. There will be a release tomorrow.