Jan 26, 2008

Setting Up A Shared Bazaar Repository

Currently I'm using a Decentralized Shared Mainline Repository. Here's my recipe...

You will of course need a server that's accessible to everyone.

Create a group for project.

$> groupadd projectname

Create an login for each of the users who will have commit access to the shared mainline.
$> adduser --ingroup projectname username

Create a directory for the repostitory inside the web servers document root
$> mkdir /var/bzr/projectname

Set the project folders group to the project groups name
$> chown :projectname /var/bzr/projectname

Set the project folders permissions
$> chmod ug+rwx,g+s,o+rx,o-w projectname

Now you can push updates
$> bzr push bzr+ssh://hostname/var/bzr/projectname


If you need to provide anonymous access to the repository one way would be to serve it with Apache.
Alias /bzr "/var/bzr"
<Directory "/var/bzr">
Options +Indexes +MultiViews +FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>

This would allow you to do something like this
$> bzr branch http://hostname/bzr/projectname

No comments: