Fixing bad SVN merge

Asked by Eric Berry

I've been using bzr as a svn client replacement.

When I perform merges using Bazaar everything is great, and when other developers merge properly with their own svn clients, everything works fine.

However, recently another developer performed a svn merge with an older client that didn't update the svn merge info.

Now when I try to do a merge using bzr-svn it shows all the files that were touched during his merge as having text conflicts.

Is there a way for me to fix this from the bzr-svn perspective? When he does a merge using SVN, it doesn't show those files as conflicts.

I asked this question to bzr-svn, Jelmer suggested I ask it here.

Any ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Eric Berry
Solved:
Last query:
Last reply:
Revision history for this message
Eric Berry (elberry) said :
#1

I tried linking to the existing bug, but it will only let me link to a bug on this list.

The ticket on bzr-svn:
https://answers.launchpad.net/bzr-svn/+question/104166

Revision history for this message
Martin Pool (mbp) said :
#2

btw you can edit a question to move it to a different project.

I'm not sure I understand the question. You're saying that someone is committing an untracked merge, and svn copes better with this than bzr-svn does?

Revision history for this message
Eric Berry (elberry) said :
#3

I'm not sure if it's "better" per say. The user who is doing it is using his own revision tracking. Eg. copying down the SVN revision numbers he merged between.

I think he may have forgotten to commit the top level directory as well.

For whatever reason, when he merges using his SVN client the files don't show up as conflicts, but bzr-svn does.

One odd thing is that based on a textual comparison most of the files shouldn't show up as conflicts because they were simply updates from the svn merge.

Eg.
FileA was updated in svn trunk
svn merge between svn trunk and svn branchB
FileA was updated from svn merge

FileA is now the same on both svn trunk, and svn branchB.

Using bzr, I do a pull from the branch and get the updates. If I do a bzr merge between my local trunk, and my local branch FileA shows as having conflicts.

I haven't tried this, but since I know that the files are actually up to date on the branch, I thought I could fix this by performing a bzr merge between the two local branches, and then reverting the files that have conflicts.

Revision history for this message
ike casteleyn (icasteleyn) said :
#4

Hi,

If this is a one-time problem (your co-coworker upgrades its svn-client to a version that does write the svn:mergeinfo) then you could probably fix this manually.

I would try to do the merge from your coworker again in svn (using a recent client), but in the options (flag you provide on the commandline or in your gui-client) you need to have the "record-only" flag on. This way, no filecontent is going to change (only the svn:mergeinfo is going to be updated).

Then you should be in the same situation as when the merge would have been performed with a recent client and you can try with bazaar again.

Best regards,
Ike

Revision history for this message
Eric Berry (elberry) said :
#5

@ike, Thanks. If this happens again I will have them try that. He's already upgraded to the latest SVN client.

As for now, I performed the merge using bzr, then simply reverted each conflicted file individually.

The merge tip was still available for committing and pushing. This solved the issue.

I'm thinking this is doing the same thing as you suggested basically. Leaving all the file contents alone and simply committing the merge info.

Thanks Ike, and Martin for the help.