[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Hook Script Collecting User Input?

From: Reedick, Andrew <jr9445_at_ATT.COM>
Date: Wed, 27 Feb 2008 09:33:35 -0600

> -----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
using
> 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
> of:
>
> 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
Algorithm.

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.
IMHO.

*****

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

---------------------------------------------------------------------
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:34:34 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.