[PATCH 2 of 2 V2] bundle2: allow lazily acquiring the lock

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Oct 7 14:20:58 CDT 2015



On 10/07/2015 12:10 PM, Augie Fackler wrote:
> On Wed, Oct 07, 2015 at 11:23:55AM -0700, Durham Goode wrote:
>>
>>
>> On 10/7/15 11:01 AM, Augie Fackler wrote:
>>> On Tue, Oct 06, 2015 at 06:42:20PM -0700, Durham Goode wrote:
>>>> # HG changeset patch
>>>> # User Durham Goode <durham at fb.com>
>>>> # Date 1444087194 25200
>>>> #      Mon Oct 05 16:19:54 2015 -0700
>>>> # Node ID 1815d6ae1c20bd04668d612f69a0d1946db0cf77
>>>> # Parent  1c8b56dd34406c2dfb2942d70ce427ef0d359f0c
>>>> bundle2: allow lazily acquiring the lock
>>> is there any sensible way to test this?
>>>
>> With the pushrebase extension we have a hook that occurs before the lock is
>> taken, so I have a test there.  I'm not sure how to do it in mercurial
>> without some funky monkey patching in the test
>
> At a minimum, I'd like some sort of test that at least exercises the
> code with this config knob enabled. Ideally we'll have some mechanism
> that's easy to hook into (for things like pushrebase) which would also
> make testing easier in the future.
>
> Can I get a resend that has a trivial "things work" test, even if it
> doesn't prove the lock is lazy?

Having a 5 lines extensions that adds a part at the begining of the 
bundle that check the lock stat should be simple.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list