Page 1 of 1

Diff between branch and trunk

PostPosted: Tue May 07, 2013 10:21 pm
by tizzo
I'm pretty sure svn diff supports this use case, but I can't figure out how to do it in SyncroSVN. Here's the scenario.

Developer is working in a feature branch ^/branches/mybranch which is branched off of the ^/trunk.

Developer periodically svn merges from ^/trunk to make sure reintegration will go smoothly when the time comes. The history of ^/branches/mybranch is therefore a combination of the changes made by the developer as part of his feature and other changes merged in from ^/trunk.

The time comes when developer wants to know exactly what changed over the entire lifetime of ^/branches/mybranch - but only changes actually associated with the feature, IE wants to exclude those changes that were brought in from the trunk during periodic merges - perhaps as part of a code review. The easiest way to get this is to diff the HEAD of ^/branches/mybranch against the HEAD of ^/trunk. This also corresponds to the changes that will be merged to the trunk in the course of a --reintegrate merge.

I'm pretty sure it can be done on the svn command line. Does anyone know if SyncroSVN can do it; and if not can it be added as a new feature at some point down the line? Thanks.

Tony

Re: Diff between branch and trunk

PostPosted: Wed May 08, 2013 8:52 am
by Florin
Hello,

Unfortunately, Syncro SVN Client does not include a feature to compare any two directories, but we have it scheduled for a future version.

As a possible workaround, you can:
  • use Show History for the working copy root dir, and use the filter box from the History view to see only changes committed for a specific bug ID (if you commit using bug IDs). This will allow you to see only changes committed on the branch, for that specific feature (given that merges from the trunk were not committed using the same bug ID). Also, you can request a comparison between the oldest revision regarding this feature and the newest one (presented in the History view), to see a tree of the items modified for that feature, between the two revisions. I think this is the only way closest to what you request - a list of changes done only on the branch.
  • export the content of the ^/trunk (or of a more specific directory) to a local directory and use bundled Diff Dirs tool to compare working copy against exported dir. This will show where are file content differences, but it is not an SVN aware comparison.
  • Tools > Create patch can generate a file with the differences between ^/trunk and ^/branches/mybranch, but this will not be too helpful, given the format of the file.

The only way to test changes on the branch would be to check out ^/trunk, merge changes from the branch and test. The drawback is that you will lose time with the merge if anything goes wrong, and you will have to revert, make corrections and commit on the branch, redo the merge into the working copy of the trunk and test again.

Best Regards,
Florin Avram
----------------------
Syncro SVN Client Team