<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Branches &#8211; Subversion Conversion to Mercurial, Part 2</title>
	<atom:link href="http://rock.hymasfamily.org/blog/2010/04/08/branches-subversion-conversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://rock.hymasfamily.org/blog/2010/04/08/branches-subversion-conversion/</link>
	<description></description>
	<lastBuildDate>Mon, 06 Dec 2010 21:45:55 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kiruwa</title>
		<link>http://rock.hymasfamily.org/blog/2010/04/08/branches-subversion-conversion/comment-page-1/#comment-5419</link>
		<dc:creator>Kiruwa</dc:creator>
		<pubDate>Mon, 06 Dec 2010 21:45:55 +0000</pubDate>
		<guid isPermaLink="false">http://rock.hymasfamily.org/blog/?p=92#comment-5419</guid>
		<description>@Bryan: some minor variation on this (it will take minutes-hours, depending on repo size) will tell you where your deleted branches are. To pick them up, just do an hg convert -r … so convert the output of this into a largish list of consecutive hg convert calls.

(just indent after while and if&#039;s... outdent the fi&#039;s and done)

#!/bin/bash

repo=&quot;$1&quot;
end=${2:-&quot;0&quot;}

branch_sed=&quot;s&#124;^   D /prj/branches/&#124;&#124;&quot;

tip=`svn info &quot;$repo&quot; &#124; grep &quot;Last Changed Rev:&quot; &#124; sed &#039;s/.* //&#039;`
echo &quot;Scanning from $tip&quot;
while [[ $tip -gt $end ]]; do
    log=`svn log -l1 -v &quot;$repo&quot;@$tip`
    if [[ `echo &quot;$log&quot; &#124; grep -c &quot;^   D&quot;` -ge 1 ]]; then
        deletes=`echo &quot;$log&quot; &#124; grep &quot;^   D&quot; &#124;sed &quot;$branch_sed&quot;`
        if [[ `echo $deletes &#124; grep -c &quot;/&quot;` -eq 0 ]]; then
            rev=`echo &quot;$log&quot; &#124; grep -o &quot;^r[0-9]*&quot;`
            echo -e &quot;\n----Branches Deleted at rev $rev\n&quot;&quot;$deletes&quot;
            tip=`echo $rev &#124; sed &#039;s/r//&#039;`
        fi
    fi
    echo -n &quot;.&quot;
    let tip=tip-1
done
echo &quot;Done&quot;</description>
		<content:encoded><![CDATA[<p>@Bryan: some minor variation on this (it will take minutes-hours, depending on repo size) will tell you where your deleted branches are. To pick them up, just do an hg convert -r … so convert the output of this into a largish list of consecutive hg convert calls.</p>
<p>(just indent after while and if&#8217;s&#8230; outdent the fi&#8217;s and done)</p>
<p>#!/bin/bash</p>
<p>repo=&#8221;$1&#8243;<br />
end=${2:-&#8221;0&#8243;}</p>
<p>branch_sed=&#8221;s|^   D /prj/branches/||&#8221;</p>
<p>tip=`svn info &#8220;$repo&#8221; | grep &#8220;Last Changed Rev:&#8221; | sed &#8217;s/.* //&#8217;`<br />
echo &#8220;Scanning from $tip&#8221;<br />
while [[ $tip -gt $end ]]; do<br />
    log=`svn log -l1 -v &#8220;$repo&#8221;@$tip`<br />
    if [[ `echo "$log" | grep -c "^   D"` -ge 1 ]]; then<br />
        deletes=`echo &#8220;$log&#8221; | grep &#8220;^   D&#8221; |sed &#8220;$branch_sed&#8221;`<br />
        if [[ `echo $deletes | grep -c "/"` -eq 0 ]]; then<br />
            rev=`echo &#8220;$log&#8221; | grep -o &#8220;^r[0-9]*&#8221;`<br />
            echo -e &#8220;\n&#8212;-Branches Deleted at rev $rev\n&#8221;"$deletes&#8221;<br />
            tip=`echo $rev | sed &#8217;s/r//&#8217;`<br />
        fi<br />
    fi<br />
    echo -n &#8220;.&#8221;<br />
    let tip=tip-1<br />
done<br />
echo &#8220;Done&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://rock.hymasfamily.org/blog/2010/04/08/branches-subversion-conversion/comment-page-1/#comment-2710</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Fri, 28 May 2010 22:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://rock.hymasfamily.org/blog/?p=92#comment-2710</guid>
		<description>Hmm, so I played with this a bunch today and finally realized that hg convert doesn&#039;t find branches that have been svn deleted (as the svn book recommends you do when you are done with a feature branch).  My dreams of getting our whole svn history into mercurial are dying.

Manually creating a splicemap entry for each merge was looking to be a pretty tedious chore.  When convert doesn&#039;t even know about one of the revisions you specified because it&#039;s on a branch that got deleted, it gets even harder.

Maybe I missed something though?</description>
		<content:encoded><![CDATA[<p>Hmm, so I played with this a bunch today and finally realized that hg convert doesn&#8217;t find branches that have been svn deleted (as the svn book recommends you do when you are done with a feature branch).  My dreams of getting our whole svn history into mercurial are dying.</p>
<p>Manually creating a splicemap entry for each merge was looking to be a pretty tedious chore.  When convert doesn&#8217;t even know about one of the revisions you specified because it&#8217;s on a branch that got deleted, it gets even harder.</p>
<p>Maybe I missed something though?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rock</title>
		<link>http://rock.hymasfamily.org/blog/2010/04/08/branches-subversion-conversion/comment-page-1/#comment-2704</link>
		<dc:creator>Rock</dc:creator>
		<pubDate>Fri, 28 May 2010 01:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://rock.hymasfamily.org/blog/?p=92#comment-2704</guid>
		<description>Thanks, Bryan. Good to hear from you. I guess old habits die hard - I still have tacos on every birthday.</description>
		<content:encoded><![CDATA[<p>Thanks, Bryan. Good to hear from you. I guess old habits die hard &#8211; I still have tacos on every birthday.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://rock.hymasfamily.org/blog/2010/04/08/branches-subversion-conversion/comment-page-1/#comment-2703</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Thu, 27 May 2010 23:03:36 +0000</pubDate>
		<guid isPermaLink="false">http://rock.hymasfamily.org/blog/?p=92#comment-2703</guid>
		<description>Thanks for writing this!  I need to convert a subversion repo to mercurial at work and this pretty much answered all the questions I had about the process.

Also, congrats on the new job at Fog Creek!  I still remember hanging out at your house when we were about 8 years old, your cool computer with the compact cassette tape drive, and eating tacos at your birthday party.  Good times.</description>
		<content:encoded><![CDATA[<p>Thanks for writing this!  I need to convert a subversion repo to mercurial at work and this pretty much answered all the questions I had about the process.</p>
<p>Also, congrats on the new job at Fog Creek!  I still remember hanging out at your house when we were about 8 years old, your cool computer with the compact cassette tape drive, and eating tacos at your birthday party.  Good times.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

