{"thread":{"id":"20161","subject":"[PATCH 2/2] git svn: fix reparenting when ugly http(s) URLs are used","startedAt":"2009-07-20T05:58:26Z","lastAt":"2009-07-20T05:58:26Z","messageCount":1,"participants":["Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"118282","messageId":"20090720055826.GB24393@dcvr.yhbt.net","threadId":"20161","inReplyTo":null,"subject":"[PATCH 2/2] git svn: fix reparenting when ugly http(s) URLs are used","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-07-20T05:58:26Z","receivedAt":"2009-07-20T05:58:26Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Mishandling of http(s) in need of escaping was causing\nt9118-git-svn-funky-branch-names to fail when SVN_HTTPD_PORT\n was defined.\n\nThis bug was exposed in (but not caused by)\ncommit 0b2af457a49e3b00d47d556d5301934d27909db8\n(Fix branch detection when repository root is inaccessible)\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex cfade63..43c86e8 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -4525,10 +4525,12 @@ sub gs_do_switch {\n \n \tmy $full_url = $self->{url};\n \tmy $old_url = $full_url;\n-\t$full_url .= '/' . escape_uri_only($path) if length $path;\n+\t$full_url .= '/' . $path if length $path;\n \tmy ($ra, $reparented);\n \n-\tif ($old_url =~ m#^svn(\\+ssh)?://#) {\n+\tif ($old_url =~ m#^svn(\\+ssh)?://# ||\n+\t    ($full_url =~ m#^https?://# &&\n+\t     escape_url($full_url) ne $full_url)) {\n \t\t$_[0] = undef;\n \t\t$self = undef;\n \t\t$RA = undef;\n-- \nEric Wong\n"}]}