Emails that I love

One of the things that I do for work is take care of our users. This subset of my work activities is far and above one of my favorite parts. How could someone not like doing this, when things like the below email are always waiting for your return to the computer?

In this email Guillaume is asking how to run one of the more popular hybrid development models. The model is partially decentralized one in that everyone gets their own branch. Its also a partially centralized model, as everyone merges to and from a centralized branch. Sure, its not the only model that Bazaar-NG supports (we have support both fully centralized and fully centralized models as well), but its my favorite.

The model works something like this:

* Put a branch in a public place in a place that all of your developers can write. Also, make sure that the umasks allow each of the developers to write. My favorite way of doing this is setting up one account that all the coder can ssh to.
* Each developer branches off of that central branch.
* Every coder commits in his local branch whenever he wants.
* From time to time, each coder merges from the central branch.
* From time to time, right after merging, he "bzr pushes" into the central branch.

This is an awesome model because not only can everyone can commit without being online, but they can also get the changes from all of the other developers without having to chase everyone else around.

Anyways, on to Guillaume's email, which includes an expansive description of the above:

Thanks a *lot* for your answers!

Things are much MUCH clearer now. We will do as you suggest.
Of course, you can publish this in a puclic place! I am sure that your
answer could benefit some other persons (feel free to edit my questions
as well so nobody will notice my english :) )

Thanks again!

Yours,
Guillaume.

On Fri, 2006-02-24 at 07:05 -0500, James Blackwell wrote:
> Would you mind if I posted this in a public place?
> 
> On Fri, Feb 24, 2006 at 12:00:13PM +0100, Guillaume Schmid wrote:
> > Hello!
> > 
> > You are listed as an Ambassador for Bazaar-NG who enjoy helping other.
> > I hope that you wont mind a few clueless newbie questions :)
> 
> Yupyup. I eat newbie questions for lunch. =)
> 
> > I am responsible for a small dev team in biomed research and until the
> > last revision, we used CVS. I switched to tla and bazaar just after when
> > I started to code the next version of our project (major rewrite) as I
> > thought that it was nice to learn to use a decentralized system.
> > I am sure I only used a very small subset of bazaar features and never
> > used it as a real decentralized system (I was the only one working on
> > this at this time). 
> >
> > I am experimenting with Bazaar-ng for my development team and already
> > converted my sources but there are some points I dont really anderstand
> > and an other developper is joining me on the project (the others are
> > still working on the previous code base).
> 
> Ok. This is certainly something that I can help you with. One of the
> things that we support that can really help you here is the ability to
> push onto a branch for which you have already fully merged.
> 
> > With our previous versioning system (CVS), it was rather simple. There
> > was a repository, every developper could checkout/hack/commit and sync
> > to retrieve other developpers modifications. Of course there was a lot
> > of problems with sharing commits only by 2 developpers before comitting
> > to the others, renames, offline verioning...
> 
> If you're really looking for something CVS like, then we also support
> checkouts. The performance over the network isn't what I would call good,
> so I'd suggest something more along the lines of the process I've outlined
> here.
> 
> > But the model was simple. We could tag, create branches for the versiosn
> > of our softwares very easily and make release branches.
> > This is the part I dont really anderstand with Bazaar-NG.
> > Is it possible to have a common repository for our sources where
> > everybody send updates, sync from and where we could create tags for
> > releases ?
> 
> Yeah, we can do that for you. It would look something like this:
> ----------------------------------------------------------------
> 
>                          ,----------------.
>                          |   server       |
>                          |                |
>                          |[Shared Branch]<---- Branch A
>                          |    |     |     |
>                          `--- | --- | ----'
>                               |     |
>                  ,->--<-->--<-'     '->-<->-<--.
>             ,--- | ----.                  ,--- | ----.
>             |    |     |                  |    |     |
>             | [your  ]<---- Branch B      | [his   ]<----Branch C
>             | [branch] |                  | [branch] |
>             |          |                  |          |
>             |Your Box  |                  | His Box  |
>             `----------'                  `----------'
> 
> * First, create branch B:
>     $ tar xvfz sources.tgz   [this makes dir named B]
>     $ cd B
>     $ bzr init 
>     $ bzr add
> 
> * Now, push the branch to a place where you can 
>     $ bzr push --remember sftp://server/home/sharedaccount/A
> 
> * Now, he'll make his own branch:
>     $ bzr branch sftp://server/home/sharedaccount/A C
>     $ cd C
> 
> We should now have three branches on three different machines. This gives you:
> -----------------------------------------------------------------------------
> 
>  * Both of you can commit to your own branch
> 
>  * Both of you can "bzr merge" the server (A) branch. Don't forget to
>    commit to your local branch!
> 
>  * Either of you can merge the other person. Again, don't forget to comit
>    to the branch that was merged!
> 
> ** you can both push to the server (A) branch. You may have to merge from
>    the server (A) branch first.
> 
> The process looks something like this:
> --------------------------------------
> 
> 1. You make changes in your branch wnenever you want and commit
> 2. He is doing the same thing.
> 3. Whenever you want to catch up to the main branch, you'll first merge
>    the main branch into your branch and commit. Then, you'll push your
>    branch into the main branch.
> 4. He'll do the same thing.
> 
> 
> > I know it is possible to sync from other persons branches how can the
> > developper send his modification to a reference branch ?
> > I find this way of working simple and convenient, maybe we have to adapt
> > to a different system.
> 
> Definitely. The trick to do this is to run "bzr push" onto that other
> branch. An important point is that you can not push to a branch if it has
> changes that you have not merged yet. You solve this by merging it first.
> 
> > Could you enlighten me on the subject ?
> > 
> > I am sorry for the big mail...
> > Thank you for your time.
> 
> Hah! Mine is BIGGER!
> 
> > 
> > Yours,
> > Guillaume Schmid
> > 
> 
> I am here and at your service. 
> 
> Regards,
> James

Comments

Umask by jameinel