Confused about stability of revno's

Nicholas Allen nick.allen at onlinehome.de
Wed May 26 16:29:12 BST 2010


> If the master had been init'ed with
>
>   bzr init --append-revisions-only
>
> Bob's push attempt would result in the following error:
>
> bzr: ERROR: Operation denied because it would change the main history, which is not permitted by the append_revisions_only setting on branch "master".
>
> ... and revno 2 in master would remain an alias for the same
> revision-id it was when that revision was first created in the master
> branch.
>
> For Bob to push his change in such a setup, he would then need to
> merge his own branch into (a copy of) the master branch (and then push
> the copy to master).
>   
Hi Stefan,

Note that using a bound branch makes this more convenient (without you
having to create your own local branch of master, merge your changes
into it, and then push). From a user's point of view, it would work
exactly the same way as it does in Subversion  (if the master branch has
the append_revisions_only setting and the user's branch is bound to the
master - see bind command). So in your example, Bob would have to run
"bzr update" before he could commit with "bzr commit". When he updates
his local changes appear as merged revisions.

He can still temporarily unbind (see unbind command), if he wants to
commit locally without committing to master or is offline for example.

Another approach to maintaining stable revnos in the master branch is to
use a gatekeeper style workflow where a robot processes a queue of merge
requests. This way you can also run an expensive test suite for every
commit to the master and only allow the commit if it doesn't cause
regressions. I've implemented an easy to use gatekeeper for Bazaar for
our own internal needs but it is not quite ready to be open sourced yet
- maybe I'll get around to that sometime. In the meantime there is
another one called PQM (patch queue manager) although I never had luck
getting this to work...

Hope this helps and have fun with Bazaar!

Cheers,

Nick



More information about the bazaar mailing list