Definition of branch?

Tim Hill drtimhill at comcast.net
Thu Jan 24 20:27:36 GMT 2008


Thanks for the clarification everyone. I'm going to attempt a "Bazaar  
ChatSheet" for my own use and i'd be more than happy to post it  
somewhere for comments and/or to help others (assuming its not totally  
broken lol).

--Tim

On Jan 23, 2008, at 6:44 AM, John Yates wrote:

> On Wednesday, 2008-01-23, Ian Clatworthy wrote:
>
>> Tim Hill wrote:
>>> Sorry to spam with such a simple question ...
>>>
>>> The User's Guide says: "A branch is an ordered set of revisions" and
>>> "Branches may split apart and be merged back together". From this, I
>>> take the definition of a branch to be a linear timeline of revisions
>>> that may or may not have merges to/from other branches which also  
>>> have
>>> their own linear timeline.
>>>
>>> However, it then also says: "A branch might have other lines of
>>> development..." which makes a branch sound more like an entire tree.
>>>
>>> Trying to reconcile these two statements.
>>
>> Technically, nodes in a tree have exactly one parent (zero if the  
>> root)
>> and zero or more children, so that's the wrong model. The data  
>> structure
>> is known as a "graph" which is like a tree but a node can have  
>> multiple
>> parents.
>>
>> In an attempt to make Bazaar accessible to non-programmers, the
>> documentation starts with the most common case - a linear timeline of
>> revisions - and then attempts to build up to the true model (directed
>> acyclic graph). Apologies for the resulting lack of clarity. If you  
>> can
>> think of a better way of explaining this, please let me know.
>
> Perhaps "A branch may pull-in / incorporate other lines of  
> development...".
>
> I think a  way to avoid cognitive dissonance is to distinguish the  
> unique
> in-branch leftmost parent from tributaries.  An important property  
> is that
> though any node may have multiple parents -- all but the first being  
> from
> outside of the branch -- every node has at most one in-branch  
> successor.
>
> "Branches may split apart and be merged back together" is also a  
> little
> wishy-washy.  A single branch does not split.  It continues its linear
> evolution.  A new branch may be cloned from an existing branch causing
> it to duplicate all history up to that point.  This might be described
> casually as "the branch split" but in reality it was duplicated so  
> that
> each branch might pursue a separate evolution.  Further, even when two
> branches are reconciled to the point that their tips are identical  
> they
> have not "merged back together" to become one.  Each preserves its own
> identity.  One branch may be abandoned because it is perceived as  
> having
> merge into another branch but that is a human interpretation and not a
> property of the bzr data model.
>
> /john




More information about the bazaar mailing list