t / t9118-git-svn-funky-branch-names.shon commit Merge branch 'maint' (2fe1839)
   1#!/bin/sh
   2#
   3# Copyright (c) 2007 Eric Wong
   4#
   5
   6test_description='git-svn funky branch names'
   7. ./lib-git-svn.sh
   8
   9test_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        '
  20
  21test_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        '
  28
  29test_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        "
  37
  38stop_httpd
  39
  40test_done