Skip to content

Commit b3bf96d

Browse files
Eric Wonggitster
authored andcommitted
git-svn: test for creating new directories over svn://
As reported by Matthieu Moy, this is causing svnserve to terminate connections, because it segfaults. This test is disabled by default and can be enabled by setting SVNSERVE_PORT to an unbound (for 127.0.0.1) TCP port in the environment (in addition to SVN_TESTS=1). I'm not comfortable with having a test start a daemon by default and take up a port that could potentially stay running if the test failed. Signed-off-by: Eric Wong <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b54a901 commit b3bf96d

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

t/t9113-git-svn-dcommit-new-file.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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.
10+
test -z "$SVNSERVE_PORT" && exit 0
11+
12+
test_description='git-svn dcommit new files over svn:// test'
13+
14+
. ./lib-git-svn.sh
15+
16+
start_svnserve () {
17+
svnserve --listen-port $SVNSERVE_PORT \
18+
--root $rawsvnrepo \
19+
--listen-once \
20+
--listen-host 127.0.0.1 &
21+
}
22+
23+
test_expect_success 'start tracking an empty repo' "
24+
svn mkdir -m 'empty dir' $svnrepo/empty-dir &&
25+
echo anon-access = write >> $rawsvnrepo/conf/svnserve.conf &&
26+
start_svnserve &&
27+
git svn init svn://127.0.0.1:$SVNSERVE_PORT &&
28+
git svn fetch
29+
"
30+
31+
test_expect_success 'create files in new directory with dcommit' "
32+
mkdir git-new-dir &&
33+
echo hello > git-new-dir/world &&
34+
git update-index --add git-new-dir/world &&
35+
git commit -m hello &&
36+
start_svnserve &&
37+
git svn dcommit
38+
"
39+
40+
test_done

0 commit comments

Comments
 (0)