Rev 5780: Merge config-concrete-stores into config-section-matchers resolving conflicts in file:///home/vila/src/bzr/experimental/config/

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue May 3 09:26:26 UTC 2011


At file:///home/vila/src/bzr/experimental/config/

------------------------------------------------------------
revno: 5780
revision-id: v.ladeuil+lp at free.fr-20110503092626-h2tq1iumx818mhg8
parent: v.ladeuil+lp at free.fr-20110503092355-gf6680de3g7607m1
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: config-section-matchers
timestamp: Tue 2011-05-03 11:26:26 +0200
message:
  Merge config-concrete-stores into config-section-matchers resolving conflicts
-------------- next part --------------
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py	2011-05-03 09:23:55 +0000
+++ b/bzrlib/config.py	2011-05-03 09:26:26 +0000
@@ -2387,7 +2387,7 @@
         raise NotImplementedError(self.match)
 
 
-class LocationSection(ReadOnlySection):
+class LocationSection(Section):
 
     def __init__(self, section, length, extra_path):
         super(LocationSection, self).__init__(section.id, section.options)

=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py	2011-05-03 09:23:55 +0000
+++ b/bzrlib/tests/test_config.py	2011-05-03 09:26:26 +0000
@@ -2116,7 +2116,7 @@
     scenarios = [('location', {'matcher': config.LocationMatcher})]
 
     def get_store(self, file_name):
-        return config.ConfigObjStore(self.get_readonly_transport(), file_name)
+        return config.IniFileStore(self.get_readonly_transport(), file_name)
 
     def test_no_matches_for_empty_stores(self):
         store = self.get_store('foo.conf')
@@ -2127,13 +2127,13 @@
     def test_build_doesnt_load_store(self):
         store = self.get_store('foo.conf')
         matcher = self.matcher(store, '/bar')
-        self.assertFalse(store.loaded)
+        self.assertFalse(store.is_loaded())
 
 
 class TestLocationSection(tests.TestCase):
 
     def get_section(self, options, extra_path):
-        section = config.ReadOnlySection('foo', options)
+        section = config.Section('foo', options)
         # We don't care about the length so we use '0'
         return config.LocationSection(section, 0, extra_path)
 
@@ -2156,7 +2156,7 @@
 class TestLocationMatcher(TestStore):
 
     def get_store(self, file_name):
-        return config.ConfigObjStore(self.get_readonly_transport(), file_name)
+        return config.IniFileStore(self.get_readonly_transport(), file_name)
 
     def test_more_specific_sections_first(self):
         store = self.get_store('foo.conf')



More information about the bazaar-commits mailing list