use Git::SVN{,::RA}->url accessor globally
Note: The structure returned from Git::SVN->read_all_remotes() does not appear to contain objects, so I'm leaving them alone. That's everything converted over to the url and path accessors. No functional change. [ew: commit title] Signed-off-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:

committed by
Eric Wong

parent
6a8d999ed4
commit
b1ea6c3829
11
git-svn.perl
11
git-svn.perl
@ -1395,7 +1395,7 @@ sub cmd_commit_diff {
|
||||
fatal("Needed URL or usable git-svn --id in ",
|
||||
"the command-line\n", $usage);
|
||||
}
|
||||
$url = $gs->{url};
|
||||
$url = $gs->url;
|
||||
$svn_path = $gs->path;
|
||||
}
|
||||
unless (defined $_revision) {
|
||||
@ -1663,15 +1663,16 @@ sub complete_url_ls_init {
|
||||
"and a separate URL is not specified");
|
||||
}
|
||||
}
|
||||
my $url = $ra->{url};
|
||||
my $url = $ra->url;
|
||||
my $gs = Git::SVN->init($url, undef, undef, undef, 1);
|
||||
my $k = "svn-remote.$gs->{repo_id}.url";
|
||||
my $orig_url = eval { command_oneline(qw/config --get/, $k) };
|
||||
if ($orig_url && ($orig_url ne $gs->{url})) {
|
||||
if ($orig_url && ($orig_url ne $gs->url)) {
|
||||
die "$k already set: $orig_url\n",
|
||||
"wanted to set to: $gs->{url}\n";
|
||||
"wanted to set to: $gs->url\n";
|
||||
}
|
||||
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";
|
||||
$remote_path =~ s{%([0-9A-F]{2})}{chr hex($1)}ieg;
|
||||
$remote_path =~ s#/+#/#g;
|
||||
|
Reference in New Issue
Block a user