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

Greg Ward greg-hg at gerg.ca
Sun Jun 21 19:24:26 CDT 2009


On Sun, Jun 21, 2009 at 4:31 AM, Henrik Stuart<hg at hstuart.dk> wrote:
> timeless wrote:
>> if upstream has:
>>
>> 1 -> 2
>>
>> and I have:
>>
>> 1 -> 2
>>    \
>>      3 ("a") -> 4
>>          \
>>            5
>>
>> Can I use hg push --newbranch to push 3,4,5 ?
>
> Yes.

That feels wrong to me.  Everyone wants to be able to easily push a
new named branch.  But push rightly tries to prevent you from having
too many heads.  I think this is a case where the user should be
nudged to merge 4+5 before pushing.  It's conceptually easy: if
pushing a new named branch with >1 head, fail unless --force.

Greg



More information about the Mercurial-devel mailing list