@ -362,6 +362,8 @@ sub init_remote_config {
sub find_by_url { # repos_root and, path are optional
sub find_by_url { # repos_root and, path are optional
my ($class, $full_url, $repos_root, $path) = @_;
my ($class, $full_url, $repos_root, $path) = @_;
$full_url = canonicalize_url($full_url);
return undef unless defined $full_url;
return undef unless defined $full_url;
remove_username($full_url);
remove_username($full_url);
remove_username($repos_root) if defined $repos_root;
remove_username($repos_root) if defined $repos_root;
@ -400,6 +402,11 @@ sub find_by_url { # repos_root and, path are optional
}
}
$p =~ s#^\Q$z\E(?:/|$)#$prefix# or next;
$p =~ s#^\Q$z\E(?:/|$)#$prefix# or next;
}
}
# remote fetch paths are not URI escaped. Decode ours
# so they match
$p = uri_decode($p);
foreach my $f (keys %$fetch) {
foreach my $f (keys %$fetch) {
next if $f ne $p;
next if $f ne $p;
return Git::SVN->new($fetch->{$f}, $repo_id, $f);
return Git::SVN->new($fetch->{$f}, $repo_id, $f);
@ -934,18 +941,18 @@ sub rewrite_uuid {
sub metadata_url {
sub metadata_url {
my ($self) = @_;
my ($self) = @_;
my $url = $self->rewrite_root || $self->url;
my $url = $self->rewrite_root || $self->url;
return add_path_to_url( $url, $self->path );
return canonicalize_url( add_path_to_url( $url, $self->path ) );
}
}
sub full_url {
sub full_url {
my ($self) = @_;
my ($self) = @_;
return add_path_to_url( $self->url, $self->path );
return canonicalize_url( add_path_to_url( $self->url, $self->path ) );
}
}
sub full_pushurl {
sub full_pushurl {
my ($self) = @_;
my ($self) = @_;
if ($self->{pushurl}) {
if ($self->{pushurl}) {
return add_path_to_url( $self->{pushurl}, $self->path );
return canonicalize_url( add_path_to_url( $self->{pushurl}, $self->path ) );
} else {
} else {
return $self->full_url;
return $self->full_url;
}
}
@ -1113,7 +1120,7 @@ sub find_parent_branch {
my $r = $i->{copyfrom_rev};
my $r = $i->{copyfrom_rev};
my $repos_root = $self->ra->{repos_root};
my $repos_root = $self->ra->{repos_root};
my $url = $self->ra->url;
my $url = $self->ra->url;
my $new_url = add_path_to_url( $url, $branch_from );
my $new_url = canonicalize_url( add_path_to_url( $url, $branch_from ) );
print STDERR "Found possible branch point: ",
print STDERR "Found possible branch point: ",
"$new_url => ", $self->full_url, ", $r\n"
"$new_url => ", $self->full_url, ", $r\n"
unless $::_q > 1;
unless $::_q > 1;
@ -1869,7 +1876,9 @@ sub make_log_entry {
$email ||= "$author\@$uuid";
$email ||= "$author\@$uuid";
$commit_email ||= "$author\@$uuid";
$commit_email ||= "$author\@$uuid";
} elsif ($self->use_svnsync_props) {
} elsif ($self->use_svnsync_props) {
my $full_url = add_path_to_url( $self->svnsync->{url}, $self->path );
my $full_url = canonicalize_url(
add_path_to_url( $self->svnsync->{url}, $self->path )
);
remove_username($full_url);
remove_username($full_url);
my $uuid = $self->svnsync->{uuid};
my $uuid = $self->svnsync->{uuid};
$log_entry{metadata} = "$full_url\@$rev $uuid";
$log_entry{metadata} = "$full_url\@$rev $uuid";