]> Tony Duckles's Git Repositories (git.nynim.org) - svn2svn.git/blob - tests/t0102-replay-branch.sh
test-lib: test_expect_failure() expected failure is ok
[svn2svn.git] / tests / t0102-replay-branch.sh
1 #!/bin/bash
2
3 test_description='Use svnreplay to create a filtered repo with only /trunk/Module2/ProjectB 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/Module2/ProjectB"
25 svn mkdir -q -m "Add /trunk" $REPOURL/trunk
26 svn mkdir -q --parents -m "Add $OFFSET" $REPOURL$OFFSET
27
28 test_expect_success \
29 "svnreplay _repo_ref$OFFSET _repo_replay$OFFSET" \
30 "$SVNREPLAY -a \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
31
32 test_expect_success \
33 "diff-repo _repo_ref$OFFSET _repo_replay$OFFSET" \
34 "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
35
36 test_done