<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>andthennothing.net: Handling multiple repositories with svn and svk</title>
  <subtitle type="html">&amp;ldquo;first there was a three-legged monkey...&amp;rdquo;</subtitle>
  <id>tag:andthennothing.net,2005:Typo</id>
  <generator uri="http://typo.leetsoft.com" version="4.0">Typo</generator>
  <link href="http://andthennothing.net/xml/atom10/article/2/feed.xml" rel="self" type="application/xml+atom"/>
  <link href="http://andthennothing.net/archives/2005/10/01/handling-multiple-repositories-with-svn-and-svk" rel="alternate" type="text/html"/>
  <updated>2005-12-18T03:19:00+00:00</updated>
  <entry>
    <author>
      <name>Jonas Bengtsson</name>
    </author>
    <id>urn:uuid:264bd84e-1ae4-4092-8da0-a33911a16f14</id>
    <published>2005-11-08T09:44:58+00:00</published>
    <updated>2005-12-18T03:19:00+00:00</updated>
    <title>Comment on Handling multiple repositories with svn and svk by Jonas Bengtsson</title>
    <link href="http://andthennothing.net/archives/2005/10/01/handling-multiple-repositories-with-svn-and-svk#comment-387" rel="alternate" type="text/html"/>
    <content type="html">I'm glad to hear that!</content>
  </entry>
  <entry>
    <author>
      <name>Eric Davis</name>
    </author>
    <id>urn:uuid:ba957a16-c77a-4985-8eee-a88c711d104f</id>
    <published>2005-11-08T03:45:43+00:00</published>
    <updated>2005-12-18T03:19:00+00:00</updated>
    <title>Comment on Handling multiple repositories with svn and svk by Eric Davis</title>
    <link href="http://andthennothing.net/archives/2005/10/01/handling-multiple-repositories-with-svn-and-svk#comment-386" rel="alternate" type="text/html"/>
    <content type="html">Thanks for this, it was what I needed to setup my repository structure.  I can now pull updates down from upstream, play around with it and apply my own patches in my local svk branch and finally push the update to my own svn repo.


