Merge branch 'es/worktree-repair-copied' into cw/worktrees-relative
[git/gitster.git] / t / t9127-git-svn-partial-rebuild.sh
blob97f495bd49b48a159aa7e39596b42cbbd65dbdf3
1 #!/bin/sh
3 # Copyright (c) 2008 Deskin Miller
6 test_description='git svn partial-rebuild tests'
8 . ./lib-git-svn.sh
10 test_expect_success 'initialize svnrepo' '
11 mkdir import &&
13 (cd import &&
14 mkdir trunk branches tags &&
15 (cd trunk &&
16 echo foo > foo
17 ) &&
18 svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null &&
19 svn_cmd copy "$svnrepo"/trunk "$svnrepo"/branches/a \
20 -m "created branch a"
21 ) &&
22 rm -rf import &&
23 svn_cmd co "$svnrepo"/trunk trunk &&
24 (cd trunk &&
25 echo bar >> foo &&
26 svn_cmd ci -m "updated trunk"
27 ) &&
28 svn_cmd co "$svnrepo"/branches/a a &&
29 (cd a &&
30 echo baz >> a &&
31 svn_cmd add a &&
32 svn_cmd ci -m "updated a"
33 ) &&
34 git svn init --stdlayout "$svnrepo"
38 test_expect_success 'import an early SVN revision into git' '
39 git svn fetch -r1:2
42 test_expect_success 'make full git mirror of SVN' '
43 mkdir mirror &&
45 (cd mirror &&
46 git init &&
47 git svn init --stdlayout "$svnrepo" &&
48 git svn fetch
53 test_expect_success 'fetch from git mirror and partial-rebuild' '
54 git config --add remote.origin.url "file://$PWD/mirror/.git" &&
55 git config --add remote.origin.fetch refs/remotes/*:refs/remotes/* &&
56 git fetch origin &&
57 git svn fetch
60 test_done