Rev 2184: Merge repository format attribute cleanup. in http://bazaar.launchpad.net/~bzr/bzr/hpss

Robert Collins robertc at robertcollins.net
Thu Mar 29 03:00:07 BST 2007


At http://bazaar.launchpad.net/~bzr/bzr/hpss

------------------------------------------------------------
revno: 2184
revision-id: robertc at robertcollins.net-20070329015852-akojjr51k9273rp7
parent: robertc at robertcollins.net-20070328225443-lqmj3q8wwkz5kztu
parent: robertc at robertcollins.net-20070329013644-wajruf79j3we0iu8
committer: Robert Collins <robertc at robertcollins.net>
branch nick: hpss
timestamp: Thu 2007-03-29 11:58:52 +1000
message:
  Merge repository format attribute cleanup.
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
    ------------------------------------------------------------
    revno: 2018.1.2.1.50.2.80.1.99.1.9.1.21.1.26.2.74.2.2.1.1
    merged: 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 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-13 06:55:43 +0000
+++ b/bzrlib/repository.py	2007-03-29 01:58:52 +0000
@@ -1234,6 +1234,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-28 22:54:43 +0000
+++ b/bzrlib/tests/repository_implementations/test_repository.py	2007-03-29 01:58:52 +0000
@@ -451,6 +451,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 TestRepositoryLocking(TestCaseWithRepository):
 



More information about the bazaar-commits mailing list