<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Code V.igoro.us - svnmerge</title>
    <link>http://code.v.igoro.us/</link>
    <description>Dustin J. Mitchell</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.6 - http://www.s9y.org/</generator>
    <pubDate>Tue, 19 Jan 2010 10:59:27 GMT</pubDate>

    <image>
        <url>http://code.v.igoro.us/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Code V.igoro.us - svnmerge - Dustin J. Mitchell</title>
        <link>http://code.v.igoro.us/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>A future for Svnmerge?</title>
    <link>http://code.v.igoro.us/archives/31-A-future-for-Svnmerge.html</link>
            <category>svnmerge</category>
    
    <comments>http://code.v.igoro.us/archives/31-A-future-for-Svnmerge.html#comments</comments>
    <wfw:comment>http://code.v.igoro.us/wfwcomment.php?cid=31</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://code.v.igoro.us/rss.php?version=2.0&amp;type=comments&amp;cid=31</wfw:commentRss>
    

    <author>nospam@example.com (Dustin J. Mitchell)</author>
    <content:encoded>
    &lt;p&gt;Svnmerge has always been the kid brother of Subversion.  It&#039;s in the project&#039;s &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/svn.apache.org/viewvc/subversion/trunk/contrib/client-side/svnmerge/&#039;]);&quot;  href=&quot;http://svn.apache.org/viewvc/subversion/trunk/contrib/client-side/svnmerge/&quot;&gt;contrib&lt;/a&gt; directory, and is thus unversioned.  Since it&#039;s a single Python script, users just download it directly from the repository.  In the last year, the script has only seen a few non-trivial commits, and the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.orcaware.com/mailman/listinfo/svnmerge&#039;]);&quot;  href=&quot;http://www.orcaware.com/mailman/listinfo/svnmerge&quot;&gt;mailing list&lt;/a&gt; has been almost silent.&lt;/p&gt;

&lt;p&gt;There are some simple reasons for decline.  First, Subversion itself, in version 1.5, has adopted some of the functionality of Svnmerge.  In particular, svn now uses properties (&lt;tt&gt;svn:mergeinfo&lt;/tt&gt;) to track the revisions that have and have not been merged into a particular branch.  There are some limitations, of course.  Most obviously, a branch can only be &quot;reintegrated&quot; into trunk once, which is not the workflow of many Svnmerge users.  Also, to my knowledge, Subversion cannot merge between repositories, while Svnmerge can.&lt;/p&gt;

&lt;p&gt;Second, Git, Mercurial, and other DVCS&#039;s now provide strong support for merge-heavy workflows.  Both tools also have excellent &quot;gateways&quot; to Subversion.  For example, Amanda&#039;s &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/github.com/zmanda/amanda/&#039;]);&quot;  href=&quot;http://github.com/zmanda/amanda/&quot;&gt;Github repository&lt;/a&gt; tracks the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/amanda.svn.sourceforge.net/viewvc/amanda/&#039;]);&quot;  href=&quot;http://amanda.svn.sourceforge.net/viewvc/amanda/&quot;&gt;Subversion repository&lt;/a&gt; using some simple shell scripts.&lt;/p&gt;

&lt;p&gt;Between these two forces, I think that much of the audience for Svnmerge has disappeared.  Those left, sadly, will see even less support. &lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sun, 17 Jan 2010 20:34:23 +0000</pubDate>
    <guid isPermaLink="false">http://code.v.igoro.us/archives/31-guid.html</guid>
    
</item>
<item>
    <title>Improving svnmerge</title>
    <link>http://code.v.igoro.us/archives/7-Improving-svnmerge.html</link>
            <category>svnmerge</category>
    
    <comments>http://code.v.igoro.us/archives/7-Improving-svnmerge.html#comments</comments>
    <wfw:comment>http://code.v.igoro.us/wfwcomment.php?cid=7</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://code.v.igoro.us/rss.php?version=2.0&amp;type=comments&amp;cid=7</wfw:commentRss>
    

    <author>nospam@example.com (Dustin J. Mitchell)</author>
    <content:encoded>
    &lt;p&gt;&lt;p&gt;There&#039;s been a lot of writing about svnmerge: Ken Kinder &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/kenkinder.com/svnmerge/&#039;]);&quot;  href=&quot;http://kenkinder.com/svnmerge/&quot;&gt;wrote a nice introductory article&lt;/a&gt; on the topic, and now there&#039;s a &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.orcaware.com/svn/wiki/Svnmerge.py&#039;]);&quot;  href=&quot;http://www.orcaware.com/svn/wiki/Svnmerge.py&quot;&gt;wiki&lt;/a&gt; and even a &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.orcaware.com/mailman/listinfo/svnmerge&#039;]);&quot;  href=&quot;http://www.orcaware.com/mailman/listinfo/svnmerge&quot;&gt;mailing list&lt;/a&gt;.  Maybe someday soon it will depart the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/svn.collab.net/repos/svn/trunk/contrib/client-side/svnmerge/&#039;]);&quot;  href=&quot;http://svn.collab.net/repos/svn/trunk/contrib/client-side/svnmerge/&quot;&gt;contrib/ purgatory&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;p&gt;One unusual use of svnmerge is to &quot;branch&quot; a public subversion repository into your local repository, to allow local development while still tracking the public trunk.  This is related to vendor branches, but is more suited to the case where you&#039;ll be submitting changes back to the project, and is particularly useful if you have commit permission on the public repository.  For me, I was merging from the Python repository (&lt;tt&gt;http://svn.python.org/projects/python/trunk/&lt;/tt&gt;) to my own private repository (let&#039;s call it &lt;tt&gt; http://svn.v.igoro.us/python/trunk&lt;/tt&gt;).&lt;/p&gt;

