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

Re: Post commit script for losers who steal even revisions

From: Karl Fogel <kfogel_at_google.com>
Date: 2006-08-25 00:54:13 CEST

"Young, Jason \(GE Indust, GE Fanuc\)" <Jason.Young@ge.com> writes:
> We have a user here that watches the revision numbers, and when it's
> 1000, 2000, 3000, etc, he'll just change one character in the file, and
> then check it in. Does anyone have a post-commit script for Windows
> that can check if the revision is divisible by 1000 and checked in by a
> certain person? I want those commits to fail, so that he can no longer
> steal the glory.

In a post-commit hook, the commit has already happened, so it's too
late. You need a pre-commit hook. A pre-commit hooks doesn't know
the upcoming revision number, but it does know the *current* head
revision number. So if that number is N-1, where N % 10 == 0, and the
user is this loser, then you can block the commit. Once the youngest
rev advances to N or beyond, he'll be able to commit again.

Of course, this is the wrong solution. Instead, bring up this
person's behavior, privately or publicly depending on the situation,
and get him to stop being ridiculous. Don't implement a technical
solution for social problem.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Aug 25 00:55:44 2006

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.