git-svn: remove ad-hoc canonicalizations
[ew: commit title] Signed-off-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:

committed by
Eric Wong

parent
705b49cb81
commit
5eaa1fd086
@ -36,6 +36,7 @@ use Git::SVN::Utils qw(
|
|||||||
canonicalize_url
|
canonicalize_url
|
||||||
join_paths
|
join_paths
|
||||||
add_path_to_url
|
add_path_to_url
|
||||||
|
join_paths
|
||||||
);
|
);
|
||||||
|
|
||||||
use Git qw(
|
use Git qw(
|
||||||
@ -1598,7 +1599,7 @@ sub post_fetch_checkout {
|
|||||||
|
|
||||||
sub complete_svn_url {
|
sub complete_svn_url {
|
||||||
my ($url, $path) = @_;
|
my ($url, $path) = @_;
|
||||||
$path =~ s#/+$##;
|
$path = canonicalize_path($path);
|
||||||
|
|
||||||
# If the path is not a URL...
|
# If the path is not a URL...
|
||||||
if ($path !~ m#^[a-z\+]+://#) {
|
if ($path !~ m#^[a-z\+]+://#) {
|
||||||
@ -1617,7 +1618,7 @@ sub complete_url_ls_init {
|
|||||||
print STDERR "W: $switch not specified\n";
|
print STDERR "W: $switch not specified\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$repo_path =~ s#/+$##;
|
$repo_path = canonicalize_path($repo_path);
|
||||||
if ($repo_path =~ m#^[a-z\+]+://#) {
|
if ($repo_path =~ m#^[a-z\+]+://#) {
|
||||||
$ra = Git::SVN::Ra->new($repo_path);
|
$ra = Git::SVN::Ra->new($repo_path);
|
||||||
$repo_path = '';
|
$repo_path = '';
|
||||||
@ -1638,9 +1639,8 @@ sub complete_url_ls_init {
|
|||||||
}
|
}
|
||||||
command_oneline('config', $k, $gs->url) unless $orig_url;
|
command_oneline('config', $k, $gs->url) unless $orig_url;
|
||||||
|
|
||||||
my $remote_path = $gs->path . "/$repo_path";
|
my $remote_path = join_paths( $gs->path, $repo_path );
|
||||||
$remote_path =~ s{%([0-9A-F]{2})}{chr hex($1)}ieg;
|
$remote_path =~ s{%([0-9A-F]{2})}{chr hex($1)}ieg;
|
||||||
$remote_path =~ s#/+#/#g;
|
|
||||||
$remote_path =~ s#^/##g;
|
$remote_path =~ s#^/##g;
|
||||||
$remote_path .= "/*" if $remote_path !~ /\*/;
|
$remote_path .= "/*" if $remote_path !~ /\*/;
|
||||||
my ($n) = ($switch =~ /^--(\w+)/);
|
my ($n) = ($switch =~ /^--(\w+)/);
|
||||||
|
@ -460,7 +460,6 @@ sub new {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
my $path = $self->path;
|
my $path = $self->path;
|
||||||
$path =~ s{/+}{/}g;
|
|
||||||
$path =~ s{\A/}{};
|
$path =~ s{\A/}{};
|
||||||
$path =~ s{/\z}{};
|
$path =~ s{/\z}{};
|
||||||
$self->path($path);
|
$self->path($path);
|
||||||
|
Reference in New Issue
Block a user