diff options
author | Michael G. Schwern <schwern@pobox.com> | 2012-07-28 02:47:51 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-08-02 21:46:05 +0000 |
commit | 705b49cb81351020b57f9356487e9b3fdeea1e40 (patch) | |
tree | 39e59653757eb915d51a152d1b9d44f83aa24545 /perl/Git/SVN | |
parent | d2fd119c4fcaea266a894354b506959376140c37 (diff) | |
download | git-705b49cb81351020b57f9356487e9b3fdeea1e40.tar.gz git-705b49cb81351020b57f9356487e9b3fdeea1e40.tar.xz |
git-svn: canonicalize newly-minted URLs
Go through all the spots that use the new add_path_to_url() to
make a new URL and canonicalize them.
* copyfrom_path has to be canonicalized else find_parent_branch
will get confused
* due to the `canonicalize_url($full_url) ne $full_url)` line of
logic in gs_do_switch(), $full_url is left alone until after.
At this point SVN 1.7 passes except for 3 tests in
t9100-git-svn-basic.sh that look like an SVN bug to do with
symlinks.
[ew: commit title]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'perl/Git/SVN')
-rw-r--r-- | perl/Git/SVN/Ra.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm index ec3c570b2..90ec30bff 100644 --- a/perl/Git/SVN/Ra.pm +++ b/perl/Git/SVN/Ra.pm @@ -5,6 +5,7 @@ use warnings; use SVN::Client; use Git::SVN::Utils qw( canonicalize_url + canonicalize_path add_path_to_url ); @@ -102,6 +103,7 @@ sub new { $Git::SVN::Prompt::_no_auth_cache = 1; } } # no warnings 'once' + my $self = SVN::Ra->new(url => $url, auth => $baton, config => $config, pool => SVN::Pool->new, @@ -198,6 +200,7 @@ sub get_log { qw/copyfrom_path copyfrom_rev action/; if ($s{'copyfrom_path'}) { $s{'copyfrom_path'} =~ s/$prefix_regex//; + $s{'copyfrom_path'} = canonicalize_path($s{'copyfrom_path'}); } $_[0]{$p} = \%s; } @@ -301,7 +304,11 @@ sub gs_do_switch { $ra = Git::SVN::Ra->new($full_url); $ra_invalid = 1; } elsif ($old_url ne $full_url) { - SVN::_Ra::svn_ra_reparent($self->{session}, $full_url, $pool); + SVN::_Ra::svn_ra_reparent( + $self->{session}, + canonicalize_url($full_url), + $pool + ); $self->url($full_url); $reparented = 1; } |