views:

44

answers:

2

All development commits happen on branches. We mandate entering defect numbers in commit log. But, once the branches are merged to trunk, there are no records of the defect numbers. I am looking for some advise on tracking defects that are part of a build done from trunk.

+1  A: 

One possible approach could be to make use of the svn:mergeinfo property.

Run this on your trunk branch

svn propget svn:mergeinfo <trunk_url>

In there should be a complete list of the revisions that have been merged into the trunk. Here is an example of what you might find

/branches/ver1:10-20,25,27
/branches/ver2:34,36,38-42

Now you can use svn log to get the commit logs of those merged revisions and extract the defect numbers. Something like

svn log /branches/ver1 -r10:20 --xml

I think a script could be easily written to automate this process.

karoberts
+3  A: 

But, once the branches are merged to trunk, there are no records of the defect numbers.

You need to use the --use-merge-history option, or -g for short. svn log -g will include the commit messages of the merged commits.

If you use TortoiseSVN, you can check the "Include merged revisions" checkbox in the log dialog.

Wim Coenen
@Wim Googled for such functionality in TortoiseSVN, without any luck. Is there such an option?
publicRavi
@publicRavi like I said, enable the "Include merged revisions" checkbox in TortoiseSVN's log dialog. Documentation with screenshot: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-showlog.html
Wim Coenen