Questions about branching in Mercurial

Sebastien Lucas sebastien.lucas at gmail.com
Sun May 6 03:24:27 CDT 2007


On 5/6/07, Matt Mackall <mpm at selenic.com> wrote:
> On Sun, May 06, 2007 at 11:30:04AM +1000, Tim Allen wrote:
> > > There are currently some discussions about strange effects when merging
> > > two named branches on the mailinglist, so in your case I would consider to
> > > subscribe to the list.
> >
> > I've been checking the mail archive at http://marc.info/ since it was
> > recommended on the Mercurial wiki, and sadly it doesn't have that thread
> > yet. The Mailman archives at selenic.com do record it, and gmane does as
> > well, so I guess I'll be using gmane in future.
> >
> > That thread pretty much answers my questions (the consensus seems to be
> > that named branches aren't useful yet) so I guess I'm done.
>
> They've still got a couple rough edges that should be polished up in
> the next couple months, but I think they're perfectly useful today
> provided you understand how they work.

I don't know if the goal is that named branches and "cloned" branches
have the same functionnalities. By now it's not the case.

If I have a repo with one head (master) and I clone it to make a new
branch (dev-branch) then I'll a have two repo with one head in each
repo. assuming I do not touch master and I add some changeset in
dev-branch I can push my change from dev-branch to master and merge
them.

Now if I do the same with named branches I'll have to commit a dummy
changeset on master so that my repository has two heads and I can
merge (See this thread for more detail :
http://article.gmane.org/gmane.comp.version-control.mercurial.general/1352)

> I haven't been recommending them to people simply because most people
> who are new to distributed systems seem to get themselves confused
> enough without them. One working directory = one repository = one
> branch is the simplest place to start.

I agree with that. I just want to understand why named branch use does
not change hg heads output, in my opinion it should.

Thanks for your time.

Sebastien


More information about the Mercurial mailing list