[PATCH] largefiles: don't create chain of __contains__ calls

Matt Harbison mharbison72 at gmail.com
Mon Mar 23 20:38:05 CDT 2015


On Mon, 23 Mar 2015 21:34:14 -0400, Martin von Zweigbergk  
<martinvonz at google.com> wrote:

> If it's of any help, the only caller of filectx.manifest() I could find  
> was
> annotate in the web UI. I could trigger a call to the unmodified version  
> by
> visiting the annotate page for a file, but I couldn't trigger the
> overridden version.

This isn't a filectx- it's a changectx.  The manifest command definitely  
calls that.  You need to have the lfstatus attribute set to True in order  
to trigger it, but the key thing is, this has to be set before the context  
is fetched.

> On Mon, Mar 23, 2015 at 6:29 PM Matt Harbison <mharbison72 at gmail.com>  
> wrote:
>
>> On Mon, 23 Mar 2015 19:53:56 -0400, Martin von Zweigbergk
>> <martinvonz at google.com> wrote:
>>
>> > On Wed, Mar 11, 2015 at 9:49 PM Martin von Zweigbergk
>> > <martinvonz at google.com>
>> > wrote:
>> >
>> >> +                        class lfilesmanifest(man1.__class):
>> >>
>> >
>> > Drew (drgott) pointed out to me that it's spelled "__class__", not
>> > "__class", so it looks like this patch of the other patch will need  
>> to be
>> > patched itself :-( And there is no test coverage (clearly). I'll try  
>> to
>> > add
>> > a test if it's not too much work.
>>
>> Yep, I missed that too.  A quick search of the code leads me to believe  
>> it
>> isn't being called anywhere.  It can only be called if lfstatus is True,
>> and that only happens in
>>
>> 1) removelargefiles()
>> 2) status (but repo.status() turns this off for the duration of its
>> processing)
>> 3) dirty()
>> 4) bailifchanged()
>> 5) forget()
>> 6) summary
>>
>> I'm certain these things have test coverage.
>>
>> I'll try to add an override for the manifest command to hit this.   
>> There's
>> something else broken here, because I'm getting a TypeError...
>>
>> --Matt


More information about the Mercurial-devel mailing list