&lt;p&gt;&lt;p&gt;Svnmerge has a few weaknesses, but one that surprised me was this: while svnmerge can manage changes between different repositories, it &lt;i&gt;can&#039;t&lt;/i&gt; do so when the repository-relative path is the same in each branch.  In this case, the repository-relative path for both is &lt;tt&gt;/python/trunk&lt;/tt&gt;, so svnmerge complains:&lt;/p&gt;

&lt;pre&gt;
svnmerge: cannot init integration source &#039;/python/trunk&#039;
It must differ from the repository-relative path of the current directory.
&lt;/pre&gt;

&lt;p&gt;&lt;h1&gt;Getting Under The Hood&lt;/h1&gt;
To understand why this limitation exists, you need to look at how svnmerge works its magic.  For each managed branch, svnmerge keeps a list of the revisions in the source branch that have been merged.  By default, this list is stored in the property &lt;tt&gt;svnmerge-integrated&lt;/tt&gt;, looking like &lt;tt&gt;/python/trunk:1-54918,54920-54926&lt;/tt&gt;.  When merging new changes (&lt;tt&gt;svnmerge merge&lt;/tt&gt;), this property gets updated to reflect the newly merged revisions.  The problem, in this case, is that the identifier for the branch does not include any information for the repository: does this property list revisions in my repository, or in the Python repository?&lt;/p&gt;

&lt;h1&gt;The Fix&lt;/h1&gt;

&lt;p&gt;The solution I found to this problem was to qualify the properties with an identifier for the repository.  For most repositories, the obvious choice is to use a full URL, e.g., &lt;tt&gt;http://svn.python.org/projects/python/trunk:1-54918,54920-54926&lt;/tt&gt;.  For repositories which might be accesed via different URLs by different people, the UUID might be a better idea, e.g., &lt;tt&gt;uuid://6015fed2-1504-0410-9fe1-9d1591cc4771/python/trunk:1-54918,54920-54926&lt;/tt&gt;.  To be general, I introduced the notion of a &quot;location identifier&quot; to specify the location of a branch.  Currently, there are three location identifier formats: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;b&gt;path&lt;/b&gt;: the &quot;old way&quot; with a simple repository-relative path
&lt;li&gt;&lt;b&gt;url&lt;/b&gt;: a fully qualified URL for the branch
&lt;li&gt;&lt;b&gt;uuid&lt;/b&gt;: a UUID-based identifier
&lt;/ul&gt;

&lt;p&gt;When initializing a new branch, you can specify one of these formats with the &lt;tt&gt;--location-type&lt;/tt&gt; flag:&lt;/p&gt;

&lt;pre&gt;
$ svnmerge init --location-type uuid http://svn.python.org/projects/python/trunk
property &#039;svnmerge-integrated&#039; set on &#039;.&#039;
$ svn pg svnmerge-integrated .
uuid://6015fed2-1504-0410-9fe1-9d1591cc4771/python/trunk:1-54928
&lt;/pre&gt;

&lt;h1&gt;The Future&lt;/h1&gt;

&lt;p&gt;Subversion 1.5 promises to support merge tracking natively.  From what little I&#039;ve seen, it does this using a similar technique -- keeping lists of revisions in properties.  However, the developers are not recommending that folks all convert to 1.5 immediately -- it looks like it will be a significant change that needs some serious testing first.  Even if it were stable, most Linux distros are so slow to upgrade that it&#039;s reasonable to assume we&#039;ll all be using 1.3 for a good while.&lt;/p&gt;

&lt;p&gt;This patch is in the submission process on the mailing list, but an updated version of svnmerge.py is available &lt;a href=&quot;http://code.v.igoro.us/files/svnmerge.py&quot;&gt;on this site&lt;/a&gt;, if you&#039;d like to take it for a spin.  Any feedback would be appreciated!&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Mon, 23 Apr 2007 23:44:46 +0000</pubDate>
    <guid isPermaLink="false">http://code.v.igoro.us/archives/7-guid.html</guid>
    
</item>

</channel>
</rss>