Technically, you can't be sure after doing the export, because another commit might have happened just in-between. Practically, you can get the information with svn info <URL>
. You could of course do the svn info
first, extract the revision and export that revision to make sure both correspond.
If you do a checkout instead of an export, the information is available through svn info <path>
.
Another way to do that is to use keywords in one of your exported file (let's call it script.h), like this:
#define VERSION_STRING "r$Revision$"
// ... rest of the file
If you give the svn:keywords property to your file (and commit it), the $Revision$ will be substituted at checkout or export:
svn propset svn:keywords "Revision" script.h
(there are other substitutions, check the SVN documentation for further details)