Merge lp:~mbp/bzr/715000-more-fallbacks into lp:bzr

Proposed by Martin Pool
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
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.

Description of the change

follow-through from bug 715000: rename _fallback_vfs to _immediate_fallbacks to make it clear it's not the whole stack.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote : Posted in a previous version of this proposal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/9/2011 2:08 AM, Martin Pool wrote:
> 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://code.launchpad.net/~mbp/bzr/715000-more-fallbacks/+merge/49025
>
> follow-through from bug 715000: rename _fallback_vfs to _immediate_fallbacks to make it clear it's not the whole stack.

I'm ok with the change, but I would make it "_immediate_fallback_vfs" to
distinguish it from "_immediate_fallback_repositories".
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
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1St0oACgkQJdeBCYSNAAOLHQCg0Yj/BsMKAzL4Sr5OhGQbxBoZ
9FMAnj/yOfdMjxhNnjLFiYvdnY9+ansx
=LcsQ
-----END PGP SIGNATURE-----

Revision history for this message
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://code.launchpad.net/~mbp/bzr/715000-more-fallbacks/+merge/49026
>
> follow-through from bug 715000: rename _fallback_vfs to _immediate_fallbacks to make it clear it's not the whole stack.

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://enigmail.mozdev.org/

iEYEARECAAYFAk1St2gACgkQJdeBCYSNAAPIYwCeJ4s9T48rbxRduTts3rarhkPu
1UMAoKDzNFENu713ShbJuPiCF9zDJQdi
=F4wU
-----END PGP SIGNATURE-----

