[PATCH] Implement --strict flag for commit

David Allouche david at allouche.net
Wed Oct 19 14:00:47 BST 2005


On Tue, 2005-10-18 at 09:17 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> David Allouche wrote:
> > Case A: The Contributor will always submit changes that are valid to the
> > Maintainer, since the Contributor is stricter than the Maintainer.
> > Social peace ensues.
> 
> I disagree that either strict or loose can cause the contributor to
> submit changes that are invalid to the maintainer.  --strict only
> applies to the working tree.

You have point, I was a bit vague with that "valid" thing. Here's a
concrete example:

The Maintainer is a Strict guy and likes test case that clean up after
themselves, but the Contributor writes a test case that leaves some junk
around.

If the Contributor is Strict guy too, he'll notice the problem
immediately (since bzr won't commit with this junk around) and fix it
before it gets to the Maintainer.

If the Contributor is a Loose guy, and strict commit is a user setting,
then he will just not notice the junk. The patch will reach the
Maintainer without being fixed. After merging the patch and running the
test suite, the Maintainer won't be able to commit without doing
additional changes or cleanup: the change is invalid, it is not
acceptable to the Maintainer.

Now, if the Contributor is Loose, but strict commit is a branch setting,
then the Contributor will notice the issue, but still has the option to
add the junk file to the ignores. In that case, merging the change and
running the test suite won't prevent the Maintainer from committing, but
the change is still invalid, because it does not comply with the
Maintainer's policy that test cases must clean up after themselves.

The bottom line is, per-branch strictness is ineffective as enforcing
policy. The proper place to enforce policy is the review process. But
per branch policy can be an annoyance when Maintainer and Contributor
have differing tastes, tools or development methods.
-- 
                                                            -- ddaa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051019/70dbd334/attachment.pgp 


More information about the bazaar mailing list