Skip to content

Commit 565e56c

Browse files
schwernEric Wong
authored andcommitted
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>
1 parent 3def8d0 commit 565e56c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

perl/Git/SVN.pm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ use Git::SVN::Utils qw(
2727
fatal
2828
can_compress
2929
join_paths
30+
canonicalize_path
31+
canonicalize_url
3032
);
3133

3234
my $can_use_yaml;
@@ -2304,7 +2306,7 @@ sub path {
23042306

23052307
if (@_) {
23062308
my $path = shift;
2307-
$self->{path} = $path;
2309+
$self->{path} = canonicalize_path($path);
23082310
return;
23092311
}
23102312

@@ -2316,7 +2318,7 @@ sub url {
23162318

23172319
if (@_) {
23182320
my $url = shift;
2319-
$self->{url} = $url;
2321+
$self->{url} = canonicalize_url($url);
23202322
return;
23212323
}
23222324

perl/Git/SVN/Ra.pm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ use vars qw/@ISA $config_dir $_ignore_refs_regex $_log_window_size/;
33
use strict;
44
use warnings;
55
use SVN::Client;
6+
use Git::SVN::Utils qw(
7+
canonicalize_url
8+
);
9+
610
use SVN::Ra;
711
BEGIN {
812
@ISA = qw(SVN::Ra);
@@ -137,7 +141,7 @@ sub url {
137141

138142
if (@_) {
139143
my $url = shift;
140-
$self->{url} = $url;
144+
$self->{url} = canonicalize_url($url);
141145
return;
142146
}
143147

0 commit comments

Comments
 (0)