You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Thomas Mauch <th...@gmx.net> on 2005/06/11 13:00:29 UTC

Problems with svn merge on merging a whole branch to another

I try exactly to do what is described as common-use for merging in the
Subversion book in the section "Merging a Whole Branch to Another", but I'm
encountering a lot of conflicts where I think the merge should be able to
process the files silently and correctly without user intervention.

Here's what I'm doing:

- I have a freshly updated version of the trunk in a directory named 'dvl'

> cd dvl
> svn update
At revision 542.

- I create the branch in revision 503, so now for mergin I do

> svn merge -r 503:HEAD svn://myserver/myrepos/mybranch

As the branch has not been existing very long and few development was done
on the same file in the trunk and the branch, I expected to get only status
'Updated' during the merge, but I get more 'Conflicts' than 'Updates' - even
on files which have not been modified in the trunk in the mean time!
If I look in such a file, I see only conflicts like the one below where
there is really nothing conflicting:

<<<<<<< .working
	// some lines
	// of code
	// are her
=======
>>>>>>> .merge-right.r542

Some files which have about the same changes applied, are ok.

What do you think can cause such a problem (I'm using Subversion 1.2)?
Any help appreciated

Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Problems with svn merge on merging a whole branch to another

Posted by Ryan Schmidt <su...@ryandesign.com>.
On 11.06.2005, at 15:00, Thomas Mauch wrote:

> [snip] I'm encountering a lot of conflicts where I think the merge 
> should be able to process the files silently and correctly without 
> user intervention.
>
> [snip]
>
> <<<<<<< .working
> 	// some lines
> 	// of code
> 	// are her
> =======
>>>>>>>> .merge-right.r542

My company has been using Subversion for four months, and so far i've 
had to deal with very few conflicts, but I've seen this on occasion too 
and am also curious why this happens, so would appreciate any insight.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

AW: Problems with svn merge on merging a whole branch to another

Posted by Thomas Mauch <th...@gmx.net>.
After your questions, I reexamined the merge operation once again and I
think you mentioned pointed causing the problems: All files with conflicts
raised have been commited into the branch with changes on them. Other files,
having about the same bit of changes applied to but without having changes
alreay when creating the branch, worked fine.

I attach 3 files and describe how to reproduce the problem:

- You have a repository test with directories trunk/src and branches
- Copy attached file uni_druck_gp12.c.r502 into trunk/src/uni_druck_gp12.c
and
  commit it - this is the version before the branch is created
- Copy attached file uni_druck_gp12.c.r503 into trunk/src/uni_druck_gp12.c -
  the file now contains the changes which have been made when the branch was
created
- Create the branch: svn copy src svn://server//test/branches/test-branch
- Checkout the branch and copy attached file uni_druck_gp12.c.r540 into
  trunk/branches/test-branches/uni_druck_gp12.c - the file now contains the
  changes made when the branch was active
- Commit the branch
- Now checkout a new trunk directory and execute the command
  svn merge -r <revision-when-branch-was-created>:HEAD
svn://test/branches/test-branch
  and the file uni_druck_gp12.c will have erroneously a status of conflict

What do you think?
Thomas


-----Ursprüngliche Nachricht-----
> Von: Dale Worley [mailto:dworley@pingtel.com]
> Gesendet: Dienstag, 14. Juni 2005 19:40

> 2) When you created the branch, was it just a copy from the trunk, or a
copy
> with changes?  If there were changes, what exactly were they?

RE: Problems with svn merge on merging a whole branch to another

Posted by Dale Worley <dw...@pingtel.com>.
> From: Thomas Mauch [mailto:thomas.mauch@gmx.net]
>
> What do you think can cause such a problem (I'm using Subversion 1.2)?
> Any help appreciated

It's very difficult to guess what *might* be going on in your repository,
since you've told us nearly nothing about it.  What would help is specific
answers to these questions:

1) For the file name in question, has it lineally descended from rev 503, or
have there been copy operations involved?

2) When you created the branch, was it just a copy from the trunk, or a copy
with changes?  If there were changes, what exactly were they?

3) What is each and every change to this file on the trunk from 503 to HEAD?
What is each and every change to this file on the branch from 503 to HEAD?

If you told us this, we *might* be able to guess what the problem is.

Dale


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org