Mercurial > hg
annotate tests/test-propertycache.py @ 40327:55836a34f41b
exchangev2: recognize narrow patterns when pulling
pulloperation instances were recently taught to record file
include and exclude patterns to facilitate narrow file transfer.
Teaching the exchangev2 code to transfer a subset of files is
as simple as constructing a narrow matcher from these patterns and
filtering all seen file paths through it.
Keep in mind that this change only influences file data: we're
still fetching all changeset and manifest data. So, there's still
a ton of "partial clone" to implement in exchangev2.
On a personal note, I derive gratification that this feature requires
very few lines of new code to implement.
To test this, we implemented a minimal extension which allows us to specify
--include/--exclude to clone. While the narrow extension provides these
arguments, I explicitly wanted to test this functionality without the
narrow extension enabled, as that extension monkeypatches various things
and I want to isolate the behavior of core Mercurial.
Differential Revision: https://phab.mercurial-scm.org/D5132
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 26 Sep 2018 14:38:43 -0700 |
parents | d33611280add |
children | e5d74742d00e |
rev | line source |
---|---|
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
1 """test behavior of propertycache and unfiltered propertycache |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
2 |
19951
d51c4d85ec23
spelling: random spell checker fixes
Mads Kiilerich <madski@unity3d.com>
parents:
19878
diff
changeset
|
3 The repoview overlay is quite complex. We test the behavior of |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
4 property cache of both localrepo and repoview to prevent |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
5 regression.""" |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
6 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
7 from __future__ import absolute_import, print_function |
28755
84673a7c54af
py3: use absolute_import in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
21024
diff
changeset
|
8 import os |
84673a7c54af
py3: use absolute_import in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
21024
diff
changeset
|
9 import subprocess |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
10 |
28839
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
11 from mercurial import ( |
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
12 hg, |
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
13 localrepo, |
40297
d33611280add
py3: fix test-propertycache.py
Mark Thomas <mbthomas@fb.com>
parents:
30559
diff
changeset
|
14 pycompat, |
28839
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
15 ui as uimod, |
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
16 util, |
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
17 ) |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
18 |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
19 # create some special property cache that trace they call |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
20 |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
21 calllog = [] |
28839
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
22 @util.propertycache |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
23 def testcachedfoobar(repo): |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
24 name = repo.filtername |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
25 if name is None: |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
26 name = '' |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
27 val = len(name) |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
28 calllog.append(val) |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
29 return val |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
30 |
19846
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
31 unficalllog = [] |
28839
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
32 @localrepo.unfilteredpropertycache |
19846
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
33 def testcachedunfifoobar(repo): |
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
34 name = repo.filtername |
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
35 if name is None: |
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
36 name = '' |
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
37 val = 100 + len(name) |
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
38 unficalllog.append(val) |
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
39 return val |
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
40 |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
41 #plug them on repo |
28839
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
42 localrepo.localrepository.testcachedfoobar = testcachedfoobar |
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
43 localrepo.localrepository.testcachedunfifoobar = testcachedunfifoobar |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
44 |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
45 |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
19951
diff
changeset
|
46 # Create an empty repo and instantiate it. It is important to run |
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
19951
diff
changeset
|
47 # these tests on the real object to detect regression. |
40297
d33611280add
py3: fix test-propertycache.py
Mark Thomas <mbthomas@fb.com>
parents:
30559
diff
changeset
|
48 repopath = pycompat.fsencode(os.path.join(os.environ['TESTTMP'], 'repo')) |
19878
21de61bc2ab5
test: make test-propertycache.py python2.4 compatible
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19846
diff
changeset
|
49 assert subprocess.call(['hg', 'init', repopath]) == 0 |
30559
d83ca854fa21
ui: factor out ui.load() to create a ui without loading configs (API)
Yuya Nishihara <yuya@tcha.org>
parents:
28839
diff
changeset
|
50 ui = uimod.ui.load() |
28839
de7802c3a1df
tests: import mercurial modules by name in test-propertycache
Yuya Nishihara <yuya@tcha.org>
parents:
28838
diff
changeset
|
51 repo = hg.repository(ui, path=repopath).unfiltered() |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
52 |
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
53 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
54 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
55 print('=== property cache ===') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
56 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
57 print('calllog:', calllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
58 print('cached value (unfiltered):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
59 vars(repo).get('testcachedfoobar', 'NOCACHE')) |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
60 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
61 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
62 print('= first access on unfiltered, should do a call') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
63 print('access:', repo.testcachedfoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
64 print('calllog:', calllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
65 print('cached value (unfiltered):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
66 vars(repo).get('testcachedfoobar', 'NOCACHE')) |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
67 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
68 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
69 print('= second access on unfiltered, should not do call') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
70 print('access', repo.testcachedfoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
71 print('calllog:', calllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
72 print('cached value (unfiltered):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
73 vars(repo).get('testcachedfoobar', 'NOCACHE')) |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
74 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
75 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
76 print('= first access on "visible" view, should do a call') |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
77 visibleview = repo.filtered('visible') |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
78 print('cached value ("visible" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
79 vars(visibleview).get('testcachedfoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
80 print('access:', visibleview.testcachedfoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
81 print('calllog:', calllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
82 print('cached value (unfiltered):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
83 vars(repo).get('testcachedfoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
84 print('cached value ("visible" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
85 vars(visibleview).get('testcachedfoobar', 'NOCACHE')) |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
86 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
87 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
88 print('= second access on "visible view", should not do call') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
89 print('access:', visibleview.testcachedfoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
90 print('calllog:', calllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
91 print('cached value (unfiltered):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
92 vars(repo).get('testcachedfoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
93 print('cached value ("visible" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
94 vars(visibleview).get('testcachedfoobar', 'NOCACHE')) |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
95 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
96 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
97 print('= no effect on other view') |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
98 immutableview = repo.filtered('immutable') |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
99 print('cached value ("immutable" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
100 vars(immutableview).get('testcachedfoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
101 print('access:', immutableview.testcachedfoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
102 print('calllog:', calllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
103 print('cached value (unfiltered):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
104 vars(repo).get('testcachedfoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
105 print('cached value ("visible" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
106 vars(visibleview).get('testcachedfoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
107 print('cached value ("immutable" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
108 vars(immutableview).get('testcachedfoobar', 'NOCACHE')) |
19845
a1237a4b437d
repoview: make propertycache.setcache compatible with repoview
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
109 |
19846
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
110 # unfiltered property cache test |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
111 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
112 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
113 print('=== unfiltered property cache ===') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
114 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
115 print('unficalllog:', unficalllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
116 print('cached value (unfiltered): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
117 vars(repo).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
118 print('cached value ("visible" view): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
119 vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
120 print('cached value ("immutable" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
121 vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) |
19846
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
122 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
123 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
124 print('= first access on unfiltered, should do a call') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
125 print('access (unfiltered):', repo.testcachedunfifoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
126 print('unficalllog:', unficalllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
127 print('cached value (unfiltered): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
128 vars(repo).get('testcachedunfifoobar', 'NOCACHE')) |
19846
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
129 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
130 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
131 print('= second access on unfiltered, should not do call') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
132 print('access (unfiltered):', repo.testcachedunfifoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
133 print('unficalllog:', unficalllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
134 print('cached value (unfiltered): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
135 vars(repo).get('testcachedunfifoobar', 'NOCACHE')) |
19846
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
136 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
137 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
138 print('= access on view should use the unfiltered cache') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
139 print('access (unfiltered): ', repo.testcachedunfifoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
140 print('access ("visible" view): ', visibleview.testcachedunfifoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
141 print('access ("immutable" view):', immutableview.testcachedunfifoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
142 print('unficalllog:', unficalllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
143 print('cached value (unfiltered): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
144 vars(repo).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
145 print('cached value ("visible" view): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
146 vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
147 print('cached value ("immutable" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
148 vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) |
19846
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
149 |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
150 print('') |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
151 print('= even if we clear the unfiltered cache') |
19846
9789670992d6
repoview: have unfilteredpropertycache using the underlying cache
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
19845
diff
changeset
|
152 del repo.__dict__['testcachedunfifoobar'] |
28762
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
153 print('cached value (unfiltered): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
154 vars(repo).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
155 print('cached value ("visible" view): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
156 vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
157 print('cached value ("immutable" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
158 vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
159 print('unficalllog:', unficalllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
160 print('access ("visible" view): ', visibleview.testcachedunfifoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
161 print('unficalllog:', unficalllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
162 print('cached value (unfiltered): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
163 vars(repo).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
164 print('cached value ("visible" view): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
165 vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
166 print('cached value ("immutable" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
167 vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
168 print('access ("immutable" view):', immutableview.testcachedunfifoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
169 print('unficalllog:', unficalllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
170 print('cached value (unfiltered): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
171 vars(repo).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
172 print('cached value ("visible" view): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
173 vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
174 print('cached value ("immutable" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
175 vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
176 print('access (unfiltered): ', repo.testcachedunfifoobar) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
177 print('unficalllog:', unficalllog) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
178 print('cached value (unfiltered): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
179 vars(repo).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
180 print('cached value ("visible" view): ', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
181 vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
182 print('cached value ("immutable" view):', |
61ba04ae6a2f
py3: use print_function in test-propertycache.py
Robert Stanca <robert.stanca7@gmail.com>
parents:
28755
diff
changeset
|
183 vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) |