Reputation: 115
I want to get only specific files using svn command line
utlity.
I've a batch script that gets only specific files from vss
, using ss
tool of vss
.
In vss
the command is:
ss get *.c
I need similar functionality with svn
command utility.
How can I start ?
Upvotes: 0
Views: 1762
Reputation: 2430
You can try something like, get the file list which are matching some extension, like .txt or .c.
svn list -R http://svn/url/till/the/path/you/need/ | grep ".extension"
Then for every line in the output of the above command use svn export
to get the files in your local machine.
Edit:
repository=
http://svn/url/till/the/path/need/
$target_directory=some path in machine
for line in
svn list -R http://svn/url/till/the/path/need/ | grep ".extension"
dofilename=`echo "$line" |sed "s|$repository||g"` if [ ! -d $target_directory$filename ]; then directory=`dirname $filename` mkdir -p $target_directory$directory svn export --force -r HEAD $repository$line $target_directory$filename --username abc --password password123
fi
done
Upvotes: 1