From: Eric Wong <normalperson@yhbt.net>
To: Panagiotis Vossos <pavossos@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: git-svn: regression with funny chars in svn repo url
Date: Mon, 7 Apr 2008 01:11:08 -0700 [thread overview]
Message-ID: <20080407081108.GA28853@soma> (raw)
In-Reply-To: <d06901f0804011111o1da8a197ob6a9aaccb3e1e9a0@mail.gmail.com>
Panagiotis Vossos <pavossos@gmail.com> wrote:
> I keep a copy of the gtk+ svn repository on my machine and I have
> noticed the following bug with git-svn:
>
> ~/gitproj/gtk+$ which git-svn
> /usr/local/bin/git-svn
>
> ~/gitproj/gtk+$ ls -l /usr/local/bin/git-svn
> lrwxrwxrwx 1 root staff 39 2008-03-30 07:45 /usr/local/bin/git-svn ->
> ../encap/git-1.5.4_20080328/bin/git-svn
>
> ~/gitproj/gtk+$ git-svn --version
> git-svn version 1.5.4.5 (svn 1.4.6)
>
> ~/gitproj/gtk+$ git-svn rebase
> Apache got a malformed URI: REPORT request failed on
> '/svn/gtk+/!svn/vcc/default': Unusable URI: it does not refer to this
> repository at /usr/local/bin/git-svn line 3821
I've known of this bug for a while but didn't track it down until
now. Please let me know if this fixes things for you and if
there are any regressions; thanks.
>From a9ebe54adf7ae2620fba1f638dee9566f8ccca82 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Mon, 7 Apr 2008 00:41:44 -0700
Subject: [PATCH] git-svn: fix cloning of HTTP URLs with '+' in their path
With this, git svn clone -s http://svn.gnome.org/svn/gtk+
is successful.
Also modified the funky rename test for this, which _does_
include escaped '+' signs for HTTP URLs. SVN seems to accept
either "+" or "%2B" in filenames and directories (just not the
main URL), so I'll leave it alone for now.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
git-svn.perl | 2 +-
t/t9115-git-svn-dcommit-funky-renames.sh | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 81afb5c..d91ef7a 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3666,7 +3666,7 @@ sub escape_uri_only {
my ($uri) = @_;
my @tmp;
foreach (split m{/}, $uri) {
- s/([^\w.%-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg;
+ s/([^\w.%+-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg;
push @tmp, $_;
}
join('/', @tmp);
diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh
index 182299c..835b1dc 100755
--- a/t/t9115-git-svn-dcommit-funky-renames.sh
+++ b/t/t9115-git-svn-dcommit-funky-renames.sh
@@ -49,6 +49,16 @@ test_expect_success 'rename pretty file into ugly one' '
git svn dcommit
'
+test_expect_success 'add a file with plus signs' '
+ echo .. > +_+ &&
+ git update-index --add +_+ &&
+ git commit -m plus &&
+ mkdir gtk+ &&
+ git mv +_+ gtk+/_+_ &&
+ git commit -m plus_dir &&
+ git svn dcommit
+ '
+
stop_httpd
test_done
--
Eric Wong
next prev parent reply other threads:[~2008-04-07 8:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 18:11 git-svn: regression with funny chars in svn repo url Panagiotis Vossos
2008-04-07 8:11 ` Eric Wong [this message]
2008-04-08 21:54 ` Panagiotis Vossos
2008-05-11 0:10 ` Eric Wong
2008-05-11 0:14 ` [PATCH] git-svn: fix cloning of HTTP URLs with '+' in their path Eric Wong
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=20080407081108.GA28853@soma \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pavossos@gmail.com \
/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).