In our project we got a request to put the SVN root revision number (not the last modified one) into our lib headers and provide an function in the library which will give the last commit's revision number.
I have already found this question so I know about the $Id$ or $Revision$. What I do not know if it is possible to force SVN (without additional scripts) to update some specific files (headers and an .cpp) after every commit.
E.g.: I modify a .cpp file and I commit it, but after the commit not only the modified .cpp file will be updated but the lib header files and a small .cpp file too with the commit's revision number.
The purpose of this request is to provide the possibility to the our library users to check the revision number of the code even when they are copied the files into places where the SVN is not reachable.
Update: Compiling will be done in the environment where the SVN is not available.
.cppand.hwill be at least Revision+1 for real sources - and can be more than +1, if post-commit hook will not block commit during it's execution).cppand.hin repository. Read about SubWCRev, part of TortoiseSVN (linux-equivalent with added value also exist: SvnRev) and see at Keyword usage example, note recommendation in "Tip". SvnRev workflow is slightly different - it doesn't process template, but build headers, which must be included in approppriate place