blob: faf9092967fff63cb0f496064d237b4c6e900f23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#!/bin/sh
test_description='check svn dumpfile importer'
. ./test-lib.sh
if ! svnadmin -h >/dev/null 2>&1
then
skip_all='skipping svn-fe tests, svn not available'
test_done
fi
svnconf=$PWD/svnconf
export svnconf
svn_cmd () {
subcommand=$1 &&
shift &&
mkdir -p "$svnconf" &&
svn "$subcommand" --config-dir "$svnconf" "$@"
}
test_dump () {
label=$1
dump=$2
test_expect_success "$dump" '
svnadmin create "$label-svn" &&
svnadmin load "$label-svn" < "$TEST_DIRECTORY/$dump" &&
svn_cmd export "file://$PWD/$label-svn" "$label-svnco" &&
git init "$label-git" &&
test-svn-fe "$TEST_DIRECTORY/$dump" >"$label.fe" &&
(
cd "$label-git" &&
git fast-import < ../"$label.fe"
) &&
(
cd "$label-svnco" &&
git init &&
git add . &&
git fetch "../$label-git" master &&
git diff --exit-code FETCH_HEAD
)
'
}
test_dump simple t9135/svn.dump
test_done
|