views:

85

answers:

2

I usually commit multiple changes to my branch and merge to trunk occasionally. I'd like to keep all my commit messages in the latest revision note of the final trunk merge. I don't want to memorize revision numbers or anything I simply want "all commit messages to the branch since the last merge to trunk" collected together in an editable fashion before I commit.

Since this information is available only in mergeinfo I think this has to be provided by client. I didn't find this feature in TortoiseSVN, SVN Monitor or command line client. Any chances I'm missing something obvious?

+1  A: 

This isn't exactly what you're looking for, but you could always build the list of commit messages by piping mergeinfo into the svn log command using xargs. It looks more or less like this:

svn mergeinfo $SOURCE $DESTINATION --show-revs eligible | xargs -i  svn log $SOURCE -r '{}'
tschaible
Note: TortoiseSVN means ssg is on Windows. He could use Cygwin, though, in order to get `xargs`.
sbi
Yes I am. Cygwin is too much overhead just for this.
ssg
+2  A: 

Hi

I hope I understood your requirement correctly. You can try the following steps: (via svn commandline client):

  1. svn log -v --stop-on-copy http://myrepo/mybranch gives out areport you can use to find out the revision number representing your last merge from the branch to trunk. (XXXX)

  2. svn log -rXXXX:HEAD http://myrepo/mybranch > commitmessg.txt (Presuming you now want to merge form teh HEAD version of your branch into the trunk) - this will collect all your commit messages into the text file. You may want to edit this file to include a meaningful first line like "Merging elements as below" - or "Merging all elements pertaining to the defect fix &&&&" etc., and save.

  3. Perform the merge as usual

  4. While committing the merged files, run svn commit -F commitmessg.txt so the message contains the contents for the text file. (I am not sure of the character limitations for commit messages though)

Hope this helps.

EDIT: (via TORTOISESVN)

Just figured to do this via tortoiseSVN as well. You can get to the tortoiseSVN-Show Log, select the range of versions you want the log for (using show range button at the bottom). Highlight the report in the message window - right click - copy to clipboard, and paste into a text file. (I liked the format of the commandline output better though) You can edit this file and use it for the post-merge commit.

Critical Skill
Unfortunately --stop-on-copy stops at "copy" operation not the latest reintegrate from branch to trunk. So it shows the history since the branch was created. This would work though if I got used to recreate my branch after each trunk merge. However that's not the case. TortoiseSVN's behavior is similar.
ssg