Code

Merge branch 'master' of git://repo.or.cz/git-gui
[git.git] / t / t9118-git-svn-funky-branch-names.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2007 Eric Wong
4 #
6 test_description='git-svn funky branch names'
7 . ./lib-git-svn.sh
9 test_expect_success 'setup svnrepo' "
10         mkdir project project/trunk project/branches project/tags &&
11         echo foo > project/trunk/foo &&
12         svn import -m '$test_description' project \"$svnrepo/pr ject\" &&
13         rm -rf project &&
14         svn cp -m 'fun' \"$svnrepo/pr ject/trunk\" \
15                         \"$svnrepo/pr ject/branches/fun plugin\" &&
16         svn cp -m 'more fun!' \"$svnrepo/pr ject/branches/fun plugin\" \
17                               \"$svnrepo/pr ject/branches/more fun plugin!\" &&
18         start_httpd
19         "
21 test_expect_success 'test clone with funky branch names' "
22         git svn clone -s \"$svnrepo/pr ject\" project &&
23         cd project &&
24                 git rev-parse 'refs/remotes/fun%20plugin' &&
25                 git rev-parse 'refs/remotes/more%20fun%20plugin!' &&
26         cd ..
27         "
29 test_expect_success 'test dcommit to funky branch' "
30         cd project &&
31         git reset --hard 'refs/remotes/more%20fun%20plugin!' &&
32         echo hello >> foo &&
33         git commit -m 'hello' -- foo &&
34         git svn dcommit &&
35         cd ..
36         "
38 stop_httpd
40 test_done