From: Will Palmer <wmpalmer@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Eric Wong <normalperson@yhbt.net>, git <git@vger.kernel.org>
Subject: Re: [BUG] git-svn fails to rename files with %20 in filename
Date: Tue, 22 Feb 2011 16:50:15 +0000 [thread overview]
Message-ID: <1298393415.2286.18.camel@wpalmer.simply-domain> (raw)
In-Reply-To: <20110221123115.GB23033@sigill.intra.peff.net>
On Mon, 2011-02-21 at 07:31 -0500, Jeff King wrote:
> On Mon, Feb 21, 2011 at 10:12:24AM +0000, Will Palmer wrote:
>
> > Someone accidentally checked some files containing "%20" in their names
> > into our svn repository, which is accessed with either svn or git-svn
> > depending on the developer.
> > When I attempted to correct this by renaming the file, I received (on
> > dcommit):
> > Filesystem has no item: File not found: revision 1, path
> > '/theBeginningOfTheOriginalFileName theRestOfTheOriginalFilename'
> > at /home/wpalmer/libexec/git-core/git-svn line 576
> >
> > A recipe for reproducing this bug is as follows:
> > [...]
>
> Thanks for the thorough test case. It seems to pass for me if with this
> applied:
>
> diff --git a/git-svn.perl b/git-svn.perl
> index 177dd25..7daf63c 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -4556,9 +4556,7 @@ sub repo_path {
>
> sub url_path {
> my ($self, $path) = @_;
> - if ($self->{url} =~ m#^https?://#) {
> - $path =~ s!([^~a-zA-Z0-9_./-])!uc sprintf("%%%02x",ord($1))!eg;
> - }
> + $path =~ s!([^~a-zA-Z0-9_./-])!uc sprintf("%%%02x",ord($1))!eg;
> $self->{url} . '/' . $self->repo_path($path);
> }
>
>
> IOW, it looks like the path we hand to svn needs url-encoding even for
> the local case (which make sense, as it is a file:// url). But I know
> nothing about svn, so probably I am breaking some other weird non-url
> local case. :)
>
> -Peff
Unless I've got my line-numbers mixed up, the commit which introduced
the https-specific encoding behaviour,
29633bb91c git-svn: fix commiting renames over DAV with funky file names
seems to be of the opinion that the bug did not effect file:// and
svn:// URLs. Has something changed?
next prev parent reply other threads:[~2011-02-22 16:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 10:12 [BUG] git-svn fails to rename files with %20 in filename Will Palmer
2011-02-21 12:31 ` Jeff King
2011-02-22 16:50 ` Will Palmer [this message]
2011-02-23 10:04 ` Jeff King
2011-03-02 15:27 ` Steven Scott
2011-02-21 15:26 ` Steven Scott
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=1298393415.2286.18.camel@wpalmer.simply-domain \
--to=wmpalmer@gmail.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
--cc=peff@peff.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.
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).