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

Re: pre-commit hook newbie: enforcing ChangeLog updates

From: Quinn Taylor <quinntaylor_at_mac.com>
Date: Fri, 22 Aug 2008 07:27:02 -0600

>> 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?
>
> Are you saying that you have a ChangeLog file which you maintain
> inside the repository? Isn't that redundant (and extra effort/time for
> your developers) when you could and should already have all that
> information in the logs themselves?

It depends on the intent of the ChangeLog. For example, many software
programs have a change history which the user can examine, but it is
in terms of releases (i.e. tags) rather than revisions, and generally
not associated with developer usernames. I can at least understand the
desire to require that this be updated to avoid having someone dig
through the logs and summarize what has changed right before a
release. Depending on the log messages committed by developers, one
can imagine that the information in the SVN history and the ChangeLog
file ca be quite different. However, if they do contain the same
information, I'm with you—just use Subversion's history to track
changes.

  - Quinn

  • application/pkcs7-signature attachment: smime.p7s
Received on 2008-08-22 15:27:24 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.