git-svn: replace URL escapes with canonicalization

The old hand-rolled URL escape functions were inferior to
canonicalization functions.

Continuing to move towards getting everything canonicalizing the same way.

* Git::SVN->init_remote_config and Git::SVN::Ra->minimize_url both
  have to canonicalize the same way else init_remote_config
  will incorrectly think they're different URLs causing
  t9107-git-svn-migrate.sh to fail.

[ew: commit title]

Signed-off-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:
Michael G. Schwern
2012-07-28 02:47:48 -07:00
committed by Eric Wong
parent 93c3fcbe4d
commit 9c27a57b2d
3 changed files with 9 additions and 44 deletions

View File

@ -296,7 +296,7 @@ sub find_existing_remote {
sub init_remote_config {
my ($self, $url, $no_write) = @_;
$url =~ s!/+$!!; # strip trailing slash
$url = canonicalize_url($url);
my $r = read_all_remotes();
my $existing = find_existing_remote($url, $r);
if ($existing) {