Git 1.7.0.7
[git/mingw/4msysgit/kblees.git] / t / t9127-git-svn-partial-rebuild.sh
blob4aab8ecc142d9719fd83b064445fa297cc10a520
1 #!/bin/sh
3 # Copyright (c) 2008 Deskin Miller
6 test_description='git svn partial-rebuild tests'
7 . ./lib-git-svn.sh
9 test_expect_success 'initialize svnrepo' '
10 mkdir import &&
12 cd import &&
13 mkdir trunk branches tags &&
14 cd trunk &&
15 echo foo > foo &&
16 cd .. &&
17 svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null &&
18 svn_cmd copy "$svnrepo"/trunk "$svnrepo"/branches/a \
19 -m "created branch a" &&
20 cd .. &&
21 rm -rf import &&
22 svn_cmd co "$svnrepo"/trunk trunk &&
23 cd trunk &&
24 echo bar >> foo &&
25 svn_cmd ci -m "updated trunk" &&
26 cd .. &&
27 svn_cmd co "$svnrepo"/branches/a a &&
28 cd a &&
29 echo baz >> a &&
30 svn_cmd add a &&
31 svn_cmd ci -m "updated a" &&
32 cd .. &&
33 git svn init --stdlayout "$svnrepo"
37 test_expect_success 'import an early SVN revision into git' '
38 git svn fetch -r1:2
41 test_expect_success 'make full git mirror of SVN' '
42 mkdir mirror &&
44 cd mirror &&
45 git init &&
46 git svn init --stdlayout "$svnrepo" &&
47 git svn fetch &&
48 cd ..
52 test_expect_success 'fetch from git mirror and partial-rebuild' '
53 git config --add remote.origin.url "file://$PWD/mirror/.git" &&
54 git config --add remote.origin.fetch refs/remotes/*:refs/remotes/* &&
55 git fetch origin &&
56 git svn fetch
59 test_done