Working on several branches at the same time
James Westby
jw+debian at jameswestby.net
Tue Jun 17 09:02:12 BST 2008
On Tue, 2008-06-17 at 14:43 +0900, David Cournapeau wrote:
> James Westby wrote:
> >
> > The difference between whether you can do a merge or a pull isn't how
> > many commit you made on the fixbug branch, it's whether there have
> > been any new commits on mainline in the meantime.
> >
>
> Yes, of course, my wording was really poor. What I meant was that when
> fixing bugs, I have two situations:
> - quick fix (wrong spelling in a variable name, etc...), one commit
> with the message "Fix bug N".
> - longer change: a serie of commits, no message "Fix bug N."
>
> Then, I pull the fix in case 1, or merge in case two with the message
> "Fix bug N." This is also linked to the --fixes option of commit. I am
> not quite sure to understand at which point to use it.
>
You can use that at any time you like. You would use it when you commit
a revision that you believe fixes that particular bug. It's not a
concrete rule, but that's all we can say I think.
> > It's possible to have that, but you are not only doing rebase operation,
> > but mutating revisions as you go, so there is more room for unexpected
> > behaviour.
> >
>
> What do you mean by mutating revisions ? Can bzr do that (I mean without
> messing with bzr internals) ? What for ?
Consider the case where you have made multiple commits to fix the bug,
if you want to get that fix on to mainline in one commit without a merge
commit then you have to do a rebase, but as well as "moving" the
revisions you would have to "squash" them together in to one commit.
I've just realised that you can do this in bazaar already without using
the rebase plugin using the --forget-merges operation.
If you are happy with using a merge into mainline in the multiple
commits case then you are just left with the single commit case, and
bringing that in to your feature branch, both of which are possible
with no merge commit using a simple rebase operation.
Would that get you to where you wanted? If not then I may have lost
the thread somewhere along the way, could you please expand a bit more
about what case you are still thinking about?
Thanks,
James
More information about the bazaar
mailing list