Mercurial > hg
comparison tests/test-propertycache.py.out @ 19845:a1237a4b437d stable
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.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 30 Sep 2013 14:36:11 +0200 |
parents | |
children | 9789670992d6 |
comparison
equal
deleted
inserted
replaced
19844:bbeee568a84d | 19845:a1237a4b437d |
---|---|
1 | |
2 === property cache === | |
3 | |
4 calllog: [] | |
5 cached value (unfiltered): NOCACHE | |
6 | |
7 = first access on unfiltered, should do a call | |
8 access: 0 | |
9 calllog: [0] | |
10 cached value (unfiltered): 0 | |
11 | |
12 = second access on unfiltered, should not do call | |
13 access 0 | |
14 calllog: [0] | |
15 cached value (unfiltered): 0 | |
16 | |
17 = first access on "visible" view, should do a call | |
18 cached value ("visible" view): NOCACHE | |
19 access: 7 | |
20 calllog: [0, 7] | |
21 cached value (unfiltered): 0 | |
22 cached value ("visible" view): 7 | |
23 | |
24 = second access on "visible view", should not do call | |
25 access: 7 | |
26 calllog: [0, 7] | |
27 cached value (unfiltered): 0 | |
28 cached value ("visible" view): 7 | |
29 | |
30 = no effect on other view | |
31 cached value ("immutable" view): NOCACHE | |
32 access: 9 | |
33 calllog: [0, 7, 9] | |
34 cached value (unfiltered): 0 | |
35 cached value ("visible" view): 7 | |
36 cached value ("immutable" view): 9 |