3 # Copyright (c) 2008 Deskin Miller
6 test_description='git svn partial-rebuild tests'
9 test_expect_success 'initialize svnrepo' '
13 mkdir trunk branches tags &&
17 svn import -m "import for git-svn" . "$svnrepo" >/dev/null &&
20 svn co "$svnrepo"/trunk trunk &&
23 svn ci -m "updated trunk" &&
29 test_expect_success 'import into git' '
30 git svn init --stdlayout "$svnrepo" &&
32 git checkout remotes/trunk
35 test_expect_success 'git svn branch tests' '
37 base=$(git rev-parse HEAD:) &&
38 test $base = $(git rev-parse remotes/a:) &&
39 git svn branch -m "created branch b blah" b &&
40 test $base = $(git rev-parse remotes/b:) &&
41 test_must_fail git branch -m "no branchname" &&
42 git svn branch -n c &&
43 test_must_fail git rev-parse remotes/c &&
44 test_must_fail git svn branch a &&
45 git svn branch -t tag1 &&
46 test $base = $(git rev-parse remotes/tags/tag1:) &&
47 git svn branch --tag tag2 &&
48 test $base = $(git rev-parse remotes/tags/tag2:) &&
50 test $base = $(git rev-parse remotes/tags/tag3:) &&
51 git svn tag -m "created tag4 foo" tag4 &&
52 test $base = $(git rev-parse remotes/tags/tag4:) &&
53 test_must_fail git svn tag -m "no tagname" &&
54 git svn tag -n tag5 &&
55 test_must_fail git rev-parse remotes/tags/tag5 &&
56 test_must_fail git svn tag tag1