<div dir="ltr"><div class="gmail_quote">On Wed, Feb 29, 2012 at 2:20 AM, Matt Mackall <span dir="ltr"><<a href="mailto:mpm@selenic.com">mpm@selenic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, 2012-02-29 at 01:40 +0200, Idan Kamara wrote:<br>
> On Wed, Feb 29, 2012 at 12:59 AM, Matt Mackall <<a href="mailto:mpm@selenic.com">mpm@selenic.com</a>> wrote:<br>
<br>
</div><div class="im">> > Making this work cleanly is a simple matter of localizing the<br>
> > path-joining logic to a single method that the derived class overrides:<br>
> ><br>
> > class storecache(scmutil.filecache):<br>
> >    def join(self, obj, fname):<br>
> >        return obj.sjoin(fname)<br>
><br>
><br>
> I guess that's better, except it forces all clients of such classes<br>
> to name their join function the same.<br>
<br>
</div>No, because this entire class is now specifically tailored for caching<br>
store files for localrepo methods (note the 'sjoin'). The class is<br>
tailored to the client, the client just needs to use the appropriate<br>
class.</blockquote><div><br></div><div>localrepo and dirstate both need a cache for repo files, so now we have</div><div>two 'repocache' classes, one for localrepo's 'join' and another that uses</div>
<div>whatever dirstate calls its repo-relative join function?</div><div><br></div><div>Unless I misunderstand what you mean here, I don't see how this is</div><div>less yucky than my original suggestion.</div></div></div>