Workflow with 'never commit broken changes'

Erik Bågfors zindar at gmail.com
Tue Jun 27 00:04:19 BST 2006


On 6/23/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
> Aaron's recent branch/merge/pull question reminded me of a subtle thing
> that the hg guys mentioned. One of the things Linus has told people is
> "never commit broken code, because then you can't use bisect search to
> find when a bug appears".
>
> Now, my understanding is that the hg guys wrote a bisect algorithm which
> is merge aware. They didn't go into the details, but it sounded like
> they used the merge graph to help eliminate revisions to check.
> In my head it works something like: go to a merge point, build and run
> the test. If it fails, check each parent, if one fails and the other
> doesn't you have isolated the branch that the change occurred on.

We've been thinking about the idea of a bugtracker that knows all
about different branches and revisions.  So that when you submit a
bug, you say "this is in branch 2.6" and if you then also find it in
trunk (that 2.6 is based on) then you most likely will also find it in
2.7 and 2.8. If you also find it in 2.4, it's most likely in 2.5, etc.

If you find that it does not exist in 2.8 and trunk, but it exists in
2.7, then there is most likely a bugfix somewhere along the
development in trunk, after 2.7 was branched and before 2.8 was
branched, and it shouldn't exist in 2.9.  etc, (unless it was fixed
after 2.8 was branched of course).

Don't know if this makes any sence without some drawings to explain it.

Anyway, if you then fix a bug, you commit with "bugfix for #348",
which will automatically close the bug in that branch, and show you
that you need to cherrypick/merge that bugfix into the other affected
branches to fix the problem.

This requires the VCS to understand cherrypicks better than bzr does
right now of course.

But I think a bugtracker that can sit outside of branches and know
about which branches has registered bug, would be really useful.

It's very late and this all gets very confusing pretty quick :)

Regards,
Erik




More information about the bazaar mailing list