Whenever we make a release of a project we’ll create a tag to capture the snapshot. It will be very helpful to be able to see which revisions in the trunk history were used in certain releases. I know the TortoiseSVN revision graph shows this information, but I’m wondering if there’s a way to see it in the command-line svn log?
I’m coming from a Clearcase background where we’ll be able to see the release labels in the history.
The log for the
tagsdirectory should include the revision that it committed when you made the tag, the revision numbers of yourtrunkwould then be less than that.Or am I misunderstand something?
Look at my class library: WebSVN view for my class library tags’ directory
You can see the revision that each build ended up with, since it’s the same repository, the revision number for the tag is 1 higher than the maximum possible revision in the trunk for changes that were tagged.
Here’s how this looks with a simple
svn logcommand:Or with xml:
Here’s a python script that will output something, it isn’t formatted all that good since it doesn’t handle linefeeds in revision comments properly, but it should get you going.
This outputs this (truncated):
I added an artificial tag named
HEADto ensure all log entries was present, but you can easily remove that and ignore it.The code is here: WebSVN repository for above example code.
I changed it to output xml, in somewhat the same format as the original
svn log --xmldoes, the code in the repository has those changes, the output now looks like:Each
<tag...>node has a single<logentry...>child, which is the tag log entry from the tag xml log, and then a node<revisions>where all the children are the relevant log entries from the trunk xml log.