]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9118-git-svn-funky-branch-names.sh
git-svn testsuite: use standard configuration for Subversion tools
[thirdparty/git.git] / t / t9118-git-svn-funky-branch-names.sh
CommitLineData
cfbe7ab3
EW
1#!/bin/sh
2#
3# Copyright (c) 2007 Eric Wong
4#
5
1364ff27 6test_description='git svn funky branch names'
cfbe7ab3
EW
7. ./lib-git-svn.sh
8
f4392df4
EW
9# Abo-Uebernahme (Bug #994)
10scary_uri='Abo-Uebernahme%20%28Bug%20%23994%29'
11scary_ref='Abo-Uebernahme%20(Bug%20#994)'
12
f69e836f 13test_expect_success 'setup svnrepo' '
cfbe7ab3
EW
14 mkdir project project/trunk project/branches project/tags &&
15 echo foo > project/trunk/foo &&
da083d68 16 svn_cmd import -m "$test_description" project "$svnrepo/pr ject" &&
cfbe7ab3 17 rm -rf project &&
da083d68 18 svn_cmd cp -m "fun" "$svnrepo/pr ject/trunk" \
f69e836f 19 "$svnrepo/pr ject/branches/fun plugin" &&
da083d68 20 svn_cmd cp -m "more fun!" "$svnrepo/pr ject/branches/fun plugin" \
f69e836f 21 "$svnrepo/pr ject/branches/more fun plugin!" &&
da083d68 22 svn_cmd cp -m "scary" "$svnrepo/pr ject/branches/fun plugin" \
f4392df4 23 "$svnrepo/pr ject/branches/$scary_uri" &&
cfbe7ab3 24 start_httpd
f69e836f 25 '
cfbe7ab3 26
f69e836f
BD
27test_expect_success 'test clone with funky branch names' '
28 git svn clone -s "$svnrepo/pr ject" project &&
cfbe7ab3 29 cd project &&
f69e836f
BD
30 git rev-parse "refs/remotes/fun%20plugin" &&
31 git rev-parse "refs/remotes/more%20fun%20plugin!" &&
f4392df4 32 git rev-parse "refs/remotes/$scary_ref" &&
cfbe7ab3 33 cd ..
f69e836f 34 '
cfbe7ab3
EW
35
36test_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 ..
43 "
44
f4392df4
EW
45test_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
cfbe7ab3
EW
54stop_httpd
55
56test_done