<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hauru &#187; tools</title>
	<atom:link href="http://hauru.eu/tag/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://hauru.eu</link>
	<description>Personal techblog by Tomek Paczkowski</description>
	<lastBuildDate>Wed, 07 Apr 2010 22:49:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Bazaar with Master Branch</title>
		<link>http://hauru.eu/2008/07/31/bazaar-master-branch/</link>
		<comments>http://hauru.eu/2008/07/31/bazaar-master-branch/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 19:28:11 +0000</pubDate>
		<dc:creator>oinopion</dc:creator>
				<category><![CDATA[Techblog]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.hauru.eu/?p=9</guid>
		<description><![CDATA[Problem statement I have a bit svnish view of writing software: there should be one master branch for project just not to confuse users of your code where to get the most recent code from. I&#8217;m writing a little app (I&#8217;ve posted about it earlier) with my girlfriend and we wanted to share and control [...]]]></description>
			<content:encoded><![CDATA[<h3>Problem statement</h3>
<p>I have a bit svnish view of writing software: there should be one master branch for project just not to confuse users of your code where to get the most recent code from.</p>
<p>I&#8217;m writing a little app (I&#8217;ve posted about it earlier) with my girlfriend and we wanted to share and control code with possibly <a href="http://bazaar-vcs.org">the best DVCS in the world</a>. Bazaar promises an easy way for svn people to support central/master branch workflow. Or so I thought.</p>
<h3>Early attempt</h3>
<p>I was to confident with bazaar easiness. So I made <code>bzr push</code> over sftp to some directory on hauru.eu and told my girlfriend it&#8217;s ready. But it wasn&#8217;t: all files had my user permissions (uid/gid) and she couldn&#8217;t check anything in. So&#8230; It&#8217;s not so easy. I could change initial group for both of us, but this is not general solution (it wouldn&#8217;t work on WebFaction shared hosting where you can&#8217;t change initial group).</p>
<p>Heaving previous experience with setting svn central repository I tried to <code>bzr serve</code> the code. But this is simplistic mechanism with no read-write authentication support.</p>
<h3>SGID to the rescue</h3>
<p>With an advice from <a href="http://squarewheel.wordpress.com">Paweł</a> I tried setting <a href="http://en.wikipedia.org/wiki/Setuid">SGID</a> on repository directory. It sounded as a good idea, but it didn&#8217;t work. I was desperate, but I took another shot and browsed the web for solutions with SGID.</p>
<p>It seems there is bug in OpenSSH or python-paramiko or in bazaar sftp support and it doesn&#8217;t honor SGID properly. But with smart-server, that is <strong>bzr+ssh</strong> it does. Moreover it works much faster than sftp. So it&#8217;s double win.</p>
<h3>Complete solution</h3>
<p>In four steps:</p>
<ol>
<li>on server create empty repo folder</li>
<li>change group to some common (users or bzr or your-project)</li>
<li>set SGID on the folder</li>
<li>now you can push your branch with
<pre><code>bzr push bzr+ssh://server/repo-path</code>
<pre></li>
</ol>
<p>Every one in group can check code in and out.</p>
<p>Of course this should not stop you from having as many side branches as you want, but it's good to have a single code branch you can always refer to.</p>
]]></content:encoded>
			<wfw:commentRss>http://hauru.eu/2008/07/31/bazaar-master-branch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
