[PATCH 3 of 3] introduce filenamelog repository layout

Adrian Buehlmann adrian at cadifra.com
Tue Jul 22 04:28:38 CDT 2008


On 22.07.2008 10:12, Adrian Buehlmann wrote:
> On 22.07.2008 02:20, Matt Mackall wrote:
>> On Tue, 2008-07-22 at 01:04 +0200, Adrian Buehlmann wrote:
>>> On 21.07.2008 23:16, Matt Mackall wrote:
>>>> On Mon, 2008-07-21 at 21:43 +0200, Adrian Buehlmann wrote:

[big snip]

>>>>> +    def hasfnlog(self):
>>>>> +        return False
>>>>> +
>>>>> +    def readfnlog(self):
>>>>> +        res = {}
>>>>> +        return res
>>>> We may be able to kill these.
>>> verify needs to know if there is a filenamelog that needs to be verified.
>>> (at least that was my thinking when I created these methods.)
>> It doesn't, actually. It needn't know anything about the store. All it
>> needs to know is that for every file the changelog mentions, there is a
>> file returned by storefiles() and vice-versa. And that test can happen
>> on any store we can call storefiles() on.
>>
> 
> There's a new file 'filenamelog' in the store we want to trust to have
> the filenames of all files in the store.
> 
> We have to check that during verify. If we don't, we can't trust the
> filenamelog.
> 
> If we can't trust the filenamelog, we can't trust streamclone
> doing the right thing.

I forgot to add that verify should not use repo.storefiles() because
storefiles() directory-walks the store for the non-filenamelog repos --
a lengthy operation, which is entirely unneeded.

Verify needs to build the list of filelogfiles it must check for presence
on disk *without* dir-walking the store anyway.

I thus currently fail to see the benefit in trying to hide the filenamelog
from verify.


More information about the Mercurial-devel mailing list