Rev 4607: Prepare test_repository's inter_repository tests for 2a. in http://bazaar.launchpad.net/~lifeless/bzr/interrepository_register_fix
Robert Collins
robertc at robertcollins.net
Fri Aug 14 04:55:06 BST 2009
At http://bazaar.launchpad.net/~lifeless/bzr/interrepository_register_fix
------------------------------------------------------------
revno: 4607
revision-id: robertc at robertcollins.net-20090814035501-xgcvyyl6aea7uxhc
parent: pqm at pqm.ubuntu.com-20090814002017-l0qxa8jj76sige97
committer: Robert Collins <robertc at robertcollins.net>
branch nick: interrepository_register_fix
timestamp: Fri 2009-08-14 13:55:01 +1000
message:
Prepare test_repository's inter_repository tests for 2a.
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2009-08-12 22:28:28 +0000
+++ b/bzrlib/repository.py 2009-08-14 03:55:01 +0000
@@ -3020,6 +3020,8 @@
# help), and for fetching when data won't have come from the same
# compressor.
pack_compresses = False
+ # Does the repository inventory storage understand references to trees?
+ supports_tree_reference = None
def __str__(self):
return "<%s>" % self.__class__.__name__
=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py 2009-06-29 15:07:51 +0000
+++ b/bzrlib/tests/test_repository.py 2009-08-14 03:55:01 +0000
@@ -486,6 +486,8 @@
_serializer = None
def supports_rich_root(self):
+ if self._format is not None:
+ return self._format.rich_root_data
return False
def get_graph(self):
@@ -542,11 +544,17 @@
# pair that it returns true on for the is_compatible static method
# check
dummy_a = DummyRepository()
+ dummy_a._format = RepositoryFormat()
dummy_b = DummyRepository()
+ dummy_b._format = RepositoryFormat()
repo = self.make_repository('.')
# hack dummies to look like repo somewhat.
dummy_a._serializer = repo._serializer
+ dummy_a._format.supports_tree_reference = repo._format.supports_tree_reference
+ dummy_a._format.rich_root_data = repo._format.rich_root_data
dummy_b._serializer = repo._serializer
+ dummy_b._format.supports_tree_reference = repo._format.supports_tree_reference
+ dummy_b._format.rich_root_data = repo._format.rich_root_data
repository.InterRepository.register_optimiser(InterDummy)
try:
# we should get the default for something InterDummy returns False
More information about the bazaar-commits
mailing list