HOWTO use bzr with OCamlForge

Table of contents
Bazaar
Developer access
Setting up your repository
FAQ
 

Bazaar

Bazaar (also known as bzr) is an easy to use, distributed, version control system with an emphasis on correctness and robustness that allows a great variety of workflows.

Before going any further, we recommend you read the five minute tutorial. The explanations below are just meant to help you to find your marks. It emphasizes the points specific to OCamlForge. Please refer to the official documentation for more details.

Developer access to an existing repository

Setting up your repository on OCamlForge

FAQ

Login name

If your ocamlcore login name — let us call it logcore — is different from your local machine login, you have two possibilities. First, you can specify it in the URL:
sftp://logcore@bzr.ocamlcore.org//bzrroot/...
Second, if you use openssh, create a file ~/.ssh/config containing
Host *.ocamlcore.org
  User logcore
  Compression yes

bzr ≤ 1.5

If you use bzr ≤ 1.5 (and do not want to upgrade), you must take care of a couple of additional things due to a sftp bug deleting the sgid bit (a workaround has been commited in bzr 1.6). First, when you create your repository, choose a packed format with --pack-0.92 or --rich-root-pack. With --rich-root-pack, you have the added bonus that you will also be able to use the bzr-svn plugin to store your history under SVN. Second, after the first push of a branch, you must enable the sgid bit on your directories. To do that, ssh bzr.ocamlcore.org and issue
cd /bzrroot/unix-name/module-name/
chgrp -R scm_unix-name .
find . -type d -exec chmod g+s {} \;
You do not need to do this after subsequent pushes of the same branch. (The reason for choosing a pack format here — in addition to their better efficiency — is that no new directories will be created after the initial push.)