[PATCH 1 of 2 STABLE] repoview: make propertycache.setcache compatible with repoview

Idan Kamara idankk86 at gmail.com
Tue Oct 1 06:04:45 CDT 2013


On Mon, Sep 30, 2013 at 3:53 PM, <pierre-yves.david at ens-lyon.org> wrote:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1380544571 -7200
> #      Mon Sep 30 14:36:11 2013 +0200
> # Branch stable
> # Node ID 365d4888627295bb0368d658224cb9900fdcb6f7
> # Parent  4d2bea6604d3bfb34860590fbb6e302cbf273f98
> repoview: make propertycache.setcache compatible with repoview
>
> Propertycache used standard attribute assignment. In the repoview case,
> this
> assignment was forwarded to the unfiltered repo. This result in:
> (1) unfiltered repo got a potentially wrong cache value,
> (2) repoview never reused the cached value.
>
> This patch replaces the standard attribute assignment by an assignment to
> `objc.__dict__` which will bypass the `repoview.__setattr__`. This will not
> affects other `propertycache` users and it is actually closer to the
> semantic we
> need.
>
> The interaction of `propertycache` and `repoview` are now tested in a
> python
> test file.
>

Wouldn't this test be a lot more readable as a standard Python unit test?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20131001/09e65628/attachment.html>


More information about the Mercurial-devel mailing list