Thanks Andrew--this is almost exactly what I had cooked up for "Plan B", but figured I'd double check and make sure "Plan A" wasn't possible first. Good to know others have gone a similar route.
----- Original Message ----
From: "Reedick, Andrew" <jr9445_at_ATT.COM>
To: Mark Voelker <mhsvoice_at_rocketmail.com>; users_at_subversion.tigris.org
Sent: Wednesday, February 27, 2008 10:33:35 AM
Subject: RE: Hook Script Collecting User Input?
> -----Original Message-----
> From: Mark Voelker [mailto:mhsvoice_at_rocketmail.com]
> Sent: Wednesday, February 27, 2008 7:24 AM
> To: users_at_subversion.tigris.org
> Subject: Hook Script Collecting User Input?
> Let's assume for a moment that all the users of my repository are
> file:/// URL's (as opposed to http for instance) and I want to add a
> start-commit hook script that will ask them to sign off on a number of
> reminders before their commit can proceed. Something along the lines
> Have you examined your diffs and checked for accidental changes?
> <user types "y">
> Have you made sure your comments are in line with the standard schema?
> <user types "y">
> Have you posted your diffs for review?
> <oops, forgot to do that...user types "n" and the commit is canceled>
> Is this possible to do since the hook script doesn't have a STDIN
> connected to the user's terminal?
Plan B is to transmit information via the check-in comment. Put a
script in network directory that will ask the questions and generate a
comment file containing a generated magic number. The user has to
commit with that comment file 'svn commit -F'. Or they just need to
cut'n'paste the magic number into their commit message. The magic
number needs to change so people don't resue it.
The magic number could be something as simple as the md5 hash plus a
gratuitous xor of the filenames in the commit. Change the xor often in
case someone is bored enough to crack your Super Secret Magic Number
No matter what method you choose, users will start to automatically
press 'y', 'y', 'y' after the first few commits thus defeating the whole
purpose. So don't waste time on a complicated solution, and consider
beating people who don't follow the rules, automating the diff postings,
and randomly auditing/reviewing comment schemas so you know who to beat.
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621
Never miss a thing. Make Yahoo your home page.
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-27 16:45:39 CET