Re: [dev] Subversion precommit hook

2008-10-21 Thread Mathias Bauer
Hi all, Jens-Heiner Rechtien wrote: Hi Bjoern, there was no need for crucifying yourself, server side we are python only. Actually we have no perl bindings installed. I think we need to be a bit carefull with pre-commit hooks. Other than post-commit hooks they do influence the user

[dev] Subversion precommit hook

2008-10-20 Thread bjoern michaelsen - Sun Microsystems - Hamburg Germany
Hi list, since we now have subversion, we might as well use the new features it provides. I wrote a precommit hook on the weekend that does some precommit sanity checks: - It rejects commits changing files in a cws and outside of it (thus hopefully preventing some accidental commits to a

Re: [dev] Subversion precommit hook

2008-10-20 Thread Rene Engelhard
bjoern michaelsen - Sun Microsystems - Hamburg Germany wrote: Hi list, since we now have subversion, we might as well use the new features it provides. I wrote a precommit hook on the weekend that does some precommit sanity checks: - It rejects commits changing files in a cws and outside

Re: [dev] Subversion precommit hook

2008-10-20 Thread bjoern michaelsen - Sun Microsystems - Hamburg Germany
On 10/20/08 12:56, Frank Schönheit - Sun Microsystems Germany wrote: ... modules ... Not sure this is needed. AFAIK it is (at least in CVS times it was) necessary to do other things for adding a new module (announcement to releng etc.), so just preventing the commit doesn't really solve a

Re: [dev] Subversion precommit hook

2008-10-20 Thread bjoern michaelsen - Sun Microsystems - Hamburg Germany
On 10/20/08 12:51, Rene Engelhard wrote: How should that be possible when you svn switch a complete tree to a cws (which you should do)? There's no need for any checks at all, if everybody does what he should do ;-). There's no modules anymore but one big tree. That check imho is moot.

Re: [dev] Subversion precommit hook

2008-10-20 Thread Frank Schönheit - Sun Microsystems Germany
Hi Björn, Given that pre- and postcommit hooks are basically working the same, using this precommit hooks as a base to create a postcommit hook should be easy. See issue 95199 for my currently prepared (and already implemented) solution, though a post-commit hook also sounds interesting.

Re: [dev] Subversion precommit hook

2008-10-20 Thread bjoern michaelsen - Sun Microsystems - Hamburg Germany
On 10/20/08 15:08, Frank Schönheit - Sun Microsystems Germany wrote: See issue 95199 for my currently prepared (and already implemented) solution, though a post-commit hook also sounds interesting. I just tried to add an svn:ignored dir. That works. If someone does a svn diff in a module, and

Re: [dev] Subversion precommit hook

2008-10-20 Thread Frank Schönheit - Sun Microsystems Germany
Hi Bjoern, I just tried to add an svn:ignored dir. That works. Sure - svn:ignore is just for ignoring the item in status and recursive commits. If someone does a svn diff in a module, and sees: ? source/somenewfile.cxx ? source/somenewfile.hxx he might be tempted to do a 'svn add *; svn ci

Re: [dev] Subversion precommit hook

2008-10-20 Thread Jens-Heiner Rechtien
Hi Bjoern, there was no need for crucifying yourself, server side we are python only. Actually we have no perl bindings installed. I think we need to be a bit carefull with pre-commit hooks. Other than post-commit hooks they do influence the user experience of SVN, so they have to be fast. Well,

Re: [dev] Subversion precommit hook

2008-10-20 Thread Philipp Lohmann
Hi, Jens-Heiner Rechtien wrote: I somehow don't like tying SCM functionality to commit messages, but that's may be just me. And should we enforce policy (like tabs vs spaces etc) via the SCM tool? is there another point where we could actually enforce policy ? Enforce as in preemptive, not

Re: [dev] Subversion precommit hook

2008-10-20 Thread bjoern michaelsen - Sun Microsystems - Hamburg Germany
On 10/20/08 17:39, Philipp Lohmann wrote: Hi, Jens-Heiner Rechtien wrote: I somehow don't like tying SCM functionality to commit messages, but that's may be just me. And should we enforce policy (like tabs vs spaces etc) via the SCM tool? is there another point where we could actually

Re: [dev] Subversion precommit hook

2008-10-20 Thread bjoern michaelsen - Sun Microsystems - Hamburg Germany
On 10/20/08 17:10, Jens-Heiner Rechtien wrote: there was no need for crucifying yourself, server side we are python only. Actually we have no perl bindings installed. If I only had known that before. I like and know Python a lot better. I think we need to be a bit carefull with pre-commit