tags:

views:

394

answers:

3

When building a project I tag the source using the svn copy command. When viewing history for trunk I don't see a log message for those tags. I would like to see a log message for each of my release versions in trunk.

I want to be able to easily see which changes were in each release. Right now I need to go back and find the revision number for each tag and keep track of that number manually when looking at the log.

I would even be happy if I could run another command to add a log message to trunk after the tag took place. However, I can't find a way to get a message to show in the log for each file since no file changed after the tag.

+2  A: 

I think you want to look at the "message" param

http://svnbook.red-bean.com/en/1.0/re07.html

svn copy .... --message (-m) TEXT

EDIT:

Never mind. That's not what you want. You want to look at the trunk to see what copies/tags you made... You can do this:

svn list --verbose e.g. svn list --verbose file:///repository_name/tags

But ultimately I think you answered your own question. Keep a text file someplace and during your build append to it automatically with the tag name and then check it in with the comment of the tag/label.

I did something like this in a previous company. The build script had its own user login to SVN and checked in a version file.

i.e. /Project/Builds/builds.txt

Contains a list of labeled version. You can either append to it or overwrite it. Since it is versioned it does not matter if you overwrite it. For doing CI/many builds it might help to keep that from growing so large.

EDIT

in the text file you put the revision AND the tag name associated with it. you also check in the file so you can assume that it is tag-revision-n +1 for every tagged build.

Tim
Using a builds.txt file only let's me see the tag messages if the log command includes that file. If I show the log for a single source file I still have to go find the version numbers manually.
Mark Elder
the file content is the revision number for a tag.
Tim
+1  A: 

On your branch/tag, use svn log --stop-on-copy -v . The bottom entry will show you the location:revision you originally copied from.

See http://blank.jasonwhaley.com/2008/12/subversion-t-where-and-what-revision.html for more.

whaley
Sure, they are lots of ways to find the revision number. We even track it in our release notes. But what I am asking for is a way to get it listed in the message log for trunk. Then I don't need to manually line up the numbers. Really I want to show where I copied "to" - not "from".
Mark Elder
+1  A: 

In subversion you usually don't add a message to trunk but to the branch. (As you actually didn't change trunk by creating a branch/tag). If you really want to add the log message to trunk you should change something on trunk itself.

To use the same message and revision for this you need to do something special (or do everything in a workingcopy containing both trunk and new branch).

Using svnmucc you could do a: (lines continue when you see a backslash)

svnmucc \
  cp 1234 http://srv/svn/project/trunk http://srv/svn/project/tags/release \
  propset last-tag ^/tags/release http://srv/svn/project/trunk \
  -m "The log message"

(svnmucc stands for Multiple URL Command Client for Subversion and is available in most subversion releases)

This does all this in one commit:

The last-tag property can be replaced by something else; but this is an example of a very minor change just to trunk.

Bert Huijben
This gets me really close if I recursively apply the property. The problem is propset does not seem to support messages (-m).
Mark Elder