]> Tony Duckles's Git Repositories (git.nynim.org) - svn2svn.git/blob - tests/t0101-replay-trunk.sh
test-lib: test_expect_failure() expected failure is ok
[svn2svn.git] / tests / t0101-replay-trunk.sh
1 #!/bin/bash
2
3 test_description='Use svnreplay to create a filtered repo with only /trunk history
4 '
5 . ./test-lib.sh
6
7 SVNREPLAY="../svnreplay.py"
8 PWD=$(pwd)
9 PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
10 REPO="$PWD/_repo_replay"
11 REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
12
13 # Clean-up
14 rm -rf "$REPO" _wc_target
15
16 # Init repo
17 svnadmin create "$REPO"
18 # Add pre-revprop-change hook script
19 cp ../hook-examples/pre-revprop-change_example.txt "$REPO/hooks/pre-revprop-change"
20 chmod 755 "$REPO/hooks/pre-revprop-change"
21
22
23 ################################################################
24 OFFSET="/trunk"
25 svn mkdir -q -m "Add $OFFSET" $REPOURL$OFFSET
26
27 test_expect_success \
28 "svnreplay _repo_ref$OFFSET _repo_replay$OFFSET" \
29 "$SVNREPLAY -a \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
30
31 test_expect_success \
32 "diff-repo _repo_ref$OFFSET _repo_replay$OFFSET" \
33 "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
34
35 test_done