Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN - Does a merge preserve the author so that blame will be correct?

In my team, some we help each other with the merges. I.e. my code is merged back to trunk by someone else. It seems like the author info not is fully preserved during a merge. When I do annotate (blame) the merger is shown as the author.

Have the merger done something wrong or isn’t the original author preserved in a merge?

like image 469
user463923 Avatar asked Oct 26 '10 12:10

user463923


People also ask

What does merge do in svn?

This basic syntax— svn merge URL —tells Subversion to merge all changes which have not been previously merged from the URL to the current working directory (which is typically the root of your working copy).

What is a sync merge?

A synchronization merge is appropriate when synchronization of a branch with its ancestor is required. For example, feature branches should be periodically synchronized with their ancestor to minimize integration risk. Synchronization should be performed as frequently as possible.

How to merge two revisions in svn?

Examples. Merge a branch back into the trunk (assuming that you have an up-to-date working copy of the trunk): $ svn merge --reintegrate \ http://svn.example.com/repos/calc/branches/my-calc-branch --- Merging differences between repository URLs into '. ': U button.


2 Answers

If your server does merge tracking and your client tools are version 1.5 or later, this will work:

svn blame --use-merge-history TARGET
like image 110
D Krueger Avatar answered Sep 30 '22 14:09

D Krueger


A merge looks like someone checkout out trunk, made a load of changes all at once and then committed back in. Whoever did the final commit after the merge will show as the author. If you are getting people to help with the merge, make sure they do it under the username of the person you wish it to be attributed to.

Having said all that, if someone makes a mistake in the merge then you want the name of the person who 'helped' with the merge if they were the one doing it, surely?

like image 30
Neil Trodden Avatar answered Sep 30 '22 12:09

Neil Trodden