Eric</content>
  </entry>
  <entry>
    <author>
      <name>Jonas Bengtsson</name>
      <email>jonas.b@home.se</email>
    </author>
    <id>urn:uuid:3067c42b-7001-4a39-b07d-b5a8d0441256</id>
    <published>2005-10-01T19:46:00+00:00</published>
    <updated>2005-12-18T03:19:02+00:00</updated>
    <title>Handling multiple repositories with svn and svk</title>
    <link href="http://andthennothing.net/archives/2005/10/01/handling-multiple-repositories-with-svn-and-svk" rel="alternate" type="text/html"/>
    <category term="svn" scheme="http://andthennothing.net/tags/2"/>
    <category term="svk" scheme="http://andthennothing.net/tags/2"/>
    <category term="scm" scheme="http://andthennothing.net/tags/2"/>
    <category term="typo" scheme="http://andthennothing.net/tags/2"/>
    <category term="writeup" scheme="http://andthennothing.net/tags/2"/>
    <content type="html">&lt;p&gt;On a day-to-day basis I&amp;#8217;m using &lt;a href="http://www.perforce.com/"&gt;Perforce&lt;/a&gt; at work for my &lt;acronym title="Software Configuration Management"&gt;SCM&lt;/acronym&gt; needs. I&amp;#8217;ve used &lt;a href="http://www.cvshome.org"&gt;CVS&lt;/a&gt; a few times back in the days but I&amp;#8217;ve tried to forget about it :-). But as I&amp;#8217;m migrating to my new web host I have to learn how to use Subversion (svn). The main issue I saw was how to manage multiple branches and repositories.&lt;/p&gt;


	&lt;p&gt;I asked at the &lt;a href="http://typo.leetsoft.com/"&gt;Typo&lt;/a&gt; mailing list, and a similar thread appeared on the &lt;a href="http://www.rubyonrails.org/"&gt;Rails&lt;/a&gt; mailing list, and the general recommendation was to use &lt;a href="http://svk.elixus.org/"&gt;svk&lt;/a&gt; (especially &lt;a href="http://article.gmane.org/gmane.comp.lang.ruby.rails/23701"&gt;this mail&lt;/a&gt; won me over). Other reference material I used was &lt;a href="http://scottstuff.net/blog/articles/2005/07/07/distributed-development-with-svk"&gt;this&lt;/a&gt;, &lt;a href="http://svk.elixus.org/"&gt;that&lt;/a&gt;, and &lt;a href="http://svnbook.red-bean.com/"&gt;the other&lt;/a&gt;. This is a writeup of how I went about &lt;em&gt;(it might not be that easy to understand and a little more explanations are probably needed for this to be helpful, but just ask me if there is something that you don&amp;#8217;t understand)&lt;/em&gt;:&lt;/p&gt;


	&lt;p&gt;Installing svk from &lt;a href="http://svk.elixus.org/?SVKWin32"&gt;here&lt;/a&gt;.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;svk depotmap --init
svk mkdir //typo
svk mirror svn://leetsoft.com/typo/trunk //typo/mirror
svk sync //typo/mirror
svk co //typo/mirror typo-mirror&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Seems to work.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m a little bit worried at this stage. I&amp;#8217;d like to use the &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; plugin &lt;a href="http://subclipse.tigris.org"&gt;subclipse&lt;/a&gt; when developing. Perhaps I should only use svk when migrating between different trees. Yes, I think I&amp;#8217;ll go for that, and to make it smooth I&amp;#8217;ll keep all svk checkouts (&lt;code&gt;svk co --list&lt;/code&gt;) in one directory called &lt;code&gt;svk&lt;/code&gt;. So let&amp;#8217;s relocate:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;svk co --relocate typo-mirror svk\typo-mirror&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;I might change my mind further down the line and want to use svk exclusively, but I don&amp;#8217;t expect that to be a problem since svk appears to be quite flexible.&lt;/p&gt;


	&lt;p&gt;Time to move into svn land. I need to create a trunk and a development tree on my Textdrive repository.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;svn mkdir http://urltorepository/trunk
svn mkdir http://urltorepository/branches
svn mkdir http://urltorepository/branches/dev&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

Time to chechout the svn branches:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;svn co http://urltorepository/trunk site-trunk
svn co http://urltorepository/branches/trunk site-dev&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Back in svk land.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;svk mirror http://urltorepository //site
svk sync //site
svk co //site/branches/dev site-dev&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Time to do a baseless merge from Typo to the dev branch:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;svk smerge --baseless //typo/mirror site-dev&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Since the dev branch was empty before it&amp;#8217;s safe to commit the changes without reviewing: &lt;code&gt;svk commit&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;Time to update Typo with the changes I&amp;#8217;ve done previously. &lt;code&gt;svn update&lt;/code&gt; in my site-dev checkout. Firing up a favourite open source utility of mine: &lt;a href="http://winmerge.org/"&gt;WinMerge&lt;/a&gt;. Takes a while to merge all the files, but now I&amp;#8217;m done, just have to try out if it works alright. It seems to work fine. &lt;code&gt;svn status&lt;/code&gt;. Hmm, most of my customizations of Typo is in the views, and looking at this &lt;a href="http://typo.leetsoft.com/trac/ticket/354"&gt;ticket&lt;/a&gt; Typo is apparently supporting themed views, have to try it out&amp;#8230; Yes it works, neato! &lt;code&gt;svn add&lt;/code&gt; on all the new files and &lt;code&gt;svn commit&lt;/code&gt;.&lt;/p&gt;


Back to svk to integrate to the trunk. 
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;svk sync //site
svk co //site/trunk andthennothing-trunk&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

Migrating from the dev branch to trunk: 
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;svk smerge --baseless //site/branches/dev site-trunk
svk commit&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;I think that&amp;#8217;s it and hope it will be quite easy to manage in the future. There are two main cycles I&amp;#8217;ll be performing. One is getting updates from the Typo repository, and then migrate the changes to the dev branch to the trunk. The other one is migrating changes I&amp;#8217;m doing to the dev branch to the trunk. Both of those should be quite easy to manage in svk. I think that the dev branch might be unnecessary, but I&amp;#8217;m used to working with a lot of different branches (release, import, team, personal etc.) so that&amp;#8217;s how I&amp;#8217;m feeling comfortable at the moment. But it will probably be quite easy to remove the dev branch if deemed unnecessary.&lt;/p&gt;


	&lt;p&gt;Both svn and svk are new and welcomed acquaintances. Working in the command prompt with &lt;span class="caps"&gt;SCM&lt;/span&gt; tools were nicer than I thought and remembered. Hopefully I will have the same opinion in a couple of weeks when I have a little more experience with merging and resolving conflicts (I&amp;#8217;m somewhat worried that it will be cumbersome). svn&amp;#8217;s poor support for branches and merging is my main pet peeve, but svk handled that nicely. I would go for a svk only (on the client side) if there were a Eclipse plug-in.&lt;/p&gt;


	&lt;p&gt;Nice learning experience!&lt;/p&gt;</content>
  </entry>
</feed>
