Rev 2382: Ensure that all Repository formats declare their require attributes. (Robert Collins) in file:///home/robertc/source/baz/format-attributes/

Robert Collins robertc at robertcollins.net
Thu Mar 29 02:36:48 BST 2007


At file:///home/robertc/source/baz/format-attributes/

------------------------------------------------------------
revno: 2382
revision-id: robertc at robertcollins.net-20070329013644-wajruf79j3we0iu8
parent: pqm at pqm.ubuntu.com-20070328065822-999550a858a3ced3
committer: Robert Collins <robertc at robertcollins.net>
branch nick: format-attributes
timestamp: Thu 2007-03-29 11:36:44 +1000
message:
  Ensure that all Repository formats declare their require attributes. (Robert Collins)
modified:
  bzrlib/repofmt/knitrepo.py     knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
  bzrlib/repofmt/weaverepo.py    presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
  bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
=== modified file 'bzrlib/repofmt/knitrepo.py'
--- a/bzrlib/repofmt/knitrepo.py	2007-03-06 13:47:33 +0000
+++ b/bzrlib/repofmt/knitrepo.py	2007-03-29 01:36:44 +0000
@@ -42,7 +42,6 @@
 class KnitRepository(MetaDirRepository):
     """Knit format repository."""
 
-
     _serializer = xml5.serializer_v5
 
     def _warn_if_deprecated(self):

=== modified file 'bzrlib/repofmt/weaverepo.py'
--- a/bzrlib/repofmt/weaverepo.py	2007-02-12 06:35:46 +0000
+++ b/bzrlib/repofmt/weaverepo.py	2007-03-29 01:36:44 +0000
@@ -119,6 +119,7 @@
     """Base class for the pre split out repository formats."""
 
     rich_root_data = False
+    support_tree_reference = False
 
     def initialize(self, a_bzrdir, shared=False, _internal=False):
         """Create a weave repository.

=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2007-03-06 13:47:33 +0000
+++ b/bzrlib/repository.py	2007-03-29 01:36:44 +0000
@@ -1204,6 +1204,7 @@
     """Common base class for the new repositories using the metadir layout."""
 
     rich_root_data = False
+    support_tree_reference = False
     _matchingbzrdir = bzrdir.BzrDirMetaFormat1()
 
     def __init__(self):

=== modified file 'bzrlib/tests/repository_implementations/test_repository.py'
--- a/bzrlib/tests/repository_implementations/test_repository.py	2007-03-06 04:20:50 +0000
+++ b/bzrlib/tests/repository_implementations/test_repository.py	2007-03-29 01:36:44 +0000
@@ -416,6 +416,14 @@
                           allow_pointless=False)
         tree.commit('pointless', allow_pointless=True)
 
+    def test_format_attributes(self):
+        """All repository formats should have some basic attributes."""
+        # create a repository to get a real format instance, not the 
+        # template from the test suite parameterisation.
+        repo = self.make_repository('.')
+        repo._format.rich_root_data
+        repo._format.support_tree_reference
+
 
 class TestCaseWithComplexRepository(TestCaseWithRepository):
 



More information about the bazaar-commits mailing list