Merge lp:~mbp/bzr/715000-more-fallbacks into lp:bzr
- 715000-more-fallbacks
- Merge into bzr.dev
Status: | Superseded |
---|---|
Proposed branch: | lp:~mbp/bzr/715000-more-fallbacks |
Merge into: | lp:bzr |
Prerequisite: | lp:bzr/2.2 |
Diff against target: |
417 lines (+98/-111) 8 files modified
bzr (+0/-4) bzrlib/__init__.py (+0/-4) bzrlib/groupcompress.py (+5/-5) bzrlib/knit.py (+13/-13) bzrlib/tests/per_repository_reference/test_graph.py (+1/-1) bzrlib/versionedfile.py (+6/-5) doc/en/release-notes/bzr-2.2.txt (+73/-3) doc/en/release-notes/bzr-2.3.txt (+0/-76) |
To merge this branch: | bzr merge lp:~mbp/bzr/715000-more-fallbacks |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
bzr-core | Pending | ||
Review via email: mp+49027@code.launchpad.net |
This proposal supersedes a proposal from 2011-02-09.
This proposal has been superseded by a proposal from 2011-02-09.
Commit message
Description of the change
follow-through from bug 715000: rename _fallback_vfs to _immediate_
John A Meinel (jameinel) wrote : Posted in a previous version of this proposal | # |
John A Meinel (jameinel) wrote : Posted in a previous version of this proposal | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2/9/2011 2:09 AM, Martin Pool wrote:
> Martin Pool has proposed merging lp:~mbp/bzr/715000-more-fallbacks into lp:bzr/2.2.
>
> Requested reviews:
> bzr-core (bzr-core)
>
> For more details, see:
> https:/
>
> follow-through from bug 715000: rename _fallback_vfs to _immediate_
I don't really like changing the name of things in a stable series. Do
you feel this is really necessary?
review: needs_information
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk1
1UMAoKDzNFENu71
=F4wU
-----END PGP SIGNATURE-----
Preview Diff
1 | === modified file 'bzr' |
2 | --- bzr 2011-02-09 08:12:22 +0000 |
3 | +++ bzr 2011-02-08 13:56:49 +0000 |
4 | @@ -23,11 +23,7 @@ |
5 | import warnings |
6 | |
7 | # update this on each release |
8 | -<<<<<<< TREE |
9 | _script_version = (2, 4, 0) |
10 | -======= |
11 | -_script_version = (2, 2, 5) |
12 | ->>>>>>> MERGE-SOURCE |
13 | |
14 | try: |
15 | version_info = sys.version_info |
16 | |
17 | === modified file 'bzrlib/__init__.py' |
18 | --- bzrlib/__init__.py 2011-02-09 08:12:22 +0000 |
19 | +++ bzrlib/__init__.py 2011-02-08 13:56:49 +0000 |
20 | @@ -52,11 +52,7 @@ |
21 | # Python version 2.0 is (2, 0, 0, 'final', 0)." Additionally we use a |
22 | # releaselevel of 'dev' for unreleased under-development code. |
23 | |
24 | -<<<<<<< TREE |
25 | version_info = (2, 4, 0, 'dev', 1) |
26 | -======= |
27 | -version_info = (2, 2, 5, 'dev', 0) |
28 | ->>>>>>> MERGE-SOURCE |
29 | |
30 | # API compatibility version |
31 | api_minimum_version = (2, 4, 0) |
32 | |
33 | === modified file 'bzrlib/groupcompress.py' |
34 | --- bzrlib/groupcompress.py 2011-02-09 08:12:22 +0000 |
35 | +++ bzrlib/groupcompress.py 2011-02-09 08:12:22 +0000 |
36 | @@ -1186,7 +1186,7 @@ |
37 | _unadded_refs = {} |
38 | self._unadded_refs = _unadded_refs |
39 | self._group_cache = LRUSizeCache(max_size=50*1024*1024) |
40 | - self._fallback_vfs = [] |
41 | + self._immediate_fallbacks = [] |
42 | |
43 | def without_fallbacks(self): |
44 | """Return a clone of this object without any fallbacks configured.""" |
45 | @@ -1266,7 +1266,7 @@ |
46 | |
47 | :param a_versioned_files: A VersionedFiles object. |
48 | """ |
49 | - self._fallback_vfs.append(a_versioned_files) |
50 | + self._immediate_fallbacks.append(a_versioned_files) |
51 | |
52 | def annotate(self, key): |
53 | """See VersionedFiles.annotate.""" |
54 | @@ -1342,7 +1342,7 @@ |
55 | and so on. |
56 | """ |
57 | result = {} |
58 | - sources = [self._index] + self._fallback_vfs |
59 | + sources = [self._index] + self._immediate_fallbacks |
60 | source_results = [] |
61 | missing = set(keys) |
62 | for source in sources: |
63 | @@ -1449,7 +1449,7 @@ |
64 | parent_map = {} |
65 | key_to_source_map = {} |
66 | source_results = [] |
67 | - for source in self._fallback_vfs: |
68 | + for source in self._immediate_fallbacks: |
69 | if not missing: |
70 | break |
71 | source_parents = source.get_parent_map(missing) |
72 | @@ -1832,7 +1832,7 @@ |
73 | """See VersionedFiles.keys.""" |
74 | if 'evil' in debug.debug_flags: |
75 | trace.mutter_callsite(2, "keys scales with size of history") |
76 | - sources = [self._index] + self._fallback_vfs |
77 | + sources = [self._index] + self._immediate_fallbacks |
78 | result = set() |
79 | for source in sources: |
80 | result.update(source.keys()) |
81 | |
82 | === modified file 'bzrlib/knit.py' |
83 | --- bzrlib/knit.py 2011-02-09 08:12:22 +0000 |
84 | +++ bzrlib/knit.py 2011-02-09 08:12:22 +0000 |
85 | @@ -883,7 +883,7 @@ |
86 | self._factory = KnitAnnotateFactory() |
87 | else: |
88 | self._factory = KnitPlainFactory() |
89 | - self._fallback_vfs = [] |
90 | + self._immediate_fallbacks = [] |
91 | self._reload_func = reload_func |
92 | |
93 | def __repr__(self): |
94 | @@ -897,7 +897,7 @@ |
95 | |
96 | :param a_versioned_files: A VersionedFiles object. |
97 | """ |
98 | - self._fallback_vfs.append(a_versioned_files) |
99 | + self._immediate_fallbacks.append(a_versioned_files) |
100 | |
101 | def add_lines(self, key, parents, lines, parent_texts=None, |
102 | left_matching_blocks=None, nostore_sha=None, random_id=False, |
103 | @@ -1070,7 +1070,7 @@ |
104 | raise errors.KnitCorrupt(self, |
105 | "Missing basis parent %s for %s" % ( |
106 | compression_parent, key)) |
107 | - for fallback_vfs in self._fallback_vfs: |
108 | + for fallback_vfs in self._immediate_fallbacks: |
109 | fallback_vfs.check() |
110 | |
111 | def _check_add(self, key, lines, random_id, check_content): |
112 | @@ -1226,7 +1226,7 @@ |
113 | and so on. |
114 | """ |
115 | result = {} |
116 | - sources = [self._index] + self._fallback_vfs |
117 | + sources = [self._index] + self._immediate_fallbacks |
118 | source_results = [] |
119 | missing = set(keys) |
120 | for source in sources: |
121 | @@ -1526,7 +1526,7 @@ |
122 | yield KnitContentFactory(key, global_map[key], |
123 | record_details, None, raw_data, self._factory.annotated, None) |
124 | else: |
125 | - vf = self._fallback_vfs[parent_maps.index(source) - 1] |
126 | + vf = self._immediate_fallbacks[parent_maps.index(source) - 1] |
127 | for record in vf.get_record_stream(keys, ordering, |
128 | include_delta_closure): |
129 | yield record |
130 | @@ -1542,7 +1542,7 @@ |
131 | # record entry 2 is the 'digest'. |
132 | result[key] = details[2] |
133 | missing.difference_update(set(result)) |
134 | - for source in self._fallback_vfs: |
135 | + for source in self._immediate_fallbacks: |
136 | if not missing: |
137 | break |
138 | new_result = source.get_sha1s(missing) |
139 | @@ -1619,7 +1619,7 @@ |
140 | raise RevisionNotPresent([record.key], self) |
141 | elif ((record.storage_kind in knit_types) |
142 | and (compression_parent is None |
143 | - or not self._fallback_vfs |
144 | + or not self._immediate_fallbacks |
145 | or self._index.has_key(compression_parent) |
146 | or not self.has_key(compression_parent))): |
147 | # we can insert the knit record literally if either it has no |
148 | @@ -1797,11 +1797,11 @@ |
149 | # vfs, and hope to find them there. Note that if the keys are found |
150 | # but had no changes or no content, the fallback may not return |
151 | # anything. |
152 | - if keys and not self._fallback_vfs: |
153 | + if keys and not self._immediate_fallbacks: |
154 | # XXX: strictly the second parameter is meant to be the file id |
155 | # but it's not easily accessible here. |
156 | raise RevisionNotPresent(keys, repr(self)) |
157 | - for source in self._fallback_vfs: |
158 | + for source in self._immediate_fallbacks: |
159 | if not keys: |
160 | break |
161 | source_keys = set() |
162 | @@ -2016,7 +2016,7 @@ |
163 | """See VersionedFiles.keys.""" |
164 | if 'evil' in debug.debug_flags: |
165 | trace.mutter_callsite(2, "keys scales with size of history") |
166 | - sources = [self._index] + self._fallback_vfs |
167 | + sources = [self._index] + self._immediate_fallbacks |
168 | result = set() |
169 | for source in sources: |
170 | result.update(source.keys()) |
171 | @@ -2062,7 +2062,7 @@ |
172 | |
173 | missing_keys = set(nonlocal_keys) |
174 | # Read from remote versioned file instances and provide to our caller. |
175 | - for source in self.vf._fallback_vfs: |
176 | + for source in self.vf._immediate_fallbacks: |
177 | if not missing_keys: |
178 | break |
179 | # Loop over fallback repositories asking them for texts - ignore |
180 | @@ -3521,8 +3521,8 @@ |
181 | return records, ann_keys |
182 | |
183 | def _get_needed_texts(self, key, pb=None): |
184 | - # if True or len(self._vf._fallback_vfs) > 0: |
185 | - if len(self._vf._fallback_vfs) > 0: |
186 | + # if True or len(self._vf._immediate_fallbacks) > 0: |
187 | + if len(self._vf._immediate_fallbacks) > 0: |
188 | # If we have fallbacks, go to the generic path |
189 | for v in annotate.Annotator._get_needed_texts(self, key, pb=pb): |
190 | yield v |
191 | |
192 | === modified file 'bzrlib/tests/per_repository_reference/test_graph.py' |
193 | --- bzrlib/tests/per_repository_reference/test_graph.py 2011-02-09 08:12:22 +0000 |
194 | +++ bzrlib/tests/per_repository_reference/test_graph.py 2011-02-09 08:12:22 +0000 |
195 | @@ -29,7 +29,7 @@ |
196 | See <https://bugs.launchpad.net/bugs/715000>. |
197 | """ |
198 | branch_a, branch_b, branch_c, revid_1 = self.make_double_stacked_branches() |
199 | - for br in [branch_c]: |
200 | + for br in [branch_a, branch_b, branch_c]: |
201 | self.assertEquals( |
202 | [revid_1], |
203 | br.repository.get_known_graph_ancestry([revid_1]).topo_sort()) |
204 | |
205 | === modified file 'bzrlib/versionedfile.py' |
206 | --- bzrlib/versionedfile.py 2011-02-09 08:12:22 +0000 |
207 | +++ bzrlib/versionedfile.py 2011-02-09 08:12:22 +0000 |
208 | @@ -1,7 +1,4 @@ |
209 | -# Copyright (C) 2006-2010 Canonical Ltd |
210 | -# |
211 | -# Authors: |
212 | -# Johan Rydberg <jrydberg@gnu.org> |
213 | +# Copyright (C) 2006-2011 Canonical Ltd |
214 | # |
215 | # This program is free software; you can redistribute it and/or modify |
216 | # it under the terms of the GNU General Public License as published by |
217 | @@ -930,6 +927,10 @@ |
218 | |
219 | The use of tuples allows a single code base to support several different |
220 | uses with only the mapping logic changing from instance to instance. |
221 | + |
222 | + :ivar _immediate_fallbacks: For subclasses that support stacking, |
223 | + this is a list of other VersionedFiles immediately underneath this |
224 | + one. They may in turn each have further fallbacks. |
225 | """ |
226 | |
227 | def add_lines(self, key, parents, lines, parent_texts=None, |
228 | @@ -1201,7 +1202,7 @@ |
229 | at open time because they may change after the objects are opened. |
230 | """ |
231 | all_fallbacks = [] |
232 | - for a_vfs in self._fallback_vfs: |
233 | + for a_vfs in self._immediate_fallbacks: |
234 | all_fallbacks.append(a_vfs) |
235 | all_fallbacks.extend(a_vfs._transitive_fallbacks()) |
236 | return all_fallbacks |
237 | |
238 | === modified file 'doc/en/release-notes/bzr-2.2.txt' |
239 | --- doc/en/release-notes/bzr-2.2.txt 2011-02-04 14:10:48 +0000 |
240 | +++ doc/en/release-notes/bzr-2.2.txt 2011-02-09 08:12:22 +0000 |
241 | @@ -2,9 +2,79 @@ |
242 | Bazaar Release Notes |
243 | #################### |
244 | |
245 | -.. toctree:: |
246 | - :maxdepth: 1 |
247 | - |
248 | +.. contents:: List of Releases |
249 | + :depth: 1 |
250 | + |
251 | +bzr 2.2.5 |
252 | +######### |
253 | + |
254 | +:Codename: Suggestions welcome |
255 | +:2.2.5: NOT RELEASED YET |
256 | + |
257 | +Compatibility Breaks |
258 | +******************** |
259 | + |
260 | +New Features |
261 | +************ |
262 | + |
263 | +Bug Fixes |
264 | +********* |
265 | + |
266 | +* Correctly handle ``bzr log`` and `get_known_graph_ancestry` on a |
267 | + doubly-stacked branch. |
268 | + (James Westby, Martin Pool, #715000) |
269 | + |
270 | +Improvements |
271 | +************ |
272 | + |
273 | +Documentation |
274 | +************* |
275 | + |
276 | +API Changes |
277 | +*********** |
278 | + |
279 | +Internals |
280 | +********* |
281 | + |
282 | +Testing |
283 | +******* |
284 | + |
285 | + |
286 | +bzr 2.2.4 |
287 | +######### |
288 | + |
289 | +:2.2.4: 2011-02-04 |
290 | + |
291 | +This is a bugfix release. Only one bug has been fixed, a regression from 2.2.3 |
292 | +involving only certain operations with launchpad. Upgrading is recommended for |
293 | +all users on earlier 2.2 releases. |
294 | + |
295 | +Bug Fixes |
296 | +********* |
297 | + |
298 | +* Fix communications with the Launchpad web service when using |
299 | + launchpadlib >= 1.5.5. This was a latent bug in bzr's communication |
300 | + with Launchpad's production instance, which only became a problem when |
301 | + the default instance was switched from edge to production in bzr 2.2.3. |
302 | + (Max Bowsher, #707075) |
303 | + |
304 | + |
305 | +bzr 2.2.3 |
306 | +######### |
307 | + |
308 | +:2.2.3: 2011-01-20 |
309 | + |
310 | +This is a bugfix release. Upgrading is recommended for all users |
311 | +on earlier 2.2 releases. |
312 | + |
313 | +Compatibility Breaks |
314 | +******************** |
315 | + |
316 | +* Launchpad has announced that the ``edge.launchpad.net`` instance is |
317 | + deprecated and may be shut down in the future |
318 | + <http://blog.launchpad.net/general/edge-is-deprecated>. Bazaar has therefore |
319 | + been updated in this release to talk to the main (``launchpad.net``) servers, |
320 | + rather than the ``edge`` ones. (Vincent Ladeuil, #583667) |
321 | bzr 2.2.4 |
322 | ######### |
323 | |
324 | |
325 | === modified file 'doc/en/release-notes/bzr-2.3.txt' |
326 | --- doc/en/release-notes/bzr-2.3.txt 2011-02-09 08:12:22 +0000 |
327 | +++ doc/en/release-notes/bzr-2.3.txt 2011-02-08 13:56:49 +0000 |
328 | @@ -2,7 +2,6 @@ |
329 | Bazaar Release Notes |
330 | #################### |
331 | |
332 | -<<<<<<< TREE |
333 | .. toctree:: |
334 | :maxdepth: 1 |
335 | |
336 | @@ -15,81 +14,6 @@ |
337 | ***************************** |
338 | |
339 | .. These may require users to change the way they use Bazaar. |
340 | -======= |
341 | -.. contents:: List of Releases |
342 | - :depth: 1 |
343 | - |
344 | -bzr 2.2.5 |
345 | -######### |
346 | - |
347 | -:Codename: Suggestions welcome |
348 | -:2.2.5: NOT RELEASED YET |
349 | - |
350 | -Compatibility Breaks |
351 | -******************** |
352 | - |
353 | -New Features |
354 | -************ |
355 | - |
356 | -Bug Fixes |
357 | -********* |
358 | - |
359 | -* Correctly handle ``bzr log`` and `get_known_graph_ancestry` on a |
360 | - doubly-stacked branch. |
361 | - (James Westby, Martin Pool, #715000) |
362 | - |
363 | -Improvements |
364 | -************ |
365 | - |
366 | -Documentation |
367 | -************* |
368 | - |
369 | -API Changes |
370 | -*********** |
371 | - |
372 | -Internals |
373 | -********* |
374 | - |
375 | -Testing |
376 | -******* |
377 | - |
378 | - |
379 | -bzr 2.2.4 |
380 | -######### |
381 | - |
382 | -:2.2.4: 2011-02-04 |
383 | - |
384 | -This is a bugfix release. Only one bug has been fixed, a regression from 2.2.3 |
385 | -involving only certain operations with launchpad. Upgrading is recommended for |
386 | -all users on earlier 2.2 releases. |
387 | - |
388 | -Bug Fixes |
389 | -********* |
390 | - |
391 | -* Fix communications with the Launchpad web service when using |
392 | - launchpadlib >= 1.5.5. This was a latent bug in bzr's communication |
393 | - with Launchpad's production instance, which only became a problem when |
394 | - the default instance was switched from edge to production in bzr 2.2.3. |
395 | - (Max Bowsher, #707075) |
396 | - |
397 | - |
398 | -bzr 2.2.3 |
399 | -######### |
400 | - |
401 | -:2.2.3: 2011-01-20 |
402 | - |
403 | -This is a bugfix release. Upgrading is recommended for all users |
404 | -on earlier 2.2 releases. |
405 | - |
406 | -Compatibility Breaks |
407 | -******************** |
408 | - |
409 | -* Launchpad has announced that the ``edge.launchpad.net`` instance is |
410 | - deprecated and may be shut down in the future |
411 | - <http://blog.launchpad.net/general/edge-is-deprecated>. Bazaar has therefore |
412 | - been updated in this release to talk to the main (``launchpad.net``) servers, |
413 | - rather than the ``edge`` ones. (Vincent Ladeuil, #583667) |
414 | ->>>>>>> MERGE-SOURCE |
415 | |
416 | New Features |
417 | ************ |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2/9/2011 2:08 AM, Martin Pool wrote: /code.launchpad .net/~mbp/ bzr/715000- more-fallbacks/ +merge/ 49025 fallbacks to make it clear it's not the whole stack.
> Martin Pool has proposed merging lp:~mbp/bzr/715000-more-fallbacks into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
> For more details, see:
> https:/
>
> follow-through from bug 715000: rename _fallback_vfs to _immediate_
I'm ok with the change, but I would make it "_immediate_ fallback_ vfs" to fallback_ repositories" .
distinguish it from "_immediate_
Mostly to be easily greppable.
I don't personally find it better, mostly because the added length
doesn't add much. It seems a simple
:ivar _fallback_vfs: Immediate fallbacks, note this is not transitive
Could be a better way to go.
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk1 St0oACgkQJdeBCY SNAAOLHQCg0Yj/ BsMKAzL4Sr5OhGQ bxBoZ yOfdMjxhNnjLFiY vdnY9+ansx
9FMAnj/
=LcsQ
-----END PGP SIGNATURE-----