git-svn: canonicalize earlier

Just a few things I noticed. Its good to canonicalize as early as possible. [ew: commit title] Signed-off-by: Eric Wong <normalperson@yhbt.net>

Michael G. Schwern committed Jul 28, 2012 at 02:47 UTC 8266fc8be19ef1405d4ef175bb0e75ebc2730f5d
2 files changed +5 -5
git-svn.perl
+3 -3
@@ -1436,16 +1436,16 @@ sub cmd_info {
1436 # canonicalize_path() will return "" to make libsvn 1.5.x happy,
1437 $path = "." if $path eq "";
1438
1439 - my $full_url = $url . ($fullpath eq "" ? "" : "/$fullpath");
1439 + my $full_url = canonicalize_url( $url . ($fullpath eq "" ? "" : "/$fullpath") );
1440
1441 if ($_url) {
1442 - print canonicalize_url($full_url), "\n";
1442 + print "$full_url\n";
1443 return;
1444 }
1445
1446 my $result = "Path: $path\n";
1447 $result .= "Name: " . basename($path) . "\n" if $file_type ne "dir";
1448 - $result .= "URL: " . canonicalize_url($full_url) . "\n";
1448 + $result .= "URL: $full_url\n";
1449
1450 eval {
1451 my $repos_root = $gs->repos_root;
perl/Git/SVN/Ra.pm
+2 -2
@@ -69,7 +69,7 @@ sub _auth_providers () {
69
70 sub new {
71 my ($class, $url) = @_;
72 - $url =~ s!/+$!!;
72 + $url = canonicalize_url($url);
73 return $RA if ($RA && $RA->url eq $url);
74
75 ::_req_svn();
@@ -101,7 +101,7 @@ sub new {
101 $Git::SVN::Prompt::_no_auth_cache = 1;
102 }
103 } # no warnings 'once'
104 - my $self = SVN::Ra->new(url => canonicalize_url($url), auth => $baton,
104 + my $self = SVN::Ra->new(url => $url, auth => $baton,
105 config => $config,
106 pool => SVN::Pool->new,
107 auth_provider_callbacks => $callbacks);