[PATCH 1 of 1] named branches: --newbranch option to allow intial push of new branches

Faheem Mitha faheem at email.unc.edu
Thu Sep 17 22:57:25 CDT 2009


On Thu, 17 Sep 2009 19:36:19 -0000, Sune Foldager <cryo at cyanite.org> wrote:
> # HG changeset patch
> # User Sune Foldager <sune.foldager at edlund.dk>
> # Date 1249889760 -7200
> # Node ID 01de02eadec5f88a19bbeca3e9f57dc036422ef2
> # Parent  de414835d1405ccec77f6cc5211859368ae8274f
> named branches: --newbranch option to allow intial push of new branches
>
> Compare this to --force which allows anything to be pushed. With --newbranch,
> only changesets to named branches not present on the remote are allowed.

How does this handle the use case, when say the default branch has
been merged with some named branch foo, and then a changeset is
committed to foo and pushed, thus creating a new head, but not a new
branch?

My personal opinion is that no special option should be required as
long as only one head per named branch is being created. This is
backward compatible with the behavior when there were no named
branches, and avoids treating named branches as a second class
citizen.

The only reason I can see for not having this behavior is if you want
to stop people pushing multiple named branches by default. I can't see
why one would want this, though.

Please CC me on any reply.
                                                      Regards, Faheem.



More information about the Mercurial-devel mailing list