Show More
@@ -62,7 +62,6 b'' | |||||
62 | tests/test-manifest.py not using absolute_import |
|
62 | tests/test-manifest.py not using absolute_import | |
63 | tests/test-pathencode.py not using absolute_import |
|
63 | tests/test-pathencode.py not using absolute_import | |
64 | tests/test-pathencode.py requires print_function |
|
64 | tests/test-pathencode.py requires print_function | |
65 | tests/test-propertycache.py requires print_function |
|
|||
66 | tests/test-revlog-ancestry.py not using absolute_import |
|
65 | tests/test-revlog-ancestry.py not using absolute_import | |
67 | tests/test-revlog-ancestry.py requires print_function |
|
66 | tests/test-revlog-ancestry.py requires print_function | |
68 | tests/test-run-tests.py not using absolute_import |
|
67 | tests/test-run-tests.py not using absolute_import | |
@@ -232,7 +231,6 b'' | |||||
232 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
231 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
233 | tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
232 | tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
234 | tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
233 | tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
235 | tests/test-propertycache.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) |
|
|||
236 | tests/test-revlog-ancestry.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) |
|
234 | tests/test-revlog-ancestry.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) | |
237 | tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) |
|
235 | tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob) | |
238 | tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
236 | tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
@@ -4,7 +4,7 b' The repoview overlay is quite complex. W' | |||||
4 | property cache of both localrepo and repoview to prevent |
|
4 | property cache of both localrepo and repoview to prevent | |
5 | regression.""" |
|
5 | regression.""" | |
6 |
|
6 | |||
7 | from __future__ import absolute_import |
|
7 | from __future__ import absolute_import, print_function | |
8 | import os |
|
8 | import os | |
9 | import subprocess |
|
9 | import subprocess | |
10 | import mercurial.localrepo |
|
10 | import mercurial.localrepo | |
@@ -49,133 +49,133 b' ui = uimod.ui()' | |||||
49 | repo = mercurial.hg.repository(ui, path=repopath).unfiltered() |
|
49 | repo = mercurial.hg.repository(ui, path=repopath).unfiltered() | |
50 |
|
50 | |||
51 |
|
51 | |||
52 |
print |
|
52 | print('') | |
53 |
print |
|
53 | print('=== property cache ===') | |
54 |
print |
|
54 | print('') | |
55 |
print |
|
55 | print('calllog:', calllog) | |
56 |
print |
|
56 | print('cached value (unfiltered):', | |
57 |
|
|
57 | vars(repo).get('testcachedfoobar', 'NOCACHE')) | |
58 |
|
58 | |||
59 |
print |
|
59 | print('') | |
60 |
print |
|
60 | print('= first access on unfiltered, should do a call') | |
61 |
print |
|
61 | print('access:', repo.testcachedfoobar) | |
62 |
print |
|
62 | print('calllog:', calllog) | |
63 |
print |
|
63 | print('cached value (unfiltered):', | |
64 |
|
|
64 | vars(repo).get('testcachedfoobar', 'NOCACHE')) | |
65 |
|
65 | |||
66 |
print |
|
66 | print('') | |
67 |
print |
|
67 | print('= second access on unfiltered, should not do call') | |
68 |
print |
|
68 | print('access', repo.testcachedfoobar) | |
69 |
print |
|
69 | print('calllog:', calllog) | |
70 |
print |
|
70 | print('cached value (unfiltered):', | |
71 |
|
|
71 | vars(repo).get('testcachedfoobar', 'NOCACHE')) | |
72 |
|
72 | |||
73 |
print |
|
73 | print('') | |
74 |
print |
|
74 | print('= first access on "visible" view, should do a call') | |
75 | visibleview = repo.filtered('visible') |
|
75 | visibleview = repo.filtered('visible') | |
76 |
print |
|
76 | print('cached value ("visible" view):', | |
77 |
|
|
77 | vars(visibleview).get('testcachedfoobar', 'NOCACHE')) | |
78 |
print |
|
78 | print('access:', visibleview.testcachedfoobar) | |
79 |
print |
|
79 | print('calllog:', calllog) | |
80 |
print |
|
80 | print('cached value (unfiltered):', | |
81 |
|
|
81 | vars(repo).get('testcachedfoobar', 'NOCACHE')) | |
82 |
print |
|
82 | print('cached value ("visible" view):', | |
83 |
|
|
83 | vars(visibleview).get('testcachedfoobar', 'NOCACHE')) | |
84 |
|
84 | |||
85 |
print |
|
85 | print('') | |
86 |
print |
|
86 | print('= second access on "visible view", should not do call') | |
87 |
print |
|
87 | print('access:', visibleview.testcachedfoobar) | |
88 |
print |
|
88 | print('calllog:', calllog) | |
89 |
print |
|
89 | print('cached value (unfiltered):', | |
90 |
|
|
90 | vars(repo).get('testcachedfoobar', 'NOCACHE')) | |
91 |
print |
|
91 | print('cached value ("visible" view):', | |
92 |
|
|
92 | vars(visibleview).get('testcachedfoobar', 'NOCACHE')) | |
93 |
|
93 | |||
94 |
print |
|
94 | print('') | |
95 |
print |
|
95 | print('= no effect on other view') | |
96 | immutableview = repo.filtered('immutable') |
|
96 | immutableview = repo.filtered('immutable') | |
97 |
print |
|
97 | print('cached value ("immutable" view):', | |
98 |
|
|
98 | vars(immutableview).get('testcachedfoobar', 'NOCACHE')) | |
99 |
print |
|
99 | print('access:', immutableview.testcachedfoobar) | |
100 |
print |
|
100 | print('calllog:', calllog) | |
101 |
print |
|
101 | print('cached value (unfiltered):', | |
102 |
|
|
102 | vars(repo).get('testcachedfoobar', 'NOCACHE')) | |
103 |
print |
|
103 | print('cached value ("visible" view):', | |
104 |
|
|
104 | vars(visibleview).get('testcachedfoobar', 'NOCACHE')) | |
105 |
print |
|
105 | print('cached value ("immutable" view):', | |
106 |
|
|
106 | vars(immutableview).get('testcachedfoobar', 'NOCACHE')) | |
107 |
|
107 | |||
108 | # unfiltered property cache test |
|
108 | # unfiltered property cache test | |
109 |
print |
|
109 | print('') | |
110 |
print |
|
110 | print('') | |
111 |
print |
|
111 | print('=== unfiltered property cache ===') | |
112 |
print |
|
112 | print('') | |
113 |
print |
|
113 | print('unficalllog:', unficalllog) | |
114 |
print |
|
114 | print('cached value (unfiltered): ', | |
115 |
|
|
115 | vars(repo).get('testcachedunfifoobar', 'NOCACHE')) | |
116 |
print |
|
116 | print('cached value ("visible" view): ', | |
117 |
|
|
117 | vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) | |
118 |
print |
|
118 | print('cached value ("immutable" view):', | |
119 |
|
|
119 | vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) | |
120 |
|
120 | |||
121 |
print |
|
121 | print('') | |
122 |
print |
|
122 | print('= first access on unfiltered, should do a call') | |
123 |
print |
|
123 | print('access (unfiltered):', repo.testcachedunfifoobar) | |
124 |
print |
|
124 | print('unficalllog:', unficalllog) | |
125 |
print |
|
125 | print('cached value (unfiltered): ', | |
126 |
|
|
126 | vars(repo).get('testcachedunfifoobar', 'NOCACHE')) | |
127 |
|
127 | |||
128 |
print |
|
128 | print('') | |
129 |
print |
|
129 | print('= second access on unfiltered, should not do call') | |
130 |
print |
|
130 | print('access (unfiltered):', repo.testcachedunfifoobar) | |
131 |
print |
|
131 | print('unficalllog:', unficalllog) | |
132 |
print |
|
132 | print('cached value (unfiltered): ', | |
133 |
|
|
133 | vars(repo).get('testcachedunfifoobar', 'NOCACHE')) | |
134 |
|
134 | |||
135 |
print |
|
135 | print('') | |
136 |
print |
|
136 | print('= access on view should use the unfiltered cache') | |
137 |
print |
|
137 | print('access (unfiltered): ', repo.testcachedunfifoobar) | |
138 |
print |
|
138 | print('access ("visible" view): ', visibleview.testcachedunfifoobar) | |
139 |
print |
|
139 | print('access ("immutable" view):', immutableview.testcachedunfifoobar) | |
140 |
print |
|
140 | print('unficalllog:', unficalllog) | |
141 |
print |
|
141 | print('cached value (unfiltered): ', | |
142 |
|
|
142 | vars(repo).get('testcachedunfifoobar', 'NOCACHE')) | |
143 |
print |
|
143 | print('cached value ("visible" view): ', | |
144 |
|
|
144 | vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) | |
145 |
print |
|
145 | print('cached value ("immutable" view):', | |
146 |
|
|
146 | vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) | |
147 |
|
147 | |||
148 |
print |
|
148 | print('') | |
149 |
print |
|
149 | print('= even if we clear the unfiltered cache') | |
150 | del repo.__dict__['testcachedunfifoobar'] |
|
150 | del repo.__dict__['testcachedunfifoobar'] | |
151 |
print |
|
151 | print('cached value (unfiltered): ', | |
152 |
|
|
152 | vars(repo).get('testcachedunfifoobar', 'NOCACHE')) | |
153 |
print |
|
153 | print('cached value ("visible" view): ', | |
154 |
|
|
154 | vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) | |
155 |
print |
|
155 | print('cached value ("immutable" view):', | |
156 |
|
|
156 | vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) | |
157 |
print |
|
157 | print('unficalllog:', unficalllog) | |
158 |
print |
|
158 | print('access ("visible" view): ', visibleview.testcachedunfifoobar) | |
159 |
print |
|
159 | print('unficalllog:', unficalllog) | |
160 |
print |
|
160 | print('cached value (unfiltered): ', | |
161 |
|
|
161 | vars(repo).get('testcachedunfifoobar', 'NOCACHE')) | |
162 |
print |
|
162 | print('cached value ("visible" view): ', | |
163 |
|
|
163 | vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) | |
164 |
print |
|
164 | print('cached value ("immutable" view):', | |
165 |
|
|
165 | vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) | |
166 |
print |
|
166 | print('access ("immutable" view):', immutableview.testcachedunfifoobar) | |
167 |
print |
|
167 | print('unficalllog:', unficalllog) | |
168 |
print |
|
168 | print('cached value (unfiltered): ', | |
169 |
|
|
169 | vars(repo).get('testcachedunfifoobar', 'NOCACHE')) | |
170 |
print |
|
170 | print('cached value ("visible" view): ', | |
171 |
|
|
171 | vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) | |
172 |
print |
|
172 | print('cached value ("immutable" view):', | |
173 |
|
|
173 | vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) | |
174 |
print |
|
174 | print('access (unfiltered): ', repo.testcachedunfifoobar) | |
175 |
print |
|
175 | print('unficalllog:', unficalllog) | |
176 |
print |
|
176 | print('cached value (unfiltered): ', | |
177 |
|
|
177 | vars(repo).get('testcachedunfifoobar', 'NOCACHE')) | |
178 |
print |
|
178 | print('cached value ("visible" view): ', | |
179 |
|
|
179 | vars(visibleview).get('testcachedunfifoobar', 'NOCACHE')) | |
180 |
print |
|
180 | print('cached value ("immutable" view):', | |
181 |
|
|
181 | vars(immutableview).get('testcachedunfifoobar', 'NOCACHE')) |
General Comments 0
You need to be logged in to leave comments.
Login now