What is a branch? (was: 1.0 approaches)

Stuart W. Marks smarks at smarks.org
Fri Feb 8 17:28:27 CST 2008


Adrian Buehlmann wrote:
> I've whipped up:
> 
> http://www.selenic.com/mercurial/wiki/index.cgi/Branch
> 
> In the hope this reduces some confusion.
> 
> Contributions welcome.
> 
> I intend to insert inline-links on other wiki pages.

Nice! Quick work, too. I think it's necessary to have a page like this to have 
inline links from other pages. (BTW what tool do you use for diagrams?)

The big problem I see is that it still tries to support both usages of the word 
"branch", that is, (a) a fork in the history graph, and (b) a cloned repo. In 
particular the section starting with "The creation of a branch can also happen 
in two different repositories R1 and R2..." is a rather odd description of 
usage (b). I think that some people really refer to the creation of clone as 
"branching" regardless of whether any commits have been made to either repo. 
I'd suggest removing this section entirely.

People will use whatever words they're comfortable with, no matter what.

For Mercurial's "official" docs (man pages, help text, wiki, BOS's book), 
though, I really think that trying to support the word "branch" for both 
meanings is a recipe for continued confusion. Since the "hg branch" and "hg 
branches" commands refer unambiguously to forks in the history graph, I propose 
that we eradicate other usages of this term.

s'marks


More information about the Mercurial mailing list