[PATCH] clone: update to tip instead of default branch if default branch is closed

Henrik Stuart henrik.stuart at edlund.dk
Wed Jun 15 02:17:13 CDT 2011


On Mon, 2011-06-13 at 17:41 +0200, Matt Mackall wrote:
> On Mon, 2011-06-13 at 11:28 +0200, Jesse Long wrote:
> > # HG changeset patch
> > # User Jesse Long <jpl at unknown.za.net> # Date 1307956824 -7200 # Node
> > ID 755a851bd451266de6b546833a9de1bc4490819e
> > # Parent  17c0cb1045e549d9bbbd9ba25dee18f7df4a11a3
> > clone: update to tip instead of default branch if default branch is
> > closed
> 
> > Previously, if no explicit update revision is provided when cloning,
> > hg updates the newly cloned repo to the tip-most head of the default
> > branch if the default branch exists. If no default branch exists, hg
> > updates to tip.
> 
> No thanks. Not having a default branch is a bad idea. Taking this patch would
> suggest to people that it was supported usage.

The default branch does not necessarily fall into a useful naming scheme in a
corporation where there might be, in effect, multiple "default" branches for
different branches of the corporation that you do not want to muddle together.
It might, indeed, not make much sense if your workflows are centered around
a lot of named branches with a specific naming scheme.

That said, I agree that we shouldn't just willy-nilly update to tip, but I rather
disagree that not having a default branch is a bad idea. We should probably just
be more conscientious to suggest using the -b option to clone in that case.

-- 
Kind regards,
  Henrik Stuart


More information about the Mercurial-devel mailing list