Terminology: what to call the trunk
Greg Ward
gerg.ward+hg at gmail.com
Thu Dec 4 10:20:02 CST 2008
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)?
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"?
(Rationale: for years, I have been trying to get my CVS-using
colleagues to call the trunk "the trunk": not "HEAD", not
"MAIN_TRUNK". Now I'm looking at switching from CVS to Mercurial and
spending the next couple of years explaining that "it's spelled
d-e-f-a-u-l-t, but pronounced trunk". Aieee! I'd rather it was
called "trunk" from the beginning.)
Greg
More information about the Mercurial
mailing list