summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorLibravatar Eric Wong <normalperson@yhbt.net>2009-07-25 02:29:28 -0700
committerLibravatar Eric Wong <normalperson@yhbt.net>2009-07-25 04:09:44 -0700
commit884cce5bd042e67a0d2a1a9317f8435634486ad1 (patch)
tree127c1b4b6e6d599515f1d94c447c2321d9b57edc /git-svn.perl
parentt9142: stop httpd after the test (diff)
downloadtgif-884cce5bd042e67a0d2a1a9317f8435634486ad1.tar.xz
git svn: avoid escaping '/' when renaming/copying files
Timothy Schaeffer reported the following: > Git-svn has been giving me the following error for some time > when calling "git svn dcommit": > > RA layer request failed: PROPFIND request failed on > '/svn/stf/branches/dev/sw%2Fdpemu%2Finclude%2FNetCnxn.h': PROPFIND of > '/svn/stf/branches/dev/sw%2Fdpemu%2Finclude%2FNetCnxn.h': 302 Found > (https://oursvnrepo.net) at /usr/local/libexec/git-core/git-svn line 508 > > This only occurred when git detected a rename or copy. > > Following the lead into git-svn.perl, > and noticing that some of the '/'s in the path were hex-encoded > and some were not, > I changed the regex used to find chars > to hex-encode in the relative part of the path > to exclude '/'. > It works, so far. > I have included a patch. While this has previous not been a problem in my experience, newer versions of SVN may be stricter and this does not introduce regressions in t9115. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 9808597a18..fd7232cf6d 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -4005,7 +4005,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);
}