review: Needs Information

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzr'
--- bzr 2011-02-09 08:12:22 +0000
+++ bzr 2011-02-08 13:56:49 +0000
@@ -23,11 +23,7 @@
23import warnings23import warnings
2424
25# update this on each release25# update this on each release
26<<<<<<< TREE
27_script_version = (2, 4, 0)26_script_version = (2, 4, 0)
28=======
29_script_version = (2, 2, 5)
30>>>>>>> MERGE-SOURCE
3127
32try:28try:
33 version_info = sys.version_info29 version_info = sys.version_info
3430
=== modified file 'bzrlib/__init__.py'
--- bzrlib/__init__.py 2011-02-09 08:12:22 +0000
+++ bzrlib/__init__.py 2011-02-08 13:56:49 +0000
@@ -52,11 +52,7 @@
52# Python version 2.0 is (2, 0, 0, 'final', 0)." Additionally we use a52# Python version 2.0 is (2, 0, 0, 'final', 0)." Additionally we use a
53# releaselevel of 'dev' for unreleased under-development code.53# releaselevel of 'dev' for unreleased under-development code.
5454
55<<<<<<< TREE
56version_info = (2, 4, 0, 'dev', 1)55version_info = (2, 4, 0, 'dev', 1)
57=======
58version_info = (2, 2, 5, 'dev', 0)
59>>>>>>> MERGE-SOURCE
6056
61# API compatibility version57# API compatibility version
62api_minimum_version = (2, 4, 0)58api_minimum_version = (2, 4, 0)
6359
=== modified file 'bzrlib/groupcompress.py'
--- bzrlib/groupcompress.py 2011-02-09 08:12:22 +0000
+++ bzrlib/groupcompress.py 2011-02-09 08:12:22 +0000
@@ -1186,7 +1186,7 @@
1186 _unadded_refs = {}1186 _unadded_refs = {}
1187 self._unadded_refs = _unadded_refs1187 self._unadded_refs = _unadded_refs
1188 self._group_cache = LRUSizeCache(max_size=50*1024*1024)1188 self._group_cache = LRUSizeCache(max_size=50*1024*1024)
1189 self._fallback_vfs = []1189 self._immediate_fallbacks = []
11901190
1191 def without_fallbacks(self):1191 def without_fallbacks(self):
1192 """Return a clone of this object without any fallbacks configured."""1192 """Return a clone of this object without any fallbacks configured."""
@@ -1266,7 +1266,7 @@
12661266
1267 :param a_versioned_files: A VersionedFiles object.1267 :param a_versioned_files: A VersionedFiles object.
1268 """1268 """
1269 self._fallback_vfs.append(a_versioned_files)1269 self._immediate_fallbacks.append(a_versioned_files)
12701270
1271 def annotate(self, key):1271 def annotate(self, key):
1272 """See VersionedFiles.annotate."""1272 """See VersionedFiles.annotate."""
@@ -1342,7 +1342,7 @@
1342 and so on.1342 and so on.
1343 """1343 """
1344 result = {}1344 result = {}
1345 sources = [self._index] + self._fallback_vfs1345 sources = [self._index] + self._immediate_fallbacks
1346 source_results = []1346 source_results = []
1347 missing = set(keys)1347 missing = set(keys)
1348 for source in sources:1348 for source in sources:
@@ -1449,7 +1449,7 @@
1449 parent_map = {}1449 parent_map = {}
1450 key_to_source_map = {}1450 key_to_source_map = {}
1451 source_results = []1451 source_results = []
1452 for source in self._fallback_vfs:1452 for source in self._immediate_fallbacks:
1453 if not missing:1453 if not missing:
1454 break1454 break
1455 source_parents = source.get_parent_map(missing)1455 source_parents = source.get_parent_map(missing)
@@ -1832,7 +1832,7 @@
1832 """See VersionedFiles.keys."""1832 """See VersionedFiles.keys."""
1833 if 'evil' in debug.debug_flags:1833 if 'evil' in debug.debug_flags:
1834 trace.mutter_callsite(2, "keys scales with size of history")1834 trace.mutter_callsite(2, "keys scales with size of history")
1835 sources = [self._index] + self._fallback_vfs1835 sources = [self._index] + self._immediate_fallbacks
1836 result = set()1836 result = set()
1837 for source in sources:1837 for source in sources:
1838 result.update(source.keys())1838 result.update(source.keys())
18391839
=== modified file 'bzrlib/knit.py'
--- bzrlib/knit.py 2011-02-09 08:12:22 +0000
+++ bzrlib/knit.py 2011-02-09 08:12:22 +0000
@@ -883,7 +883,7 @@
883 self._factory = KnitAnnotateFactory()883 self._factory = KnitAnnotateFactory()
884 else:884 else:
885 self._factory = KnitPlainFactory()885 self._factory = KnitPlainFactory()
886 self._fallback_vfs = []886 self._immediate_fallbacks = []
887 self._reload_func = reload_func887 self._reload_func = reload_func
888888
889 def __repr__(self):889 def __repr__(self):
@@ -897,7 +897,7 @@
897897
898 :param a_versioned_files: A VersionedFiles object.898 :param a_versioned_files: A VersionedFiles object.
899 """899 """
900 self._fallback_vfs.append(a_versioned_files)900 self._immediate_fallbacks.append(a_versioned_files)
901901
902 def add_lines(self, key, parents, lines, parent_texts=None,902 def add_lines(self, key, parents, lines, parent_texts=None,
903 left_matching_blocks=None, nostore_sha=None, random_id=False,903 left_matching_blocks=None, nostore_sha=None, random_id=False,
@@ -1070,7 +1070,7 @@
1070 raise errors.KnitCorrupt(self,1070 raise errors.KnitCorrupt(self,
1071 "Missing basis parent %s for %s" % (1071 "Missing basis parent %s for %s" % (
1072 compression_parent, key))1072 compression_parent, key))
1073 for fallback_vfs in self._fallback_vfs:1073 for fallback_vfs in self._immediate_fallbacks:
1074 fallback_vfs.check()1074 fallback_vfs.check()
10751075
1076 def _check_add(self, key, lines, random_id, check_content):1076 def _check_add(self, key, lines, random_id, check_content):
@@ -1226,7 +1226,7 @@
1226 and so on.1226 and so on.
1227 """1227 """
1228 result = {}1228 result = {}
1229 sources = [self._index] + self._fallback_vfs1229 sources = [self._index] + self._immediate_fallbacks
1230 source_results = []1230 source_results = []
1231 missing = set(keys)1231 missing = set(keys)
1232 for source in sources:1232 for source in sources:
@@ -1526,7 +1526,7 @@
1526 yield KnitContentFactory(key, global_map[key],1526 yield KnitContentFactory(key, global_map[key],
1527 record_details, None, raw_data, self._factory.annotated, None)1527 record_details, None, raw_data, self._factory.annotated, None)
1528 else:1528 else:
1529 vf = self._fallback_vfs[parent_maps.index(source) - 1]1529 vf = self._immediate_fallbacks[parent_maps.index(source) - 1]
1530 for record in vf.get_record_stream(keys, ordering,1530 for record in vf.get_record_stream(keys, ordering,
1531 include_delta_closure):1531 include_delta_closure):
1532 yield record1532 yield record
@@ -1542,7 +1542,7 @@
1542 # record entry 2 is the 'digest'.1542 # record entry 2 is the 'digest'.
1543 result[key] = details[2]1543 result[key] = details[2]
1544 missing.difference_update(set(result))1544 missing.difference_update(set(result))
1545 for source in self._fallback_vfs:1545 for source in self._immediate_fallbacks:
1546 if not missing:1546 if not missing:
1547 break1547 break
1548 new_result = source.get_sha1s(missing)1548 new_result = source.get_sha1s(missing)
@@ -1619,7 +1619,7 @@
1619 raise RevisionNotPresent([record.key], self)1619 raise RevisionNotPresent([record.key], self)
1620 elif ((record.storage_kind in knit_types)1620 elif ((record.storage_kind in knit_types)
1621 and (compression_parent is None1621 and (compression_parent is None
1622 or not self._fallback_vfs1622 or not self._immediate_fallbacks
1623 or self._index.has_key(compression_parent)1623 or self._index.has_key(compression_parent)
1624 or not self.has_key(compression_parent))):1624 or not self.has_key(compression_parent))):
1625 # we can insert the knit record literally if either it has no1625 # we can insert the knit record literally if either it has no
@@ -1797,11 +1797,11 @@
1797 # vfs, and hope to find them there. Note that if the keys are found1797 # vfs, and hope to find them there. Note that if the keys are found
1798 # but had no changes or no content, the fallback may not return1798 # but had no changes or no content, the fallback may not return
1799 # anything.1799 # anything.
1800 if keys and not self._fallback_vfs:1800 if keys and not self._immediate_fallbacks:
1801 # XXX: strictly the second parameter is meant to be the file id1801 # XXX: strictly the second parameter is meant to be the file id
1802 # but it's not easily accessible here.1802 # but it's not easily accessible here.
1803 raise RevisionNotPresent(keys, repr(self))1803 raise RevisionNotPresent(keys, repr(self))
1804 for source in self._fallback_vfs:1804 for source in self._immediate_fallbacks:
1805 if not keys:1805 if not keys:
1806 break1806 break
1807 source_keys = set()1807 source_keys = set()
@@ -2016,7 +2016,7 @@
2016 """See VersionedFiles.keys."""2016 """See VersionedFiles.keys."""
2017 if 'evil' in debug.debug_flags:2017 if 'evil' in debug.debug_flags:
2018 trace.mutter_callsite(2, "keys scales with size of history")2018 trace.mutter_callsite(2, "keys scales with size of history")
2019 sources = [self._index] + self._fallback_vfs2019 sources = [self._index] + self._immediate_fallbacks
2020 result = set()2020 result = set()
2021 for source in sources:2021 for source in sources:
2022 result.update(source.keys())2022 result.update(source.keys())
@@ -2062,7 +2062,7 @@
20622062
2063 missing_keys = set(nonlocal_keys)2063 missing_keys = set(nonlocal_keys)
2064 # Read from remote versioned file instances and provide to our caller.2064 # Read from remote versioned file instances and provide to our caller.
2065 for source in self.vf._fallback_vfs:2065 for source in self.vf._immediate_fallbacks:
2066 if not missing_keys:2066 if not missing_keys:
2067 break2067 break
2068 # Loop over fallback repositories asking them for texts - ignore2068 # Loop over fallback repositories asking them for texts - ignore
@@ -3521,8 +3521,8 @@
3521 return records, ann_keys3521 return records, ann_keys
35223522
3523 def _get_needed_texts(self, key, pb=None):3523 def _get_needed_texts(self, key, pb=None):
3524 # if True or len(self._vf._fallback_vfs) > 0:3524 # if True or len(self._vf._immediate_fallbacks) > 0:
3525 if len(self._vf._fallback_vfs) > 0:3525 if len(self._vf._immediate_fallbacks) > 0:
3526 # If we have fallbacks, go to the generic path3526 # If we have fallbacks, go to the generic path
3527 for v in annotate.Annotator._get_needed_texts(self, key, pb=pb):3527 for v in annotate.Annotator._get_needed_texts(self, key, pb=pb):
3528 yield v3528 yield v
35293529
=== modified file 'bzrlib/tests/per_repository_reference/test_graph.py'
--- bzrlib/tests/per_repository_reference/test_graph.py 2011-02-09 08:12:22 +0000
+++ bzrlib/tests/per_repository_reference/test_graph.py 2011-02-09 08:12:22 +0000
@@ -29,7 +29,7 @@
29 See <https://bugs.launchpad.net/bugs/715000>.29 See <https://bugs.launchpad.net/bugs/715000>.
30 """30 """
31 branch_a, branch_b, branch_c, revid_1 = self.make_double_stacked_branches()31 branch_a, branch_b, branch_c, revid_1 = self.make_double_stacked_branches()
32 for br in [branch_c]:32 for br in [branch_a, branch_b, branch_c]:
33 self.assertEquals(33 self.assertEquals(
34 [revid_1],34 [revid_1],
35 br.repository.get_known_graph_ancestry([revid_1]).topo_sort())35 br.repository.get_known_graph_ancestry([revid_1]).topo_sort())
3636
=== modified file 'bzrlib/versionedfile.py'
--- bzrlib/versionedfile.py 2011-02-09 08:12:22 +0000
+++ bzrlib/versionedfile.py 2011-02-09 08:12:22 +0000
@@ -1,7 +1,4 @@
1# Copyright (C) 2006-2010 Canonical Ltd1# Copyright (C) 2006-2011 Canonical Ltd
2#
3# Authors:
4# Johan Rydberg <jrydberg@gnu.org>
5#2#
6# This program is free software; you can redistribute it and/or modify3# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by4# it under the terms of the GNU General Public License as published by
@@ -930,6 +927,10 @@
930927
931 The use of tuples allows a single code base to support several different928 The use of tuples allows a single code base to support several different
932 uses with only the mapping logic changing from instance to instance.929 uses with only the mapping logic changing from instance to instance.
930
931 :ivar _immediate_fallbacks: For subclasses that support stacking,
932 this is a list of other VersionedFiles immediately underneath this
933 one. They may in turn each have further fallbacks.
933 """934 """
934935
935 def add_lines(self, key, parents, lines, parent_texts=None,936 def add_lines(self, key, parents, lines, parent_texts=None,
@@ -1201,7 +1202,7 @@
1201 at open time because they may change after the objects are opened.1202 at open time because they may change after the objects are opened.
1202 """1203 """
1203 all_fallbacks = []1204 all_fallbacks = []
1204 for a_vfs in self._fallback_vfs:1205 for a_vfs in self._immediate_fallbacks:
1205 all_fallbacks.append(a_vfs)1206 all_fallbacks.append(a_vfs)
1206 all_fallbacks.extend(a_vfs._transitive_fallbacks())1207 all_fallbacks.extend(a_vfs._transitive_fallbacks())
1207 return all_fallbacks1208 return all_fallbacks
12081209
=== modified file 'doc/en/release-notes/bzr-2.2.txt'
--- doc/en/release-notes/bzr-2.2.txt 2011-02-04 14:10:48 +0000
+++ doc/en/release-notes/bzr-2.2.txt 2011-02-09 08:12:22 +0000
@@ -2,9 +2,79 @@
2Bazaar Release Notes2Bazaar Release Notes
3####################3####################
44
5.. toctree::5.. contents:: List of Releases
6 :maxdepth: 16 :depth: 1
77
8bzr 2.2.5
9#########
10
11:Codename: Suggestions welcome
12:2.2.5: NOT RELEASED YET
13
14Compatibility Breaks
15********************
16
17New Features
18************
19
20Bug Fixes
21*********
22
23* Correctly handle ``bzr log`` and `get_known_graph_ancestry` on a
24 doubly-stacked branch.
25 (James Westby, Martin Pool, #715000)
26
27Improvements
28************
29
30Documentation
31*************
32
33API Changes
34***********
35
36Internals
37*********
38
39Testing
40*******
41
42
43bzr 2.2.4
44#########
45
46:2.2.4: 2011-02-04
47
48This is a bugfix release. Only one bug has been fixed, a regression from 2.2.3
49involving only certain operations with launchpad. Upgrading is recommended for
50all users on earlier 2.2 releases.
51
52Bug Fixes
53*********
54
55* Fix communications with the Launchpad web service when using
56 launchpadlib >= 1.5.5. This was a latent bug in bzr's communication
57 with Launchpad's production instance, which only became a problem when
58 the default instance was switched from edge to production in bzr 2.2.3.
59 (Max Bowsher, #707075)
60
61
62bzr 2.2.3
63#########
64
65:2.2.3: 2011-01-20
66
67This is a bugfix release. Upgrading is recommended for all users
68on earlier 2.2 releases.
69
70Compatibility Breaks
71********************
72
73* Launchpad has announced that the ``edge.launchpad.net`` instance is
74 deprecated and may be shut down in the future
75 <http://blog.launchpad.net/general/edge-is-deprecated>. Bazaar has therefore
76 been updated in this release to talk to the main (``launchpad.net``) servers,
77 rather than the ``edge`` ones. (Vincent Ladeuil, #583667)
8bzr 2.2.478bzr 2.2.4
9#########79#########
1080
1181
=== modified file 'doc/en/release-notes/bzr-2.3.txt'
--- doc/en/release-notes/bzr-2.3.txt 2011-02-09 08:12:22 +0000
+++ doc/en/release-notes/bzr-2.3.txt 2011-02-08 13:56:49 +0000
@@ -2,7 +2,6 @@
2Bazaar Release Notes2Bazaar Release Notes
3####################3####################
44
5<<<<<<< TREE
6.. toctree::5.. toctree::
7 :maxdepth: 16 :maxdepth: 1
87
@@ -15,81 +14,6 @@
15*****************************14*****************************
1615
17.. These may require users to change the way they use Bazaar.16.. These may require users to change the way they use Bazaar.
18=======
19.. contents:: List of Releases
20 :depth: 1
21
22bzr 2.2.5
23#########
24
25:Codename: Suggestions welcome
26:2.2.5: NOT RELEASED YET
27
28Compatibility Breaks
29********************
30
31New Features
32************
33
34Bug Fixes
35*********
36
37* Correctly handle ``bzr log`` and `get_known_graph_ancestry` on a
38 doubly-stacked branch.
39 (James Westby, Martin Pool, #715000)
40
41Improvements
42************
43
44Documentation
45*************
46
47API Changes
48***********
49
50Internals
51*********
52
53Testing
54*******
55
56
57bzr 2.2.4
58#########
59
60:2.2.4: 2011-02-04
61
62This is a bugfix release. Only one bug has been fixed, a regression from 2.2.3
63involving only certain operations with launchpad. Upgrading is recommended for
64all users on earlier 2.2 releases.
65
66Bug Fixes
67*********
68
69* Fix communications with the Launchpad web service when using
70 launchpadlib >= 1.5.5. This was a latent bug in bzr's communication
71 with Launchpad's production instance, which only became a problem when
72 the default instance was switched from edge to production in bzr 2.2.3.
73 (Max Bowsher, #707075)
74
75
76bzr 2.2.3
77#########
78
79:2.2.3: 2011-01-20
80
81This is a bugfix release. Upgrading is recommended for all users
82on earlier 2.2 releases.
83
84Compatibility Breaks
85********************
86
87* Launchpad has announced that the ``edge.launchpad.net`` instance is
88 deprecated and may be shut down in the future
89 <http://blog.launchpad.net/general/edge-is-deprecated>. Bazaar has therefore
90 been updated in this release to talk to the main (``launchpad.net``) servers,
91 rather than the ``edge`` ones. (Vincent Ladeuil, #583667)
92>>>>>>> MERGE-SOURCE
9317
94New Features18New Features
95************19************