[PATCH] bookmarks: allow pushkey if new equals current

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Aug 26 15:53:44 CDT 2014



On 08/26/2014 10:18 PM, Gregory Szorc wrote:
> On 8/26/14 1:09 PM, Pierre-Yves David wrote:
>>
>>
>> On 08/26/2014 10:06 PM, Augie Fackler wrote:
>>>
>>> On Aug 26, 2014, at 4:05 PM, Pierre-Yves David
>>> <pierre-yves.david at ens-lyon.org> wrote:
>>>
>>>>
>>>>
>>>> On 08/26/2014 09:05 PM, Augie Fackler wrote:
>>>>> On Tue, Aug 26, 2014 at 06:56:15AM -0700, Durham Goode wrote:
>>>>>> # HG changeset patch
>>>>>> # User Durham Goode <durham at fb.com>
>>>>>> # Date 1409054321 25200
>>>>>> #      Tue Aug 26 04:58:41 2014 -0700
>>>>>> # Node ID c27758084fdb17115211958666f3184282291143
>>>>>> # Parent  7eef5a87ce3ff761711c69526bf422fdc2dc696d
>>>>>> bookmarks: allow pushkey if new equals current
>>>>>
>>>>> Seems reasonable. Queued.
>>>>
>>>> Does not seems that reasonable to me. Can we discuss it at the sprint?
>>>
>>> Why not elaborate here?
>>
>> Because its is 22h00 and I'm exausted ?
>>
>>> Basically, if you're making a request and the end state of your
>>> request is already the current state, I don't really see a reason to
>>> reject the push. Can you think of something?
>>
>> because it highlight the fact that the reasoning behind the pushkey was
>> raced. And Mercurial abort all other case of race (whater the end state
>> is).
>
> There is no race on the server, only a race on two clients who begin the
> push around the same time, but starting with different views of the
> server. As long as the result of the push is consistent and idempotent,
> we should be good.

The current strategy is for client to take all decisions. It  look at 
the server, decide for change to send and includes a way for the server 
to validate it is still in the state it was when the decision was made. 
This is how it used to work for bookmark and how it still work for 
changesets and phases. I do not believe the current special case is 
worth breaking the rules.

I still think we should delay discussion until the sprint.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list