R – Easiest way to collect revision history since last merge in Subversion

svntortoisesvn

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?

Best Solution

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 a report 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 the 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.

Related Question