Debian Codegraph @

debian/tests/hgsubversion

raw
1 #!/bin/sh
2
3 # This actually tests that hgsubversion is not broken and it really
4 # belongs in the hgsubversion package (it's there). I'm copying it
5 # here because that way I can test if a new version of mercurial
6 # breaks hgsubversion and update Breaks accordingly. There's probably
7 # a better way of doing this.
8
9 set -e
10
11 SVN_ROOT=$(mktemp --tmpdir -d hgsubversion.XXXXX)
12 mkdir -p $SVN_ROOT
13
14 PID_FILE=/tmp/svnmock.pid
15
16 # Create a local svn server with an empty repo
17 svnadmin create $SVN_ROOT/celesteville
18 cat > $SVN_ROOT/celesteville/conf/svnserve.conf << EOF
19 [general]
20 anon-access = write
21 EOF
22 svnserve -d --pid-file $PID_FILE -r $SVN_ROOT
23
24 # Put some content in the repository
25 svn co svn://127.0.0.1/celesteville
26 cd celesteville
27 mkdir trunk tags branches
28 svn add trunk tags branches
29 svn commit -m "Initial commit"
30 echo Cornelius > trunk/people
31 svn add trunk/people
32 svn commit -m "Add people"
33 cd ..
34 rm -rf celesteville
35
36 # Now test hgsubversion
37 hg --config extensions.hgsubversion= clone svn://127.0.0.1/celesteville
38 cd celesteville
39 echo Arthur >> people
40 hg commit -u "Babar <[email protected]>" -m "Add more people"
41 hg --config extensions.hgsubversion= push
42 cd ..
43
44 # Kill the server and cleanup
45 kill $(cat $PID_FILE)
46 rm -rf $SVN_ROOT
47
48 rm -r celesteville