Merge branch 'ek/maint-1.6.1-filter-branch-bare' into maint-1.6.1
[git/jrn.git] / t / t9118-git-svn-funky-branch-names.sh
blob7a7c12868758d6e3bd9d1f8ec4fe32c0663115f4
1 #!/bin/sh
3 # Copyright (c) 2007 Eric Wong
6 test_description='git svn funky branch names'
7 . ./lib-git-svn.sh
9 # Abo-Uebernahme (Bug #994)
10 scary_uri='Abo-Uebernahme%20%28Bug%20%23994%29'
11 scary_ref='Abo-Uebernahme%20(Bug%20#994)'
13 test_expect_success 'setup svnrepo' '
14 mkdir project project/trunk project/branches project/tags &&
15 echo foo > project/trunk/foo &&
16 svn import -m "$test_description" project "$svnrepo/pr ject" &&
17 rm -rf project &&
18 svn cp -m "fun" "$svnrepo/pr ject/trunk" \
19 "$svnrepo/pr ject/branches/fun plugin" &&
20 svn cp -m "more fun!" "$svnrepo/pr ject/branches/fun plugin" \
21 "$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" &&
24 start_httpd
27 test_expect_success 'test clone with funky branch names' '
28 git svn clone -s "$svnrepo/pr ject" project &&
29 cd project &&
30 git rev-parse "refs/remotes/fun%20plugin" &&
31 git rev-parse "refs/remotes/more%20fun%20plugin!" &&
32 git rev-parse "refs/remotes/$scary_ref" &&
33 cd ..
36 test_expect_success 'test dcommit to funky branch' "
37 cd project &&
38 git reset --hard 'refs/remotes/more%20fun%20plugin!' &&
39 echo hello >> foo &&
40 git commit -m 'hello' -- foo &&
41 git svn dcommit &&
42 cd ..
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 ..
54 stop_httpd
56 test_done