What exactly *is* a branch?

Didly didlybom at gmail.com
Thu Jun 24 21:35:30 UTC 2010


On Thu, Jun 24, 2010 at 5:29 PM, Mark A. Flacy <mflacy at verizon.net> wrote:

> On Thu, 2010-06-24 at 16:32 +0200, Didly wrote:
> >
> > On Thu, Jun 24, 2010 at 3:55 PM, Adrian Buehlmann <adrian at cadifra.com>
> > wrote:
> >         >
> >         > It's easy to test, so please try it! :-) You'll get this
> >         warning when
> >         > you do 'hg branch':
> >         >
> >         >   abort: a branch of the same name already exists (use
> >         --force to override)
> >         >
> >
> >
> > I think that this error message is accurate but not very clear since
> > it does not tell you the whole store (i.e. why this is potentially
> > wrong).
>
> Given that the command issuing the error is "hg branch", I do not
> understand why you make that claim.
>
> >
> > What mercurial is trying to tell you is that the current branch is not
> > part of the branch into which you want to commit.
>
> What command are *you* writing about here?
>

OK, it seems that I was confused. I first tested this (working with named
branches) with TortoiseHg where you create named branches through the commit
tool. That is, when you commit you can select the name of the branch in
which you are going to create the new revision. This led me to believe
branches were created through the commit command, which is clearly not the
case. I should have paid more attention to Martin´s email.

Now I understand that it is not that the message is not clear, but that I
did not understand it properly :-/

I still find it weird that you can have revisions that belong to the same
branch but which are not connected to each other through revisions which
belong to the same branch!


> This is fine if the branch does not exist yet (since mercurial can
> > assume that what you want to do is to create a branch at that point),
> > but not if the branch already exists.
>
> What if the changeset is in the "default" branch of a remote repository
> and you want to put the pulled changeset into branch "mybranch" of your
> repository?
>

Sorry, I don't know what you mean. How would you do that?

Angel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20100624/712d1deb/attachment.html>


More information about the Mercurial mailing list