Here’s how to use svn propset with single or multiple dependencies along with the pre-revprop-change hook setup. It was a pain in the butt at first because it just didn’t make sense, but now I get it.
If you use a GUI client, you may be able do propset subversion commands by pointing and clicking, but from the command line, it’s a little tricky.
I use –revprop -r HEAD but you can leave that out. I wish you could put that in the file.txt and not have to specify it manually. It would make my next stop of programmatic automation easier.
You will also need to copy the pre-revprop-change.tmpl that you’ll find in the repository’s hooks directory as pre-revprop-change and make it executable and add svn:externals allow an exit 0 so that commits will work with revision dependencies.
if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then
exit 0
elif [ "$ACTION" = "M" -a "$PROPNAME" = "svn:externals" ]; then
exit 0
elif [ "$ACTION" = "A" -a "$PROPNAME" = "svn:externals" ]; then
exit 0
elif [ "$ACTION" = "A" -a "$PROPNAME" = "svn:externals" ]; then
exit 0
else
echo "Only svn:log and svn:externals are allowed" >&2
exit 1
fi
$ svn propset –revprop -r HEAD subdir svn://server/repository/trunk/subdir .
1. subdir is the directory I want to get created where the svn path I check out will place all its files and directories.
2. svn://server/…subdir is the other repository and full path to the base of whatever I want checked out.
3. the . (dot) at the end is because my $PWD is the directory to start the subdir at.
$ svn propset –revprop -r HEAD -F file.txt
file.txt has the list of SVN paths and directory destinations of where to check them out under.
Once you change properties, you can view them and see which properties are set.
$ svn proplist
Properties on ‘.’:
svn:externals
$ svn propget svn:externals
subdir/dir1 svn://server/app/trunk/dir1
subdir/dir2 svn://server/app/trunk/dir2