[DEV] Setting up a shared-repository to work with branches

Created by Alberto Garcia on on 2016-02-19
Keywords:
devs
Last updated by:
Nick Papior on on 2017-10-07

Any developer wishing to periodically track and/or commit to the siesta code base is encouraged to use the "shared repository" format of bzr.

First one should follow the regular bzr guidelines for setting up a user-account etc. If you already have this, you may skip step 0.

0. Create user account and setup your local bzr command. A full description can be found here:
http://doc.bazaar.canonical.com/latest/en/mini-tutorial/#introducing-yourself
and steps 1 through 3 in the following:
http://doc.bazaar.canonical.com/latest/en/mini-tutorial/#publishing-your-branch-on-launchpad
but in short, they are:
  bzr whoami "John Doe <john.doe@gmail.com>"
set your name and email address as in the above example.
0a) Go to Launchpad login page and create a new user (ONLY if you do not have any):
https://launchpad.net/+login
0b) Create an ssh key for interacting with Launchpad
  ssh-keygen
0c) Add your ~/.ssh/id_rsa.pub key to your users list of known keys (https://launchpad.net/~/+editsshkeys)
Now you have created access to the Launchpad site and you may create branches etc.

To conform with the siesta maintainers you should follow these steps to create a shared repository.
In the following we will follow a recipe for creating a new siesta shared repository:

1. Create folder to contain the root shared repository:
   mkdir siesta
2. Make bzr aware of the directory as a shared repo:
   bzr init-repo siesta
3. Go into the siesta folder and branch of the trunk, and possibly any other branch you wish to keep locally:
   # create the trunk version and call it "trunk", the first branch will take "forever" to create
   bzr branch lp:siesta trunk
   # create the 4.0 release series and name it 4.0, this will be much faster to create
   bzr branch lp:siesta/4.0 4.0
keep adding branches until you have those you need.

Basically these steps ensures a single repository for maintaining a shared commit log for shared repositories. Please see this webpage for further details on the advantages:
   http://wiki.bazaar.canonical.com/SharedRepositoryTutorial

Now your work-flow is much faster as branching of is a shared action.

* This need not be empty, however, we strongly advice you to do so until you fully understand the implications of the actions in bzr.