summaryrefslogtreecommitdiff
path: root/perl/Git/SVN/Editor.pm
diff options
context:
space:
mode:
authorKazutoshi Satoda <k_satoda@f2.dion.ne.jp>2016-02-08 15:21:02 (GMT)
committerEric Wong <normalperson@yhbt.net>2016-02-22 02:29:36 (GMT)
commit1b42f45255de5844b7fe8d0c60fea74cd5b9f954 (patch)
tree20547e8eaa53f091b31e93e6de03a1b8f08426e8 /perl/Git/SVN/Editor.pm
parent40f47448a91666be8e2befe521525f3f507344f9 (diff)
downloadgit-1b42f45255de5844b7fe8d0c60fea74cd5b9f954.zip
git-1b42f45255de5844b7fe8d0c60fea74cd5b9f954.tar.gz
git-1b42f45255de5844b7fe8d0c60fea74cd5b9f954.tar.bz2
git-svn: apply "svn.pathnameencoding" before URL encoding
The conversion from "svn.pathnameencoding" to UTF-8 should be applied first, and then URL encoding should be applied on the resulting UTF-8 path. The reversed order of these transforms (used before this fix) makes non-UTF-8 URL which causes error from Subversion such as "Filesystem has no item: '...' path not found" when sending a rename (or a copy) from non-ASCII path. [ew: t9115 test case added (requires SVN_HTTPD_PORT set to test), squash LC_ALL=$a_utf8_locale export from Kazutoshi for Cygwin] Signed-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp> Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'perl/Git/SVN/Editor.pm')
-rw-r--r--perl/Git/SVN/Editor.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl/Git/SVN/Editor.pm b/perl/Git/SVN/Editor.pm
index d9d9bdf..4c4199a 100644
--- a/perl/Git/SVN/Editor.pm
+++ b/perl/Git/SVN/Editor.pm
@@ -144,11 +144,12 @@ sub repo_path {
sub url_path {
my ($self, $path) = @_;
+ $path = $self->repo_path($path);
if ($self->{url} =~ m#^https?://#) {
# characters are taken from subversion/libsvn_subr/path.c
$path =~ s#([^~a-zA-Z0-9_./!$&'()*+,-])#sprintf("%%%02X",ord($1))#eg;
}
- $self->{url} . '/' . $self->repo_path($path);
+ $self->{url} . '/' . $path;
}
sub rmdirs {