Rev 5774: Merge config-section-matchers into config-stack in file:///home/vila/src/bzr/experimental/config/

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


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

------------------------------------------------------------
revno: 5774 [merge]
revision-id: v.ladeuil+lp at free.fr-20110503092710-no2zgr4n0baqmt1a
parent: v.ladeuil+lp at free.fr-20110503092356-38ew7b91924eqc7j
parent: v.ladeuil+lp at free.fr-20110503092626-h2tq1iumx818mhg8
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: config-stack
timestamp: Tue 2011-05-03 11:27:10 +0200
message:
  Merge config-section-matchers into config-stack
modified:
  bzrlib/config.py               config.py-20051011043216-070c74f4e9e338e8
  bzrlib/tests/test_config.py    testconfig.py-20051011041908-742d0c15d8d8c8eb
-------------- next part --------------
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py	2011-05-03 09:23:56 +0000
+++ b/bzrlib/config.py	2011-05-03 09:27:10 +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:56 +0000
+++ b/bzrlib/tests/test_config.py	2011-05-03 09:27:10 +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