]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9127-git-svn-partial-rebuild.sh
path.c: don't call the match function without value in trie_find()
[thirdparty/git.git] / t / t9127-git-svn-partial-rebuild.sh
CommitLineData
9747deb7
DM
1#!/bin/sh
2#
3# Copyright (c) 2008 Deskin Miller
4#
5
6test_description='git svn partial-rebuild tests'
7. ./lib-git-svn.sh
8
9test_expect_success 'initialize svnrepo' '
10 mkdir import &&
11 (
fd4ec4f2 12 (cd import &&
9747deb7 13 mkdir trunk branches tags &&
fd4ec4f2
JL
14 (cd trunk &&
15 echo foo > foo
16 ) &&
da083d68
ER
17 svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null &&
18 svn_cmd copy "$svnrepo"/trunk "$svnrepo"/branches/a \
fd4ec4f2
JL
19 -m "created branch a"
20 ) &&
9747deb7 21 rm -rf import &&
da083d68 22 svn_cmd co "$svnrepo"/trunk trunk &&
fd4ec4f2 23 (cd trunk &&
9747deb7 24 echo bar >> foo &&
fd4ec4f2
JL
25 svn_cmd ci -m "updated trunk"
26 ) &&
da083d68 27 svn_cmd co "$svnrepo"/branches/a a &&
fd4ec4f2 28 (cd a &&
9747deb7 29 echo baz >> a &&
da083d68 30 svn_cmd add a &&
fd4ec4f2
JL
31 svn_cmd ci -m "updated a"
32 ) &&
9747deb7
DM
33 git svn init --stdlayout "$svnrepo"
34 )
35'
36
37test_expect_success 'import an early SVN revision into git' '
38 git svn fetch -r1:2
39'
40
41test_expect_success 'make full git mirror of SVN' '
42 mkdir mirror &&
43 (
fd4ec4f2 44 (cd mirror &&
9747deb7
DM
45 git init &&
46 git svn init --stdlayout "$svnrepo" &&
fd4ec4f2
JL
47 git svn fetch
48 )
9747deb7
DM
49 )
50'
51
2beec897 52test_expect_success 'fetch from git mirror and partial-rebuild' '
9747deb7
DM
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
57'
58
59test_done