I just want a single file, called "revision", which contains the repository revision number at any given time so that when I export my repository, my application is able to see which revision it was.
How can I do this?
The problem with using normal Keyword Substitution is that $rev$
only shows the last revision in which that file changed. I haven't tried it myself, but there is a tool called svnversion
that comes with SVN that I believe you can use to get the revision number of the working copy. It's then just a case of configuring your build process to use this tool and insert the result into your revision file.
There is a good guide on how to use svnversion
(especially if you're using ANT) here: http://cameronstokes.com/2009/12/12/using-svnversion-from-ant
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With