What is the best way (if any) to modify a particular file under our repository within a post_commit hook?
eg: I want to append a checksum line to a somefile.conf file
What is the best way (if any) to modify a particular file under our repository within a post_commit hook?
eg: I want to append a checksum line to a somefile.conf file
Don't do this in a hook -- do it in a separate change, that other users of that branch can then pull down into their working copy. It doesn't need to be more complicated than this (in pseudocode):
It's not uncommon for build scripts (running under cron or triggered by a Makefile) to make periodic revisions to a repository, for example regenerating files based on other files. Sometimes these are checked into the repository and sometimes they aren't, depending on who consumes these files and how.
There's no problem with doing what you suggest in a post commit hook, but do be aware that it will add a new revision to the repository and that the original committer will need to do an update before they can see the changes the script made. It will also slow down the commit as the post commit runs before returning from the commit operation.
You might want to read this chapter of the SVN book. At the end of it, there is the following warning in a nice red box: