From: Ben Walton Date: Wed, 02 Nov 2011 16:38:15 GMT Subject: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements Message-ID: <1320251895-6348-2-git-send-email-bwalton@artsci.utoronto.ca> In-Reply-To: <1320251895-6348-1-git-send-email-bwalton@artsci.utoronto.ca> Previously only http/https URL's were uri escaped. When building against subversion 1.7, this was causing a segfault in perl after an assertion failure in the SVN::Ra bindings during in t9134. Changing 'trash directory' to 'trash_directory' worked around the problem. After a colleague reported this problem to the subversion list, it was determined that the problem is in git, not svn.[1] The SVN code expects URL's and paths to be pre-escaped. We now also escape file:// URL's in the Git::SVN::Ra->escape_url code path. [1] http://news.gmane.org/gmane.comp.version-control.subversion.devel Signed-off-by: Ben Walton --- git-svn.perl | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 351e743..b00c188 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -5366,6 +5366,9 @@ sub escape_url { if ($url =~ m#^(https?)://([^/]+)(.*)$#) { my ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3)); $url = "$scheme://$domain$uri"; + } elsif ($url =~ m#^(file)://(.*)$#) { + my ($scheme, $uri) = ($1, escape_uri_only($2)); + $url = "$scheme://$uri"; } $url; } -- 1.7.7.1