Needs for a default branch

Georg-W. Koltermann gwk.rko at googlemail.com
Mon Jan 8 22:11:55 UTC 2007


+1 from me for a default branch.

Well, actually not just for a default branch, but better branch
isolation per se.

Think about what worked well with "classic" branches, i.e. distinct
repos.  We would initially clone from that repo, then only commits for
that branch would go in (repo == branch).  Push and pull worked
naturally, since only the single branch was exposed in the repo.

With the new-style "named" branches we suddenly find commits from
different branches intermingled in the repo.  And some (most?) commands
look at the global state, across all named branches.

"Hg log" happily mixes history of different branches, the magical "tip"
happily hops back and forth between branches as time goes by, "hg heads"
doesn't even seem to have a way to make it display only heads of a
particular branch.  Yet most of the time when you create a branch, you
do want it to serve as a container that temporarily isolates / shields
you from work in other branches.

Essentially, IMHO, "named" branches are not fully functional branches in
the common sense at all.  Only "classical" branches are (one repo per
branch).

We could also compare to the way that e.g. monotone handles branches:
When you checkout, you have to specify a branch name explicitly (or a
specific version).  From then on you work locally within the branch.
Mtn heads shows heads of that branch only, mtn up updates to the head of
that branch only, mtn merge merges heads of that branch only.  Mtn log
shows the history of that branch (well, it will follow history into
other branches at the branches origin and at merge nodes, but at least
it will not intermingle history all over).  POLA (principle of least
astonishment).

My $0.02 of course.

--
Regards,
Georg.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3441 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20070108/430515fa/attachment-0001.bin>


More information about the Mercurial mailing list