Git::SVN{,::Ra}: canonicalize earlier
This canonicalizes paths and urls as early as possible so we don't have to remember to do it at the point of use. It will fix a swath of SVN 1.7 problems in one go. Its ok to double canonicalize things. SVN 1.7 still fails, still not worrying about that. [ew: commit title] Signed-off-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:

committed by
Eric Wong

parent
3def8d0884
commit
565e56c2cc
@ -27,6 +27,8 @@ use Git::SVN::Utils qw(
|
|||||||
fatal
|
fatal
|
||||||
can_compress
|
can_compress
|
||||||
join_paths
|
join_paths
|
||||||
|
canonicalize_path
|
||||||
|
canonicalize_url
|
||||||
);
|
);
|
||||||
|
|
||||||
my $can_use_yaml;
|
my $can_use_yaml;
|
||||||
@ -2304,7 +2306,7 @@ sub path {
|
|||||||
|
|
||||||
if (@_) {
|
if (@_) {
|
||||||
my $path = shift;
|
my $path = shift;
|
||||||
$self->{path} = $path;
|
$self->{path} = canonicalize_path($path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2316,7 +2318,7 @@ sub url {
|
|||||||
|
|
||||||
if (@_) {
|
if (@_) {
|
||||||
my $url = shift;
|
my $url = shift;
|
||||||
$self->{url} = $url;
|
$self->{url} = canonicalize_url($url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@ use vars qw/@ISA $config_dir $_ignore_refs_regex $_log_window_size/;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use SVN::Client;
|
use SVN::Client;
|
||||||
|
use Git::SVN::Utils qw(
|
||||||
|
canonicalize_url
|
||||||
|
);
|
||||||
|
|
||||||
use SVN::Ra;
|
use SVN::Ra;
|
||||||
BEGIN {
|
BEGIN {
|
||||||
@ISA = qw(SVN::Ra);
|
@ISA = qw(SVN::Ra);
|
||||||
@ -137,7 +141,7 @@ sub url {
|
|||||||
|
|
||||||
if (@_) {
|
if (@_) {
|
||||||
my $url = shift;
|
my $url = shift;
|
||||||
$self->{url} = $url;
|
$self->{url} = canonicalize_url($url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user