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