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

[hook-script] new pre-commit script to add bugzilla urls to log messages

From: Jon Bendtsen <Jon.Bendtsen_at_laerdal.dk>
Date: 2005-09-09 14:10:58 CEST

Hi whoever is interested.

I have made a pre-commit hook script that adds bugzilla urls to log
messages.
It is a bash shell script, and it uses cut, sed, grep, echo, ...
It works on my debian stable using subversion 1.2.0-1 from testing?

This script CHANGES the props file in the transaction directory.
It has 2 paramters, first the repository, next the transaction.

 From those parameters it finds the right props file, and starts to
parse it.
First it checks if the svn:log is the last of the svn: properties, if
not, it aborts.

2. it checks if the extracted logmessage size and the log message
size in the
props file matches. If not, it aborts, because it extracted the log
message wrong.

3. it parses the logmessage finds text and numbers starting with
"bug " and any number comming after the word bug. Any non
whitespace, commas, points, #, +, and alike aborts the search
for more numbers. Any new "bug " restarts the search for numbers.

One may specify more than one bug number seperated by space , . + #

The bugnumber is appended to the bugurl and added to the logmessage.

4. finaly the new logmessage size is calculated and put into the
props file.

 From here the commit proceeds as usual.

The bugurl is specified in the top of the script

JonB

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Received on Fri Sep 9 14:14:07 2005

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.