0

Our SVN commits are turned off at various points during the week so QA can do a clean cut from our build system. They usually send an email out per branch when they turn off commits and again when they turn commits on.

Is there any way to have a script that checks if I am allowed to commit to a certain branch?

Kenoyer130
  • 6,874
  • 9
  • 51
  • 73
  • 3
    How are the commits blocked ? per access rights ? per commit hook ? And why don't you just simply read your mails or write some tool witch does for you ;-) – A4L May 10 '13 at 15:49
  • 3
    Turning commits off is really a horrible idea. The QA team should decide which revision they want to test and checkout that revision, without preventing developers to use SVN and commit newer revisions. – JB Nizet May 10 '13 at 16:21
  • I believe they are blocked per commit hook. – Kenoyer130 May 10 '13 at 16:48
  • its more for the build process. Each commit triggers a new build which takes 30-40 minutes and QA would never be able to get a cut. – Kenoyer130 May 10 '13 at 16:49
  • @Kenoyer130 a pre-commit hook is just a script witch the svn server executes before each commit and witch exit with 0 to say allow or 1 to , deny. So need to know how the hook it does its works. May it is just a trivial as reading a properties file of the format `=` where `locked` may be `true` or `false`. So you can read that file by yourself - assumed it is accessible for you (on a share for example) - and evaluate it for the branch you want. – A4L May 12 '13 at 18:27
  • 1
    And as JB said, QA should [checkout a revision](http://stackoverflow.com/questions/1429034/checkout-a-specific-revision-from-subversion-from-command-line) and build from that source base, that is what this option is there for. svn can handle this! – A4L May 12 '13 at 18:32

0 Answers0