File tree Expand file tree Collapse file tree 3 files changed +42
-4
lines changed
Expand file tree Collapse file tree 3 files changed +42
-4
lines changed Original file line number Diff line number Diff line change @@ -3673,7 +3673,7 @@ sub escape_uri_only {
36733673 my ($uri ) = @_ ;
36743674 my @tmp ;
36753675 foreach (split m { /} , $uri ) {
3676- s / ([^\w .%-]|%(?![a-fA-F0-9]{2}))/ sprintf("%%%02X",ord($1 ))/ eg ;
3676+ s / ([^\w .%+ -]|%(?![a-fA-F0-9]{2}))/ sprintf("%%%02X",ord($1 ))/ eg ;
36773677 push @tmp , $_ ;
36783678 }
36793679 join (' /' , @tmp );
Original file line number Diff line number Diff line change @@ -73,11 +73,16 @@ for d in \
7373done
7474
7575start_httpd () {
76+ repo_base_path=" $1 "
7677 if test -z " $SVN_HTTPD_PORT "
7778 then
7879 echo >&2 ' SVN_HTTPD_PORT is not defined!'
7980 return
8081 fi
82+ if test -z " $repo_base_path "
83+ then
84+ repo_base_path=svn
85+ fi
8186
8287 mkdir " $GIT_DIR " /logs
8388
@@ -90,13 +95,13 @@ LockFile logs/accept.lock
9095Listen 127.0.0.1:$SVN_HTTPD_PORT
9196LoadModule dav_module $SVN_HTTPD_MODULE_PATH /mod_dav.so
9297LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH /mod_dav_svn.so
93- <Location /svn >
98+ <Location /$repo_base_path >
9499 DAV svn
95100 SVNPath $rawsvnrepo
96101</Location>
97102EOF
98103 " $SVN_HTTPD_PATH " -f " $GIT_DIR " /httpd.conf -k start
99- svnrepo=http://127.0.0.1:$SVN_HTTPD_PORT /svn
104+ svnrepo=" http://127.0.0.1:$SVN_HTTPD_PORT /$repo_base_path "
100105}
101106
102107stop_httpd () {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ test_description='git-svn dcommit can commit renames of files with ugly names'
99
1010test_expect_success ' load repository with strange names' "
1111 svnadmin load -q $rawsvnrepo < ../t9115/funky-names.dump &&
12- start_httpd
12+ start_httpd gtk+
1313 "
1414
1515test_expect_success ' init and fetch repository' "
@@ -49,6 +49,39 @@ test_expect_success 'rename pretty file into ugly one' '
4949 git svn dcommit
5050 '
5151
52+ test_expect_success ' add a file with plus signs' '
53+ echo .. > +_+ &&
54+ git update-index --add +_+ &&
55+ git commit -m plus &&
56+ mkdir gtk+ &&
57+ git mv +_+ gtk+/_+_ &&
58+ git commit -m plus_dir &&
59+ git svn dcommit
60+ '
61+
62+ test_expect_success ' clone the repository to test rebase' "
63+ git svn clone $svnrepo test-rebase &&
64+ cd test-rebase &&
65+ echo test-rebase > test-rebase &&
66+ git add test-rebase &&
67+ git commit -m test-rebase &&
68+ cd ..
69+ "
70+
71+ test_expect_success ' make a commit to test rebase' "
72+ echo test-rebase-main > test-rebase-main &&
73+ git add test-rebase-main &&
74+ git commit -m test-rebase-main &&
75+ git svn dcommit
76+ "
77+
78+ test_expect_success ' git-svn rebase works inside a fresh-cloned repository' "
79+ cd test-rebase &&
80+ git svn rebase &&
81+ test -e test-rebase-main &&
82+ test -e test-rebase
83+ "
84+
5285stop_httpd
5386
5487test_done
You can’t perform that action at this time.
0 commit comments