Search property in subversion
To find files using their properties I've prepared script havesvnproperty.bash:
#!/bin/bash
if [ $# -lt 1 ] ; then
echo "Check if file has value in property \
'myown:tags'."
echo " "
echo "No enouh parameters"
echo " "
echo "Example:"
echo "$0 path/to/file some_tag"
echo "find /home/repository -path '*/.svn' -prune -o \
-exec $0 \\{\\} some_tag \\;"
exit 1
fi
filename=$1
propval=$2
tags=`svn propget myown:tags "$filename"`
ma=1
for x in $tags ; do
if [ $x == $propval ] ; then
ma=0
fi
done
if [ $ma -eq 0 ] ; then
echo "File $filename is tagged $propval"
fi
exit $ma
later you can search using find command, ie:
find /home/jaqb/myrepo -path '*/.svn' -prune -o \
-exec havesvnproperty.bash \{\} some_value \;
Comments
Log in or create a user account to comment.