[PATCH 2 of 2] obsstore: move delete function from obsstore class to repair module

Sean Farley sean at farley.io
Wed Apr 13 14:32:30 EDT 2016


Pierre-Yves David <pierre-yves.david at ens-lyon.org> writes:

> On 04/13/2016 02:54 AM, Kostia Balytskyi wrote:
>> On 4/13/16 6:49 AM, Pierre-Yves David wrote:
>>>
>>>
>>> On 04/12/2016 04:10 AM, Kostia Balytskyi wrote:
>>>> # HG changeset patch
>>>> # User Kostia Balytskyi <ikostia at fb.com>
>>>> # Date 1460459210 25200
>>>> #      Tue Apr 12 04:06:50 2016 -0700
>>>> # Node ID cd55c17037a71173ec5572b32b951f8007ea164f
>>>> # Parent  33e53380588a5953e3f25d4ff66d1b2e27ec7820
>>>> obsstore: move delete function from obsstore class to repair module
>>>
>>> Pushed thanks
>>>
>>> Can you move the transaction check and the locking inside the repair
>>> function too?
>> Why would we want to do so? My plan was to reuse this function in 
>> future for commit+marker deletion. We might want to open a transaction 
>> in an outer function that would later call deleteobsmarkers and we 
>> don't want deleteobsmarkers to fail in that case. Am I wrong?
>
> The rewrite of the obsstore file is incompatible with the way Mercurial 
> transaction work (record the size of the file at opening time and 
> truncate if the transaction rollback). The transaction assume the file 
> is untouched and happened only. Changing file content under the 
                   ^ append


More information about the Mercurial-devel mailing list