Terminology: what to call the trunk
Matt Mackall
mpm at selenic.com
Thu Dec 4 10:59:30 CST 2008
On Thu, 2008-12-04 at 11:20 -0500, Greg Ward wrote:
> Let's see if I've got my history right here:
>
> * CVS has a formal notion of the trunk: all revisions with two
> components (1.1, 1.2, 1.431) are on the trunk. But it has no
> way to *name* the trunk; in some contexts, HEAD means "tip of the
> trunk", but that's not reliable. And it doesn't refer to the
> trunk as a whole, just the tip.
>
> * Subversion has no formal notion of the trunk, just a strong
> convention that you do your main line of development in a
> directory called "/trunk". Likewise /branches and /tags are
> just strong conventions. As a result, there *is* a reliable way
> to name the trunk, but it's not universal. If you called it
> "/mainline" rather than "/trunk", then that's the name you use.
>
> So far I'm on safe ground ... I understand CVS very well and
> Subversion pretty well. Now I'm going out on a limb:
>
> * Git and Mercurial both have a formal notion of the trunk and a way
> to name it. In git's case, it's called "master", and in
> Mercurial's case it's called "default". Regardless, master/default
> is always there and can always be named: "git checkout master" and
> "hg update default" take you back to the trunk.
>
> Is that correct (at least as far as Mercurial is concerned)?
If your first commit is not on the default branch, you can have a tree
with no default branch.
> Or is "default" just the *default* name of the trunk? I.e. can I
> decide that I want to call the trunk "trunk" instead of "default"?
Sorry, no. The branch is -actually- named '' and 'default' is an alias
for that.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list