Skip to content

Commit 24fa13c

Browse files
committed
Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn: git-svn: fix handling of even funkier branch names
2 parents 277cd4c + f4392df commit 24fa13c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

git-svn.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4025,6 +4025,7 @@ sub gs_do_switch {
40254025
}
40264026
}
40274027
$ra ||= $self;
4028+
$url_b = escape_url($url_b);
40284029
my $reporter = $ra->do_switch($rev_b, '', 1, $url_b, $editor, $pool);
40294030
my @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();
40304031
$reporter->set_path('', $rev_a, 0, @lock, $pool);

t/t9118-git-svn-funky-branch-names.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
test_description='git-svn funky branch names'
77
. ./lib-git-svn.sh
88

9+
# Abo-Uebernahme (Bug #994)
10+
scary_uri='Abo-Uebernahme%20%28Bug%20%23994%29'
11+
scary_ref='Abo-Uebernahme%20(Bug%20#994)'
12+
913
test_expect_success 'setup svnrepo' '
1014
mkdir project project/trunk project/branches project/tags &&
1115
echo foo > project/trunk/foo &&
@@ -15,6 +19,8 @@ test_expect_success 'setup svnrepo' '
1519
"$svnrepo/pr ject/branches/fun plugin" &&
1620
svn cp -m "more fun!" "$svnrepo/pr ject/branches/fun plugin" \
1721
"$svnrepo/pr ject/branches/more fun plugin!" &&
22+
svn cp -m "scary" "$svnrepo/pr ject/branches/fun plugin" \
23+
"$svnrepo/pr ject/branches/$scary_uri" &&
1824
start_httpd
1925
'
2026

@@ -23,6 +29,7 @@ test_expect_success 'test clone with funky branch names' '
2329
cd project &&
2430
git rev-parse "refs/remotes/fun%20plugin" &&
2531
git rev-parse "refs/remotes/more%20fun%20plugin!" &&
32+
git rev-parse "refs/remotes/$scary_ref" &&
2633
cd ..
2734
'
2835

@@ -35,6 +42,15 @@ test_expect_success 'test dcommit to funky branch' "
3542
cd ..
3643
"
3744

45+
test_expect_success 'test dcommit to scary branch' '
46+
cd project &&
47+
git reset --hard "refs/remotes/$scary_ref" &&
48+
echo urls are scary >> foo &&
49+
git commit -m "eep" -- foo &&
50+
git svn dcommit &&
51+
cd ..
52+
'
53+
3854
stop_httpd
3955

4056
test_done

0 commit comments

Comments
 (0)