Code

git-svn: split the path from the url correctly with limited perms
authorEric Wong <normalperson@yhbt.net>
Sat, 12 Aug 2006 06:21:41 +0000 (23:21 -0700)
committerJunio C Hamano <junkio@cox.net>
Sat, 12 Aug 2006 06:55:21 +0000 (23:55 -0700)
commita69a165fb43c88ab5c2adc2fe33b065ff537177c
tree140a628ac6a9bd933ca7d8d0a9475b5d49f27754
parentc8769f76d992ed391d169cd71be009ca17727271
git-svn: split the path from the url correctly with limited perms

This version of the splitter (that only affects SVN:: library
users) works when one only has limited read-permissions to
the repository they're fetching from.

Updated from the original patch to workaround some SVN bug
somewhere, which only seems to happen against file://
repositories...  Here's the diff against the original patch I
submitted:

@@ -1159,8 +1159,8 @@ sub repo_path_split {
  }

  if ($_use_lib) {
- $SVN = libsvn_connect($full_url);
- my $url = $SVN->get_repos_root;
+ my $tmp = libsvn_connect($full_url);
+ my $url = $tmp->get_repos_root;
  $full_url =~ s#^\Q$url\E/*##;
  push @repo_path_split_cache, qr/^(\Q$url\E)/;
  return ($url, $full_url);

Somehow connecting to a repository with the full url makes the
returned SVN::Ra object act strangely and break things, so now
we just drop the SVN::Ra object that we made our initial
connection with.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-svn.perl