Here’s a quick one-liner you can use in Bash to get the latest subversion revision number from your present working directory:
sed -n '4p' .svn/entries
Use backticks to assign it to a local variable you can use when making a build (say, a zip archive of a website or other type of artifact you might want to create):
version=`sed -n '4p' .svn/entries`