What is a branch?

Adrian Buehlmann adrian at cadifra.com
Thu Feb 14 03:22:49 CST 2008


On 14.02.2008 08:28, Stuart W. Marks wrote:
> Adrian Buehlmann wrote:
>> I've expanded
>>
>> http://www.selenic.com/mercurial/wiki/index.cgi/Branch
>>
>> by introducing the term "diverging development line", which I found on 
>> TutorialMerge.
> 
> [just getting back to this now]
> 
> Looks good; pretty comprehensive. I still think it's somewhat confusing 
> to new users, but I do think you've covered most of the territory.

If you see a way to reduce confusion, feel free to do so. Please edit.

> The material from Yao Zhang touches upon a key point that isn't 
> adequately explained, which is that the branch name mechanism is 
> actually orthogonal to the concept of a "branch" meaning a diverging 
> development line.

As it is currently, the page makes quite clear that a branch name is an attribute of a 
changeset. But if you would like to expand on the consequences, please do so. I think it 
is helpful even for new Mercurial users, if all aspects are covered.

 > Yao Zhang pointed out that a single line can have
> multiple branch names. It's also true that multiple lines can have the 
> same branch name!

Sure. The latter is absolutely essential. Just consider two developers working on the same 
"big-picture" branch in their local repos. This will create (usually) short-lived 
"diverging lines of development" inside the same "big-picture branch". Again, the word 
"branch" is used for slightly differing concepts.

The term "big-picture branch" is from http://hgbook.red-bean.com/hgbookch8.html, the 
Mercurial book -- http://hgbook.red-bean.com/hgbook.html. BTW, thanks to Bryan O’Sullivan 
and all contributors for this excellent book!

> The wiki should probably be updated with this discussion. I don't have 
> at the moment, but I can do it (unless you get to it first :-)).

Please edit the wiki page. As soon as you hit the edit button, others trying to do the 
same will get a nice warning. So there will be no conflicts. No intention from my side to 
edit there at the very moment.



More information about the Mercurial mailing list