git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ben Walton <bwalton@artsci.utoronto.ca>
To: normalperson@yhbt.net
Cc: git@vger.kernel.org, Ben Walton <bwalton@artsci.utoronto.ca>
Subject: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements
Date: Wed,  2 Nov 2011 12:38:15 -0400	[thread overview]
Message-ID: <1320251895-6348-2-git-send-email-bwalton@artsci.utoronto.ca> (raw)
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 <bwalton@artsci.utoronto.ca>
---
 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

  reply	other threads:[~2011-11-02 16:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 16:38 (unknown), Ben Walton
2011-11-02 16:38 ` Ben Walton [this message]
2011-11-02 18:20   ` [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements Jonathan Nieder
2011-11-02 19:05     ` Ben Walton
2011-11-02 22:09       ` Eric Wong
2011-11-04  2:11         ` Ben Walton
2011-11-04  6:38           ` Jonathan Nieder
2012-07-16 20:16           ` Michael Witten
2011-12-17  8:45         ` Jonathan Nieder
2011-12-17  9:50   ` Jonathan Nieder
2011-12-17 23:48     ` Ben Walton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320251895-6348-2-git-send-email-bwalton@artsci.utoronto.ca \
    --to=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).