[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: merging two branches

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-04-24 19:19:27 CEST

On Apr 24, 2007, at 06:22, ufuk kocolu wrote:

> Jason Connor wrote:
>
>> On 4/23/07, ufuk kocolu wrote:
>>
>>> Thanks to the input of this group, I managed to dump & load my two
>>> repositories into a new repository. To keep things clean, I
>>> loaded these
>>> repositories into
>>>
>>> import/repository-1
>>> import/repository-2
>>>
>>> Than I created a new branch - of repository-1 - using svn copy into
>>> trunk/. Now what I need to do is merge import/repository-2 to
>>> trunk/. So
>>> I run the command:
>>>
>>> svn merge --ignore-ancestory file://svn/import/repository-2/app/
>>> file1.rb
>>> file://svn/trunk/app/file1.rb checkoutdir/app/file1.rb
>>>
>>> That gives me a OK message ("merged") but there is no difference
>>> in the
>>> file. It's still identical to import/repository-1/app/file1.rb
>>>
>>> What do I need to do to merge these two branches?
>>
>> To pick up the changes in import/repository-2, you need to reorder
>> the
>> urls in your merger (i.e. import/repository-2 needs to be the
>> right-hand-side of the merge)
>
> Thing is; I have changes in both versions. Can I merge changes in
> both versions into one?

The merge command is nothing more than getting a diff between two
places and applying that as a patch to a third place. Your merge
command told Subversion to create a diff between import/repository-2/
app/file1.rb and trunk/app/file1.rb, and apply that diff to
checkoutdir/app/file1.rb. If checkoutdir is a working copy of your
trunk, then the requested diff cannot be applied, because it makes no
sense, because the requested changes are already present in the
working copy.

You have changes in both versions? Do you mean you have changes in
both import/repository-1 and import/repository-2? If so, where is the
original unchanged version? Is it perhaps back in the history of one
or both of the imported repositories? When we know where the original
unchanged version is, then we can help you construct the correct
merge command.

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Apr 24 19:20:24 2007

This is an archived mail posted to the Subversion Users mailing list.