From: Jonathan Nieder <jrnieder@gmail.com>
To: Ben Walton <bwalton@artsci.utoronto.ca>
Cc: normalperson@yhbt.net, git@vger.kernel.org
Subject: Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements
Date: Sat, 17 Dec 2011 03:50:19 -0600 [thread overview]
Message-ID: <20111217095019.GC8845@elie.hsd1.il.comcast.net> (raw)
In-Reply-To: <1320251895-6348-2-git-send-email-bwalton@artsci.utoronto.ca>
Hi again,
Ben Walton wrote:
> 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.
(Not a segfault, just a core dump.) Thanks.
[....]
> --- 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";
This has two obvious effects, one good and one bad.
The good effect is that it converts spaces to %20. Both old and new
versions of Subversion seem to be happy to treat %20 as a space, and
new versions of Subversion are not happy to treat a space as a space,
so this conversion can only be a good thing.
The bad effect is that it converts percent signs to %25. So commands
like "git svn clone file:///path/to/test%20repository" that previously
worked might not work any more, if v1.6.5-rc0~61 (svn: assume URLs
from the command-line are URI-encoded, 2009-08-16) did not do its job
completely.
In other words, it seems to me like you are on the right track. ;-)
Another possible approach: to imitate the svn command line tools, we
could use SVN::Client::url_from_path in some appropriate place.
Next steps:
- track down the trouble on svn 1.6.x that Eric mentioned
- fix any remaining tests that still don't pass
Thanks for getting this started. Will sleep and play with it a little
more.
Jonathan
next prev parent reply other threads:[~2011-12-17 9:50 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 ` [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements Ben Walton
2011-11-02 18:20 ` 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 [this message]
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=20111217095019.GC8845@elie.hsd1.il.comcast.net \
--to=jrnieder@gmail.com \
--cc=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).