From: Michael G Schwern <schwern@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, "Robin H. Johnson" <robbat2@gentoo.org>,
Eric Wong <normalperson@yhbt.net>,
Ben Walton <bwalton@artsci.utoronto.ca>
Subject: Re: git-svn SVN 1.7 fix, take 2
Date: Tue, 24 Jul 2012 22:36:55 -0700 [thread overview]
Message-ID: <500F85F7.8050304@pobox.com> (raw)
In-Reply-To: <20120725045327.GD3055@burratino>
On 2012.7.24 9:53 PM, Jonathan Nieder wrote:
> Michael G Schwern wrote:
>
>> No, now it's just canonicalizing as early as possible. Preferably within the
>> object accessor rather than at the point of use. So in the code below,
>> $full_url is already escaped/canonicalized.
>
> Let's start with this.
>
> Is svn_path_canonicalize() idempotent? What does it do when it
> encounters a percent-sign?
Nothing, because paths are not URI escaped. :)
You probably meant svn_uri_canonicalize(). And no, it does not double escape,
so its safe to escape as early as possible.
use SVN::Core;
my $uri = "http://www.example.com/ foo";
print SVN::_Core::svn_uri_canonicalize(
SVN::_Core::svn_uri_canonicalize($uri)
);
That produces "http://www.example.com/%20foo".
The API docs don't say it specifically, but if it were otherwise it would be
impossible to use. You'd have to check first if anything were escaped before
canonicalizing. And a user couldn't pass in an escaped URL without risking it
being double escaped.
http://subversion.apache.org/docs/api/latest/svn__dirent__uri_8h.html#a8bae33a2fbf86857869f7b0e39a553e7
--
'All anyone gets in a mirror is themselves,' she said. 'But what you
gets in a good gumbo is everything.'
-- "Witches Abroad" by Terry Prachett
next prev parent reply other threads:[~2012-07-25 5:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 21:46 git-svn SVN 1.7 fix, take 2 Michael G Schwern
2012-07-24 21:51 ` Junio C Hamano
2012-07-24 23:06 ` Michael G Schwern
2012-07-24 23:12 ` Jonathan Nieder
2012-07-24 22:02 ` Jonathan Nieder
2012-07-24 22:50 ` Michael G Schwern
2012-07-24 23:03 ` Jonathan Nieder
2012-07-24 23:31 ` Jonathan Nieder
2012-07-24 23:45 ` Junio C Hamano
2012-07-25 1:00 ` Michael G Schwern
2012-07-25 4:53 ` Jonathan Nieder
2012-07-25 5:36 ` Michael G Schwern [this message]
2012-07-25 7:14 ` Junio C Hamano
2012-07-25 9:53 ` Michael G Schwern
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=500F85F7.8050304@pobox.com \
--to=schwern@pobox.com \
--cc=bwalton@artsci.utoronto.ca \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=normalperson@yhbt.net \
--cc=robbat2@gentoo.org \
/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.
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 NNTP newsgroup(s).