Possible change to the "git push" behavior

Martin Geisler mg at aragost.com
Tue Mar 20 09:42:06 CDT 2012


Angel Ezquerra <angel.ezquerra at gmail.com> writes:

> On Tue, Mar 20, 2012 at 2:28 PM, Martin Geisler <mg at aragost.com> wrote:
>> Greg Ward <greg at gerg.ca> writes:
>>
>>> On 20 March 2012, Angel Ezquerra Moreu said:
>>>> It seems that the Git project is considering changing the default
>>>> behavior for the "git push" command (http://lwn.net/Articles/487131).
>>>>
>>>> Since mercurial bookmarks are meant (AFAIK) to behave similarly to git
>>>> branches, would mercurial change the way bookmarks work if git changes
>>>> the way git branches work? How would that work given mercurial's
>>>> backwards compatibility policy?
>>>
>>> I don't speak for Matt or for anyone else, but I suspect the answer is
>>> "not bloody likely". "hg update" does not behave the same way as "cvs
>>> update" does, so why should "hg push" behave the same way as "git
>>> push"? Mercurial is its own project with its own aims and its own
>>> policies.
>>>
>>> That said, the "push all changesets by default" policy could be a
>>> minor annoyance when using bookmarks.
>>
>> I know this is about bookmarks, but as a related data point, I can
>> mention that Henrik and Sune's repoman wrapper always operates with a -b
>> flag in order to push/pull the right named branch instead of operating
>> on all of them.
>>
>> Last time I spoke with them about it, they said that it would be
>> impossible (very impractical) for them to push/pull everything by
>> default.
>>
>> --
>> Martin Geisler
>
> Yes, I was referring to the way bookmarks are pushed specifically. I
> am not suggesting that mercurial's push should be the same as git's
> push. I just wonder whether the idea is for mercurial's bookmarks to
> closely follow git's branch behavior. If that is the case and git
> changes the way it pushes branches, what will mercurial do?

Mercurial's bookmarks were inspired by Git branches in the sense that
they're pointers to changesets that move on commit. But it's not a goal
to replicate Git branches 100% and users should not expect changes in
Git to propagate directly to Mercurial bookmarks.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://www.aragost.com/mercurial/


More information about the Mercurial-devel mailing list