]> Tony Duckles's Git Repositories (git.nynim.org) - svn2svn.git/blob - tests/t0103-replay-beforecommit.sh
Misc documentation tweaks
[svn2svn.git] / tests / t0103-replay-beforecommit.sh
1 #!/bin/bash
2
3 test_description='Use svnreplay along with --pre-commit to create a modified filtered repo with only /trunk/Module2/ProjectB history
4 '
5 . ./test-lib.sh
6 . ./replay-lib.sh
7
8 SVNREPLAY="../svnreplay.py"
9 PWD=${TEST_DIRECTORY:-.}
10 PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
11 REPO="$PWD/_repo_replay"
12 REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
13
14 init_replay_repo "$REPO"
15 rm -rf _wc_target
16
17 ################################################################
18 OFFSET="/trunk/Module2/ProjectB"
19 svn mkdir -q -m "Add /trunk" $REPOURL/trunk
20 svn mkdir -q --parents -m "Add $OFFSET" $REPOURL$OFFSET
21
22 test_expect_success \
23 "svnreplay --pre-commit _repo_ref$OFFSET _repo_replay$OFFSET" \
24 "$SVNREPLAY -av --pre-commit=\"$PWD/t0103/before-commit.sh\" \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
25
26 test_expect_failure \
27 "svnreplay --pre-commit _repo_ref$OFFSET _repo_replay$OFFSET (verify-all)" \
28 "$SVNREPLAY -avcX --pre-commit=\"$PWD/t0103/before-commit.sh\" \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
29
30 test_expect_failure \
31 "diff-repo _repo_ref$OFFSET _repo_replay$OFFSET" \
32 "./diff-repo.sh \"$PWDURL/_repo_ref$OFFSET\" \"$PWDURL/_repo_replay$OFFSET\""
33
34 #rm -rf "$REPO" _wc_target
35 test_done