Section 12.7. Enforcing Policies


12.7. Enforcing Policies

In a perfect world, there is no need to enforce policies, because every developer would follow every policy as close to the letter as prudent, but no closer. Of course, we don't live in a perfect world, and even the best developers fail to follow policy occasionally. There are, of course, many established methods for enforcing policies, such as banning or firing (depending on the nature of the project), as well as a number of lesser punishments. I won't go into any of those methods in any detail here. Their use is well beyond the scope of this book. However, there are some ways in which you can use Subversion (along with some external scripts) to self-enforce some of these policies to varying degrees.

  • Use pre-commit hook scripts to parse log files and ensure that all of the necessary information has been entered.

  • Similarly, use pre-commit hook scripts to check for the existence of properties, and ensure that they contain valid values.

  • Set up read/write permissions to ensure that branches and tags are created by the right people, and that tags are not modified.

  • Use properties to indicate the validity of actions. For instance, if QA testers sign off on a file or directory by setting a value in a property, you can use a pre-commit hook script to check for the sign-off before allowing tester branches to be merged into the main development branch.



    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    ISBN: 131855182
    EAN: N/A
    Year: 2005
    Pages: 132

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net