|Re: precommit hook client side [message #553648 is a reply to message #553544]
||Wed, 18 August 2010 06:27
| olly2 Mising name
Registered: June 2010
to answer you question directly: no, it is not possible.
To make some suggestions how you could solve your problem using subversion:
- Include the style check in your make/build enviroment.
If you have some kind of build system (nightly build, a Hudson server, a make file, Ant Tasks ....) use this to generate the necessary checks into a report including somethink like an overall report. I would suggest an appraoch like this:
- when working on the trunk deviations are allowed
- when creating a release branch (you may find some nomenclature for the naming of branches helpful in this case ) deviations to the code styling rules are no longer allowed and an email is send in this case to the team including the deviation report. If you have a nightly build you can add this task there.
- when creasting a baseline (using a tag, again you should introduce naming conventions for tags) and there is still a deviation this is reported to some QA or Management persons, e.g by mail.
- Use a intelligent pre commit hook.
You can get some information about the commit in your pre commit hook including the repository path where the commit is happening. Just check this path and then perform your checks depending on this results.
In my opinion there is no need to introduce a client site pre commit hook, and from a conceptional point of view I think this is difficult and not stabel. So, think over your development process. Where could this check be implemented? And try to give yourselfe a NOT TECHNICAL TOOL answer! When you know this then think of an efficient technical solution.
Sorry for this epical answer but as a process person in my company it is very difficult for me not to think in this direction - so my answers are sometimes a little like "have a look to the whole thing" .. Sorry ..
|Re: precommit hook client side [message #554032 is a reply to message #553648]
||Thu, 19 August 2010 14:43
Registered: July 2009
Thankyou for your insights. My problem is that we have a RM team that
manages the nightly builds for multiple teams and the SVN repo. My team is
just one of their clients so I really cannot enforce any process in their
team. I just want to make sure that my team's standards are enforced
The problems : a) I cannot change processes in RM team b) I dont have access
to svn server side hooks
I will have checkstyle target in the ant build, but there is no way to
enforce that the dev will run the target and the the code that is going to
be checked in conforms to the standards. Hence the client side pre-commit
hook idea because we use subversive plugin to checkin
I found that subversion does offer some kind of wat to write an commit
extension to the plugin- as you say its a maintenence nightmare.
I wish subversion would provide some pre-built commit extensions
customizable via xml configurations or some such
Powered by FUDForum
. Page generated in 0.05571 seconds