Named branches

Alpár Jüttner alpar at cs.elte.hu
Tue Oct 7 14:00:35 UTC 2008


Hi,

I just would like to add that this is not a theoretical question from my
side. I indeed about to create a release branch, thus I must decide
whether to use named branched.

As far as I see the major advantage of named branches is that we can
have a single repo containing everything and each branches can be
obtained from it. This is indeed a very nice thing. However the
cumbersome and error prone current behavior of clone seems to far
outweigh this advantage.

That's why I ask if there is any hope that it will change in the future.

Best regards,
Alpar

On Tue, 2008-10-07 at 13:49 +0100, Alpár Jüttner wrote:
> Hi,
> 
> > On Oct 07, 2008, at 04:57:05, Alpár Jüttner wrote:
> > > If I clone release-1.0, then the 'default' will be the current  
> > > branch in the cloned repo instead of '1.0', and the parent changeset  
> > > of the new repo is not the tip but the last commit before naming the  
> > > branch.
> > 
> > I would expect that you could do something like this:
> > 
> > 	hg clone -r1.0 main release-1.0
> 
> Not exactly. First I cloned main to release-1.0, then I set the branch
> name to 1.0 and then I added some additional commits. Therefore in
> release-1.0 there are two branches, one is called 'default' the other is
> called '1.0'. Moreover, the current branch is '1.0', the other
> ('default') is inactive.
> Now I clone it simply like this:
> 
> hg clone release-1.0 myrelease
> 
> Then the current branch is myrelease is 'default' instead of 1.0.
> Furthermore and the current changeset is not the tip, but the last
> changeset before branching, which is not even a head in the cloned repo.
> 
> I think this is very counter-intuitive. I use the repository release-1.0
> exclusively to develop that branch. It it a natural expectation that I
> will remain in the same branch when I clone it.
> 
> I know that
> 
> hg clone release-1.0#1.0 myrelease
> 
> will do what need, but I do want to clone a branch repository in the
> same way irrespectively of if that branch is named of not.
> 
> Best regards,
> Alpar
> 
> > 
> > Unfortunately, as of both 1.0 and main at f29b674cc221, that doesn't work 
> > —it still updates the clone to the head of the default branch. I  
> > don't know whether that's a bug.
> > 
> 
> 
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial





More information about the Mercurial mailing list