Possible change to the "git push" behavior

Angel Ezquerra angel.ezquerra at gmail.com
Tue Mar 20 08:42:19 CDT 2012


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?

As for the fact that hg push pushes all branches that is one of those
things that cause a little surprise to new users. In TortoiseHg we've
added a setting called "Default Push" whose valid values are "all",
"branch" and "revision". The default is "all", since that matches
mercurial's default push behavior, but I know quite a few people who
have changed it.

Angel


More information about the Mercurial-devel mailing list