[Adium-devl] Automated changelog generation

Ofri Wolfus ofri.wolfus at gmail.com
Mon Jul 9 22:15:42 UTC 2007


I'm having issues with my connection so I thought I'd email this  
instead.

Few hours ago Chris asked on IRC if there's a way to make building  
changelogs easier, so here is my proposal. Attached is a tool  
(written in Cocoa so most of the team can easily read & update the  
code) that uses svn log to look back on revisions of the current  
working directory. It then looks for changelog blocks within the  
commit messages that take the following syntax: Changelog: {category}  
Some message.
When finished, the tool outputs a changelog to the standard output  
that looks like this:

General:

* Change 1.
* Change 2.

Category:

* Some other change

Another category:

* Whatever.

Notes and gotchas:
* The tool accepts an optional argument that specifies how far in the  
commit log to dig. The argument is the last revision to use, i.e. -r  
HEAD:specifiedRevision is what gets passed to svn log. If not  
provided it'll dig back to revision 1.

* The order in which categories are listed in the log depends on too  
many factors and therefor should be treated as random. I think it's  
acceptable as manual reviewing will always be needed before releasing.

* The first "changelog:" keyword (case insensitive) marks the end of  
the commit message and the start of changes for the log. buildchlog  
will then treat all text as a change until if finds a new  
"changelog:" keyword or the end of the message. This allows  
specifying more than one change with a single commit like this:
"Added ivar, fixed a leak and whatever. Changelog: Fixed a crash.  
Changelog: {Who cares?} Now I'm really tired."
This will include two changes, "Fixed a crash." in "General" and "Now  
I'm really tired." in "Who cares?".

* The {category} is optional. If not provided the change goes to the  
"General" category. Category names must not contain '{' and '}'.

* Some stuff (like the "General" category name) are hard coded to the  
svn log parser, but the code does try to be modular enough to allow  
future version control systems to be added without *too* much pain.

* Although I didn't include a license file, everything included is  
BSD licensed.

* Even though it parses the output of svn the code is versioned with  
Git :-P

Warning: this was hacked together in 3-4 hours after having a 7 hours  
test this morning, and therefor probably contains lots of bugs, leaks  
and all the usual fun stuff. But it works on my test repo.

What do you think?
- Ofri

- - - - - - - - - - - - - - - - - - -
http://www.dpompa.com
- - - - - - - - - - - - - - - - - - -


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070710/f0c6b1b0/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildchlog.zip
Type: application/zip
Size: 40015 bytes
Desc: not available
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070710/f0c6b1b0/attachment.zip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070710/f0c6b1b0/attachment-0003.html>


More information about the devel mailing list