Closed branch push behavior?
Tom Anderson
tom.anderson at e2x.co.uk
Tue Dec 6 19:30:25 UTC 2011
On 5 December 2011 21:52, <Chuck.Kirschman at bentley.com> wrote:
> Unfortunately for me, the user read the helpful message, pushed the branch to the server, which as you state makes it permanent. It's been pulled by many, and trying to get the genie back into the bottle is nigh on impossible.
The branch has been closed, right? So it won't show up when people ask
"hg branches?", and i imagine GUI tools won't show it either. So is it
so bad that it's been shared around? It's a bit of a waste of space
and bandwidth, but is it anything worse than that?
Mind you, i don't know what's actually in this branch - perhaps it is!
tom
> Is there any way to prevent it in the future? A server configuration? Or do I need to cook up a commit extension?
>
> Thanks
> chuck
>
> -----Original Message-----
> From: Matt Mackall [mailto:mpm at selenic.com]
> Sent: Monday, December 05, 2011 4:49 PM
> To: Chuck Kirschman
> Cc: mercurial at selenic.com
> Subject: Re: Closed branch push behavior?
>
> On Mon, 2011-12-05 at 16:09 -0500, Chuck.Kirschman at bentley.com wrote:
>> I tried to push some changes from one repo to another and it
>> complained that it would create new branches, even though the branch
>> in question is closed. Is that the expected behavior? "Hg branches"
>> doesn't show it, so it is pretty confusing to figure it out, and it
>> isn't creating an open branch. I'm using 1.9.3.
>>
>> [D:\foo]hg --debug push
>> pushing to http://foo.bar.com/foo
>> searching for changes
>> abort: push creates new remote branches: wip_unicode!
>> (use 'hg push --new-branch' to create new remote branches)
>>
>> [D:\foo]hg branches
>> default 3187:fa2769398873
>>
>> [D:\foo]hg branches -c
>> default 3187:fa2769398873
>> wip_unicode 3108:2426340ca7ae (closed)
>
> I think this is the intended behavior. The message:
>
> abort: push creates new remote branches: wip_unicode!
>
> ..is correct in that a branch that only exists locally will be pushed to the remote server. Since Mercurial's branches become permanent components of history, this serves to make sure you don't inadvertently publish permanent history that you don't intend to. Whether or not it's "closed", it's still published by push. So you should either simply use --new-branch as hinted, or destroy the unwanted branch locally and not do that again.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
--
Tom Anderson | e2x Ltd, 1 Norton Folgate, London E1 6DB
(e) tom at e2x.co.uk | (m) +44 (7960) 989794 | (f) +44 (20) 7100 3749
More information about the Mercurial
mailing list