As alexander said, one way is to update the revision as part of the build process.
One method of doing this is to take your release builds from an automated build process triggered from your version control checkin, by using a tool such as buildbot.
A scenario might be to trigger the automated build using the post-hook script on your subversion repository.
This causes your buildbot to update to the most recently checked in revision.
Your build script (eg. Makefile) would use 'svnversion' (or 'svn info' and grep) to read the repository revision and write it into a header file before the build takes place.
After the successful build, automatically check this file back into the repository with a suitable comment about the release version.