views:

3801

answers:

7

I'm evaluating subversion's branch/merge capabilities, and I decided to do a simple test - I branched an existing project, changed a comment in one file, and then did a merge reintegrate via Tortoise.

It failed:

Command: Reintegrate merge https://oscar/svn/Baxtech/ViM/Branches/Test3 into C:\Inntec\VS2008\Baxtech\ViM
Error: Cannot reintegrate from 'https://oscar/svn/Baxtech/ViM/Branches/Test3' yet:
Error: Some revisions have been merged under it that have not been merged
Error: into the reintegration target; merge them first, then retry.

I googled around for this, and I found some posts saying that this has to do with mergeinfo being created by renames and directory changes in old versions of Tortoise.

I did recently upgrade from the previous version of Tortoise to 1.5.5, however it seems like this problem was pre-1.5.*... And I only changed some comments in one file. I didn't do any renames or directory structure changes.

Then again, we've been working with the trunk for some time (without any branching), so maybe the problem exists in there?

So, if there is a fix for this I would appreciate really appreciate some help. Also, though - is this typical? This was really a very simple test, and sadly right now I'm a little scared to use Subversion for branching.

Subversion: 1.5.4 (via VisualSVN Server)
Tortoise: 1.5.5

We're also using Visual Studio 2008.

Thanks!

Brian

+1  A: 

I've found it a lot easier to just merge from the command line.

svn merge -r N:M SOURCE [PATH]

N is the revision you made the branch, M is the revision you want to include changes up to (or HEAD for current). Source is the branch path. If you execute this inside your target working directory, you don't need the last parameter.

An example:

//sitting in main trunk
svn merge -r 55:HEAD svn://my.repo.url/branches/my_branch

This will merge all changes from 55 onward in the branch to the trunk.

Ben Scheirman
A: 

Can't think of any reasons why, I never seen this error and I use branching/merging heavily. A couple of things I would check:

  • You start the merge from your trunk working copy (right click->SVN->Merge)?
  • What happens if you say Test merge?
  • What about checking on ignore ancestry?
  • Make sure your Merge depth is 'Working copy'

BTW, what version of SVN is your repository?

Ricardo Villamil
Let me try that now - Subversion is 1.5.4
Brian MacKay
I get the same error message in all cases. What's really odd is that if I go into the branch and merge back from the trunk, a bunch of files are modified. But no one has touched the trunk, and the files don't show any changes in the diff!
Brian MacKay
A: 

I've used svn for a long time and have never seen this; granted I haven't used Tortoise that much. A few points to consider:

  1. The log shows you trying to merge ../ViM/branches/.. into ../ViM/. Do you you not have a ../ViM/trunk/ or is the log just printing out stuff funny? I'd imagine that trying to merge a branch into something other than the code base would mess stuff up.

  2. Did you commit any changes to trunk after creating the branch but before reintegrating it? If so, make sure you merge those changes into the branch before trying to merge it back into the trunk.

  3. Run svn cleanup on your branch and trunk to make sure that any unfinished business there is cleaned up.

  4. I'm not sure it would cause any issues but your working copy of trunk may need to be updated before you can reintegrate changes.

Devrin
I did run cleanup. I haven't changed the trunk, the only thing that I did was the comment change in the branch. The log is correct, good eye. The first path is in the repo, the second path is my local working copy.
Brian MacKay
+2  A: 

This problem has something to do with MergeInfo. I'm not quite sure what the problem was, but I think I cleared out the MergeInfo and now everything is fine.

I need to learn a bit more about why my MergeInfo had a problem and what it actually does. Very frustrating!

EDIT: A little time has gone by since we upgraded now, and I have not encountered this problem again.

Brian MacKay
+5  A: 

This also happened to me some time ago.

I can't remember what I exactly did to trigger this problem, but I can say that I was also using a pre-1.5 release, and then switched to 1.5.0.

Subversion tracks merges using a per-directory svn:mergeinfo property. This property should only be present on the root path of the working copy (correct me if I'm wrong). When I saw this error, I noticed that pre-1.5 versions created explicit mergeinfo on files inside the working copy, which prevented the stable release from working properly. As you say in your last reply, removing those extra mergeinfo entries fixed the problem for me too.

My suggestion is to try with a fresh repository with no commits coming from beta versions, and see if this happens again.

azkotoki
I was able to solve the same situation by deleting the mergeinfo prop on some subdirectories in my feature branch, I have no idea how they got there, but since the revision ranges were so long ago I new they had to have been bogus.
jayrdub
+4  A: 

The problem (more often than not) is when the merge source has some subtree merge info, svn 1.5 bails out giving out the specific error message. The remedy for this as you've correctly pointed out is to remove any subtree mergeinfo. A detailed authoritative answer can be found at : http://blogs.open.collab.net/svn/2008/07/subversion-merg.html

Arun
A: 

It means that you did not synchronize your branch with trunk.

Go back to the branch working copy, and:

svn merge https://svn.example.com/project-name/trunk

Then commit this working copy:

svn commit

Now, go to the trunk working copy and merge with --reintegrate option.

If merge is completed, just commit the trunk's working copy.

svn commit

Spyro