2

Probably duplicate of

I'm looking for a way to update a file (let's say lastbuild.txt) with the last SVN revision number when I commit. How can I do that ?

thank you :)

Community
  • 1
  • 1
PapelPincel
  • 4,255
  • 6
  • 39
  • 49
  • you cant modify files under version control with a post commit hook. See http://stackoverflow.com/questions/650168/post-commit-hook-to-update-a-file-under-version The only option is to do it with a build script. – Gabriel Solomon Oct 20 '09 at 08:54

3 Answers3

1

SVN supports hooks - scripts or programs that get called on certain actions. You may set a post-commit hook that will update file for you.

Read more on hooks here.

elder_george
  • 7,849
  • 24
  • 31
1

If the file is under versioning you can use svn:keywords it's way easier than hooks.

http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html

marcob
  • 1,003
  • 2
  • 11
  • 23
0

Check out the following documentation:

http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks