I am wanting to display in my application current commit number. I use SVN and my code is C#.
I wonder if I can update automatically a text file WITHIN REPOSITORY so it will contain a commit number, eg, displaying it to user.
Currently I am thinking of making a post-commit hook (a shell script that receives several environment variables containing commit info) and “echo” the commit number into that text file. Is it a valid thing to do, to interfere with text files from repository on server side?
Any other means to store build number? I know SVN can modify source codes for some keywords, but then I need to commit these files to get modified. I want to be able to get that revision number updated ALWAYS, not when I commit a particular file.
If you c#-code, you use Windows, yes?! In this case, except
svn info, which output you must pre-parse for usage, you can consider using SubWCRev (part of TortoiseSVN), which transform versioned template file with SubWCRev-keywords into unversioned data file with keywords replaced by actual data from repository-info