Whole tree up to date before committing

Tom Widmer tom.widmer at googlemail.com
Fri Oct 23 15:48:45 BST 2009


Óscar Fuentes wrote:
> Nicholas Allen <nick.allen at onlinehome.de> writes:
> 
> [snip]
> 
> Instead of answering to all you guys trying to explain once again why is
> not a good idea to replace our current workflow with a gatekeeper or a
> PQM, I'll expose what I think could be a solution.
> 
> We need that every developer test its changes before sending them to
> trunk (the builbots would fail way too often otherwise, apart from
> making havoc among those who would update their working copies to a
> broken state) and we need to enforce this policy by means of exposing a
> credible method for supervising it.
> 
> One possible solution is to use one branch per developer on the central
> location (where the master branch resides). A developer tests his
> changes, merges from `master' and pushes to his personal central
> branch. Then, automatically, this branch pushes to `master'.
> 
>        merge                      push
> master -----> joe's local branch ------> joe's central branch
>   ^                                               |
>   |_______________________________________________|
>                          push
> 
> This way every time a developer pushes to his personal central branch,
> there is one or more revisions for his tested changes, and maybe a final
> revision that carries the merge with the `master' branch immediately
> before he pushed. So we know what he tested (or ought to test) and what
> was not tested.
> 
> There is plenty of room for collisions here, and dealing with them adds
> quite a bit of complexity, but collisions would not happen too often,
> because we would dealing with timeframes of typically much less than a
> minute.

You could possibly simplify this. Just have the shared central branch, 
and use checkouts and local commits. Then the developer does:

develop change
update and deal with conflicts
test change
commit --local // now we know what he tested
push // try to get the change to the central server
if push failed, then
   update // does a merge, since branch is bound
   commit // commits merge changeset to central server

Tom




More information about the bazaar mailing list