Whole tree up to date before committing
Stephen J. Turnbull
stephen at xemacs.org
Fri Oct 23 06:30:25 BST 2009
Óscar Fuentes writes:
> Too often I judged a change trivial, commit it and later had to confront
> some angry fellows. Maybe a full build can be avoided if the change is
> very localized, but I would think thrice before committing without
> running the test suite.
Note that as I point out elsewhere, it is very easy to lie about a
successful full build in Subversion, because it would be very
expensive to prove that the developer didn't have a working tree where
the build/test would succeed. Agreed, this wouldn't be possible with
bzr (or git or hg) which implements the post-push hook described
below.
> I really appreciate bzr flexibility here. It was surprising to me
> fo find that bzr *imposes* the "whole tree up to date" policy. I
> guess that supporting the "file up to date" policy is complex.
It wouldn't be that hard, and could be done with a post-push hook that
automatically does a "trivial merge" (ie, one where a file conflicts
if any change at all has been made in both branches).
However, those merges would be visible in the history, and your team
would realize that all that testing is being done on versions that are
*never* tip of the mainline. Surely that would bother somebody!
More information about the bazaar
mailing list