You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Michael Caplan <mi...@htc.ca> on 2005/09/27 16:49:52 UTC

Newbie Question 2: Merging across repositories

I have another newbie issue which I cannot find an answer for on the net:

(1) The application we develop is maintained in one repository.  (2) 
Each installation of the application for clients is maintained in a 
separate repository.  Repository 2 has a copy of the application at its 
most stable version when the client install was done, including any 
additional files required for that particular client install.  When we 
upgrade a client's install, we need to grab the most resent and stable 
version from repository 1 and merge them into repository 2.

The way we accomplished this with CVS is as follows:

1) Grab a copy of the most resent stable version:
    cvs co -rRELEASE_3_3_0_BUILD_1 ignitionweb_base

2) import application changes into client repository:
    cd ignitionweb_base
    cvs import -m "Import of ignitionweb_base RELEASE_3_3_0_BUILD_1." 
3macs htc IW_RELEASE_3_3_0_BUILD_1

3) Merge the changes:
    cd ..
    cvs checkout -kk -jhtc:yesterday -jhtc 3macs

4) Fix conficts and commit:
    cvs ci -m "Merged with ignitionweb_base RELEASE_3_3_0_BUILD_1, 
resolved conflicts."



With SVN I tried a similar approach:

1) Grab a copy of the most resent stable version:
    svn co file:///htc/svn/ignitionweb_base/tags/RELEASE_3_3_2_BUILD_3 
ignitionweb_base

2) import application changes into client repository:
    svn import file:///htc/svn/3macs/branch/test

3) Grab a copy of client repository trunk
    svn co file:///htc/svn/3macs/trunk

4) Merge changes:
    svn merge file:///htc/svn/3macs/branch/test 
file:///htc/svn/3macs/trunk 3macs


This results in the following output:

....
D  3macs/iw3/etc/webdev_dirs
D  3macs/iw3/etc
D  3macs/iw3
svn: Revision 233 doesn't match existing revision 232 in '3macs/iw3'


All the files common between repository 1 and the client repository get 
marked for deletion?  How should I be approaching this problem?

Thanks in advance,

Michael




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

Re: Newbie Question 2: Merging across repositories

Posted by Joshua Varner <jl...@gmail.com>.
On 9/28/05, Michael Caplan <mi...@htc.ca> wrote:
> Hi Josh,
>
> Thanks for the reply.  I haven't tried your recommended
> --ignore-ancestry suggestion.  I will give that a spin.  For now, I
> found the following approach to work:
>
>
> 1) Determine what the release branch or tag you will be upgrading to and
> export a copy:
> svn export file:///htc/svn/ignitionweb_base/tags/RELEASE_3_3_2_BUILD_3
> ignitionweb_base
>
> 2) Now to import it into the client repository:
> svn_load_dirs file:///htc/svn/3macs/ -t branches/release_3_3_2_build_3
> branches/htc ignitionweb_base/
>
> 3) You know need to have a current up-to-date client svn sandbox:
> svn co file:///htc/svn/3macs/trunk 3macs
>
> 4) We now will merge the differences between branches/htc before and
> after the merge of release_3_3_2_build_3 into the current trunk. Before
> doing so, you need the revision number of branches/htc before the merge.
>
> cd 3macs
> svn merge file:///htc/svn/3macs/branches/htc@216
> file:///htc/svn/3macs/branches/htc
>
That should work since the files in the branch are all related. It looks like
the recommended practice with vendor branches, you might take
a look at that if you haven't already.

http://svnbook.red-bean.com/en/1.1/ch07s05.html

Josh

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


Re: Newbie Question 2: Merging across repositories

Posted by Michael Caplan <mi...@htc.ca>.
Hi Josh,

Thanks for the reply.  I haven't tried your recommended 
--ignore-ancestry suggestion.  I will give that a spin.  For now, I 
found the following approach to work:


1) Determine what the release branch or tag you will be upgrading to and 
export a copy:
svn export file:///htc/svn/ignitionweb_base/tags/RELEASE_3_3_2_BUILD_3 
ignitionweb_base

2) Now to import it into the client repository:
svn_load_dirs file:///htc/svn/3macs/ -t branches/release_3_3_2_build_3 
branches/htc ignitionweb_base/

3) You know need to have a current up-to-date client svn sandbox:
svn co file:///htc/svn/3macs/trunk 3macs

4) We now will merge the differences between branches/htc before and 
after the merge of release_3_3_2_build_3 into the current trunk. Before 
doing so, you need the revision number of branches/htc before the merge.

cd 3macs
svn merge file:///htc/svn/3macs/branches/htc@216 
file:///htc/svn/3macs/branches/htc


What are your thoughts on this approach?  I have to admit that 
svn_load_dirs is voodoo to me at this point!

Thanks,

Michael


Joshua Varner wrote:

>On 9/27/05, Michael Caplan <mi...@htc.ca> wrote:
>  
>
>>4) Merge changes:
>>    svn merge file:///htc/svn/3macs/branch/test
>>file:///htc/svn/3macs/trunk 3macs
>>
>>    
>>
>This is trying to take branch/test and generate the changes to
>make it match trunk, you want the URLS the other way.
>
>Since this is an import on the branch, you may also need
>to use --ignore-ancestry. Subversion thinks the new files on
>the branch are unrelated to the ones from the trunk so it may
>be deleting those and adding with history the ones from the
>branch.
>
>  
>
>>All the files common between repository 1 and the client repository get
>>marked for deletion?  How should I be approaching this problem?
>>
>>    
>>
>The above will work for now. You might want to put everything
>into one repos, since branches are easier to manage that way.
>Merging wasn't intended to work across repositories, it just
>currently does, so this behavior may or may not continue to be
>supported (or may require a --force option).
>
>Josh
>
>  
>


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