Recording branch points
John Arbash Meinel
john at arbash-meinel.com
Sat Sep 9 22:33:21 BST 2006
David Allouche wrote:
> John Arbash Meinel wrote:
>> 3) It does raise the question of whether we want 'bzr branch' to act
>> just like cp -a. I know we've discussed it, and that is our current
>> design. But there are some advantages if doing 'bzr branch' actually set
>> a checkpoint in the branch, indicating it is a new branch, that starts a
>> different line. 'pull' would reset that marker.
>
> That would make my job much, much easier.
>
> There is currently a model mismatch between bzr and Launchpad: the bzr
> model really only knows about revisions, while Launchpad has an explicit
> branch model. This disconnect makes it impossible to reliably[1]
> determine whether a revision seen by Launchpad in a branch genuinely
> belongs to that branch or if its part of the ancestry baggage from the
> parent branch.
>
> [1] as usual, one can imagine heuristics based on the committer and
> the branch nick, but it would be ugly and fragile.
Well, to do this, we would have to start creating some sort of UUID for
each branch, and have it recorded along with the rest of the revision
properties. As well as being reset by certain operations.
And 'bzr checkout' shouldn't reset it, and 'bzr bind' should set it to
the remote value, etc, etc.
>
> This hurts every time Launchpad wants to automatically attach
> information to a branch. For example:
>
> * I would like the branch page to make a distinction between "new
> revisions in that branch" and "base history".
> * It can cause incorrect automatic linking of a bug to a branch.
> * It makes it difficult to determine significant information like
> "Branches based on this one" and "Branches which merged this one".
> * It makes "branch heat" (something the SABDFL is very keen on having)
> impossible to define rigorously.
>
> For the cases where the branch identity needs to be preserved, "bzr
> clone" could be used. Fortunately, it is my impression that what people
> normally use and advertise is "bzr branch". So although Launchpad would
> still have to cope with branch cloning, it would not be the common case.
>
> Caveat: my mind is not very clear at the moment, so maybe I am being
> over-enthusiastic. Comments greatly appreciated.
>
I think it is possible. And it should be discussed. Even if bzr itself
doesn't do much with it, it might be reasonable to do just for launchpad.
I don't think it is terribly hard, but it should be thought through
thoroughly.
I went ahead and created a spec page for it:
https://launchpad.net/products/bzr/+spec/branch-identity
Feel free to flesh that out a bit more than I have done.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060909/716b3689/attachment.pgp
More information about the bazaar
mailing list