Commit Graph

5 Commits

Author SHA1 Message Date
Mads Kiilerich
0e8795ccd6 spelling: fixes from spell checker 2014-04-13 19:01:00 +02:00
Mads Kiilerich
eabc047878 spelling: random spell checker fixes 2013-10-24 01:49:56 +08:00
Pierre-Yves David
bcf260ff40 test: make test-propertycache.py python2.4 compatible
The subprocess module have not `check_call` method in python2.4. Fall back to
calling `check` with return code verification.
2013-10-02 11:16:03 +02:00
Pierre-Yves David
763949e575 repoview: have unfilteredpropertycache using the underlying cache
A  `unfilteredpropertycache` is a kind of `propertycache` used on `localrepo` to
unsure it will always be run against unfiltered repo and stored only once.

As the cached value is never stored in the repoview instance, the descriptor
will always be called. Before this patch such calls always result in a call to
the `__get__` method of the `propertycache` on the unfiltered repo. That was
recomputing a new value on every access through a repoview.

We can't prevent the repoview's `unfilteredpropertycache` to get called on every
access. In that case the new code makes a standard attribute access to the
property. If a value is cached it will be used.

The `propertycache` test file have been augmented with test about this issue.
2013-09-30 14:23:14 +02:00
Pierre-Yves David
a411302ece 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.
2013-09-30 14:36:11 +02:00