Merge branch 'mz/maint-rebase-stat-config' into next
[git] / t / t9010-svn-fe.sh
1 #!/bin/sh
2
3 test_description='check svn dumpfile importer'
4
5 . ./test-lib.sh
6
7 svnconf=$PWD/svnconf
8 export svnconf
9
10 svn_cmd () {
11         subcommand=$1 &&
12         shift &&
13         mkdir -p "$svnconf" &&
14         svn "$subcommand" --config-dir "$svnconf" "$@"
15 }
16
17 test_dump () {
18         label=$1
19         dump=$2
20         test_expect_success "$dump" '
21                 svnadmin create "$label-svn" &&
22                 svnadmin load "$label-svn" < "$TEST_DIRECTORY/$dump" &&
23                 svn_cmd export "file://$PWD/$label-svn" "$label-svnco" &&
24                 git init "$label-git" &&
25                 test-svn-fe "$TEST_DIRECTORY/$dump" >"$label.fe" &&
26                 (
27                         cd "$label-git" &&
28                         git fast-import < ../"$label.fe"
29                 ) &&
30                 (
31                         cd "$label-svnco" &&
32                         git init &&
33                         git add . &&
34                         git fetch "../$label-git" master &&
35                         git diff --exit-code FETCH_HEAD
36                 )
37         '
38 }
39
40 test_dump simple t9135/svn.dump
41
42 test_done