]> Tony Duckles's Git Repositories (git.nynim.org) - svn2svn.git/blob - tests/make-replay-repo.sh
Introduce 'svnancest' utility
[svn2svn.git] / tests / make-replay-repo.sh
1 #!/bin/bash
2 # Use svnreplay to create a filtered repo with only /trunk history
3
4 PWD=$(pwd)
5 PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g')
6 REPO="$PWD/_repo_replay"
7 REPOURL=$(echo "file://$REPO" | sed 's/\ /%20/g')
8
9 # Clean-up
10 echo "Cleaning-up..."
11 rm -rf "$REPO" _wc_target
12
13 # Init repo
14 echo "Creating _repo_replay..."
15 svnadmin create "$REPO"
16 # Add pre-revprop-change hook script
17 cp ../hook-examples/pre-revprop-change_example.txt "$REPO/hooks/pre-revprop-change"
18 chmod 755 "$REPO/hooks/pre-revprop-change"
19 echo ""
20
21 ## svnreplay /
22 #../svnreplay.py $* $PWDURL/_repo_ref $PWDURL/_repo_replay
23
24 # svnreplay /trunk
25 svn mkdir -q -m "Add /trunk" $REPOURL/trunk
26 ../svnreplay.py $* $PWDURL/_repo_ref/trunk $PWDURL/_repo_replay/trunk
27
28 ## svnreplay /trunk/Module2/ProjectB
29 #svn mkdir -q -m "Add /trunk" $REPOURL/trunk
30 #svn mkdir -q --parents -m "Add /trunk/Module2/ProjectB" $REPOURL/trunk/Module2/ProjectB
31 #../svnreplay.py $* $PWDURL/_repo_ref/trunk/Module2/ProjectB $PWDURL/_repo_replay/trunk/Module2/ProjectB