PDA

View Full Version : Automatic changelog generation



Jacob Potter
2005-08-17, 16:51
Hi all -

I put together an XSLT stylesheet to make a pretty-printed change log.
It just repeats the information out of "svn log", but that's better
than nothing.

I'm having some trouble generating the svn log command though.
Subversion will take a date parameter instead of a revision, but it
reads that as "midnight on this date." There doesn't seem to be an
easy way to find the exact revision of a given nightly build.

Anyway, here's what I have so far. It uses the xsltproc command-line
processor, which is included in OSX 10.4 and easy to get on Debian and
Cygwin. Any suggestions as to how this could be made more robust?

- Jacob

max.spicer
2005-08-18, 04:31
Would it make sense for the nightly build process to automatically create a tag in the repository? This would allow you to easily make the link between a given nightly build and a revision number, which I'd have thought would be a good thing in general. The nightly build process would then be 1) create tag with known name based on date (e.g. 20050818-nightly), 2) export tag 3) whatever. You'd end up with a lot of tags, but its not as if they take up any extra space.

Max


Hi all -

I put together an XSLT stylesheet to make a pretty-printed change log.
It just repeats the information out of "svn log", but that's better
than nothing.

I'm having some trouble generating the svn log command though.
Subversion will take a date parameter instead of a revision, but it
reads that as "midnight on this date." There doesn't seem to be an
easy way to find the exact revision of a given nightly build.

Anyway, here's what I have so far. It uses the xsltproc command-line
processor, which is included in OSX 10.4 and easy to get on Debian and
Cygwin. Any suggestions as to how this could be made more robust?

- Jacob

max.spicer
2005-08-18, 04:37
Subversion doesn't just take a date parameter. "date" can include time. From the manual:

Revision Dates

Anywhere that you specify a revision number or revision keyword, you can also specify a date inside curly braces {}. You can even access a range of changes in the repository using both dates and revisions together!

Here are examples of the date formats that Subversion accepts. Remember to use quotes around any date that contains spaces.

$ svn checkout --revision {2002-02-17}
$ svn checkout --revision {15:30}
$ svn checkout --revision {15:30:00.200000}
$ svn checkout --revision {"2002-02-17 15:30"}
$ svn checkout --revision {"2002-02-17 15:30 +0230"}
$ svn checkout --revision {2002-02-17T15:30}
$ svn checkout --revision {2002-02-17T15:30Z}
$ svn checkout --revision {2002-02-17T15:30-04:00}
$ svn checkout --revision {20020217T1530}
$ svn checkout --revision {20020217T1530Z}
$ svn checkout --revision {20020217T1530-0500}


When you specify a date as a revision, Subversion finds the most recent revision of the repository as of that date:

$ svn log --revision {2002-11-28}
------------------------------------------------------------------------
r12 | ira | 2002-11-27 12:31:51 -0600 (Wed, 27 Nov 2002) | 6 lines


I'm having some trouble generating the svn log command though.
Subversion will take a date parameter instead of a revision, but it
reads that as "midnight on this date." There doesn't seem to be an
easy way to find the exact revision of a given nightly build.

Jacob Potter
2005-08-18, 10:11
On 8/18/05, max. spicer <max.spicer.1tyk4n (AT) no-mx (DOT) forums.slimdevices.com> wrote:
> Subversion doesn't just take a date parameter. "date" can include time.

Ah, whoops. I was just looking at the built-in help for "svn log".
Shows what not RTFMing can do :)

Assuming the build happens at the same time every day, I'll just have
it log the last 24 hours. Close enough, and no extra tags needed.

- Jacob