]>
Commit | Line | Data |
---|---|---|
b3bf96d4 EW |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2007 Eric Wong | |
4 | # | |
5 | ||
6 | # Don't run this test by default unless the user really wants it | |
7 | # I don't like the idea of taking a port and possibly leaving a | |
8 | # daemon running on a users system if the test fails. | |
9 | # Not all git users will need to interact with SVN. | |
b3bf96d4 | 10 | |
1364ff27 | 11 | test_description='git svn dcommit new files over svn:// test' |
b3bf96d4 EW |
12 | |
13 | . ./lib-git-svn.sh | |
14 | ||
c6955fec RJ |
15 | if test -z "$SVNSERVE_PORT" |
16 | then | |
17 | say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)' | |
18 | test_done | |
19 | exit | |
20 | fi | |
21 | ||
b3bf96d4 EW |
22 | start_svnserve () { |
23 | svnserve --listen-port $SVNSERVE_PORT \ | |
f69e836f | 24 | --root "$rawsvnrepo" \ |
b3bf96d4 EW |
25 | --listen-once \ |
26 | --listen-host 127.0.0.1 & | |
27 | } | |
28 | ||
f69e836f BD |
29 | test_expect_success 'start tracking an empty repo' ' |
30 | svn mkdir -m "empty dir" "$svnrepo"/empty-dir && | |
fba5279d | 31 | echo "[general]" > "$rawsvnrepo"/conf/svnserve.conf && |
f69e836f | 32 | echo anon-access = write >> "$rawsvnrepo"/conf/svnserve.conf && |
b3bf96d4 EW |
33 | start_svnserve && |
34 | git svn init svn://127.0.0.1:$SVNSERVE_PORT && | |
35 | git svn fetch | |
f69e836f | 36 | ' |
b3bf96d4 EW |
37 | |
38 | test_expect_success 'create files in new directory with dcommit' " | |
39 | mkdir git-new-dir && | |
40 | echo hello > git-new-dir/world && | |
41 | git update-index --add git-new-dir/world && | |
42 | git commit -m hello && | |
43 | start_svnserve && | |
44 | git svn dcommit | |
45 | " | |
46 | ||
47 | test_done |