push with more head on local repo

Bill Barry after.fallout at gmail.com
Thu May 22 21:29:23 UTC 2008


I would think that if you really want a new head you should have to name it.
The error message should say something like:
--
Warning:
A new head would be created in the remote repository. Please fetch first.
If this is what you really want, name the branch you are working on 
before pushing.

Remote repository was NOT updated.
--

And fix fetch to only fetch on the current named branch (or the unnamed 
one if you aren't there).
And fix it so that it doesn't give you a warning if # heads == # branches.

Still leaving the -f option for the advanced users, just don't say 
anything about it (though I cannot fathom a use case for it other than 
possibly machine generated auto commits for things like tags).

Kelly O'Hair wrote:
> I agree. I've seen multiple instances of newbies pushing multiple
> heads and causing all kinds of havoc for all the other newbies. :^(
>
> -kto
>
> Craig Neth wrote:
>   
>> Is there a good reason for this message to suggest the -f option?
>>
>> Every time our project adds new members we generally have some misuse of 
>> the -f on push - what they really wanted  to do was to pull/fetch first, 
>> instead of forcing their push with -f.
>>
>> I would argue that creating multiple heads in a remote repo is an 
>> advanced operation, and that the error message for a plain vanilla push 
>> ought not to suggest it...
>>
>> Craig
>>
>>
>> On May 22, 2008, at 7:48 AM, Dirkjan Ochtman wrote:
>>
>>     
>>> Bill Barry <after.fallout <at> gmail.com> writes:
>>>       
>>>> Is there any way to get it to not warn when it creates a new head that
>>>> is a named branch? I still want it to warn if it creates a new head on
>>>> the same named branch, but when creating a new named branch I would
>>>> assume creating a new head is deliberate.
>>>>         
>>> This is a Mercurial bug. If you want, you can create a ticket for it 
>>> (maybe one
>>> already exists, I'm not sure). I've just looked into fixing it, but 
>>> it's done in
>>> some fairly dense code that would take some time to test properly.
>>>
>>> Cheers,
>>>
>>> Dirkjan
>>>
>>> _______________________________________________
>>> Mercurial mailing list
>>> Mercurial at selenic.com
>>> http://selenic.com/mailman/listinfo/mercurial
>>>       
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Mercurial mailing list
>> Mercurial at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial
>>     
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20080522/842d6695/attachment-0001.html>


More information about the Mercurial mailing list