Our TeamCity builds a complete installer package that includes several web applications, console applications and win forms applications. It constitutes an application suite. Each of these applications has it’s own Mercurial repository.
What we’d like to be able to do is automatically supply release notes for each version. TeamCity already displays Mercurial commit messages in web interface when one hovers over changes for a build. Is it possible to somehow capture those messages during a build and extract them to a text file in agent work folder?
I don’t know TeamCity, but I have a simple method of taking the commits of a bit of software and formatting it into a neat history log, which I guess is what you’re after. Perhaps you can take this and modify it to suit your needs – it uses only mercurial commands, so you could add it as a dependency of your build (I have a post-build step of my VC++ project which runs the command and outputs to a text file).
I have a simple template like so:
And when I use the following
hgcommand to create a usable history log:The command takes commit comments of all ancestors of the working directory, outputting a tag and changeset hash, along with the date the tag was created, and then all associated changes. Here’s an example
hg log -Goutput of a test repo, showing thedefaultandreleasebranches:The template and command shown outputs the following:
Add a comment if you would like some explanation of the command-line or template.