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

pre-commit hook newbie: enforcing ChangeLog updates

From: Janek Kozicki <janek_listy_at_wp.pl>
Date: Fri, 22 Aug 2008 08:54:13 +0200

Hi,

I would like to learn about pre-commit hooks in SVN. And first thing
that I would like to do is following:

- Check if this commit modifies /trunk/ChangeLog

   - if yes: let it happen

   - if no:
       - Check how many commits ago this user modified /trunk/ChangeLog
         (counting only commits of this user, and skipping all other
         users who did commits in between)

             - if less than 5: let it happen

             - if more than 5: return "Error, it is your 5th commit
               without updating ChangLog, please update it". FAILURE

Can anybody direct me to, what are the necessary SVN tools to do that?

- checking if /trunk/ChangeLog is being modified
- checking how long time ago THIS user modified /trunk/ChangeLog

Also: is it possible to write those pre-commit hooks in bash? I don't
know perl or python, but I'm quite proficient with bash.

best regards

-- 
Janek Kozicki                                                         |
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-22 08:54:38 CEST

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.