Needs for a default branch
Marc Bevand
m.bevand at gmail.com
Tue Jan 9 07:58:22 UTC 2007
Jesse Keating <jkeating <at> redhat.com> writes:
>
> This is where things start to get very confusing. When I clone a repo, I
> don't want to have to "guess" at which branch I might be committing to.
In this case, clone -U might interest you. It prevents the working dir from
being automatically updated to the tip. So once cloned, you have no choice but
to update to some revision, and this is the occasion for you to specify the
named branch of your choice.
$ hg clone -U src dst
$ cd dst && hg up mybranch
> I don't get this either. I want to mark something as a branch so that I can
> get back to it at some point, but I want to continue development with my
> actual head. The unnamed head if you will.
I think it's a bad idea to name some branches (eg: maintenance branches for
past releases) while leaving others unnamed (eg: active feature development
branches). You should assign a name to these ones too ("main", "trunk",
"master", whatever), follow a simple branch naming convention, and *document*
this convention so that people know they have to update to "trunk" after a
clone -U.
Personally I like the fact that Mercurial has no concept of "default branch".
This lets you design the branching strategy of your choice.
-marc
More information about the Mercurial
mailing list