Rev 5772: Add doc for the section matchers. in file:///home/vila/src/bzr/experimental/config/

Vincent Ladeuil v.ladeuil+lp at
Fri Apr 8 16:13:23 UTC 2011

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

revno: 5772
revision-id: v.ladeuil+lp at
parent: v.ladeuil+lp at
committer: Vincent Ladeuil <v.ladeuil+lp at>
branch nick: config-section-matchers
timestamp: Fri 2011-04-08 18:13:23 +0200
  Add doc for the section matchers.
-------------- next part --------------
=== modified file 'bzrlib/'
--- a/bzrlib/	2011-04-08 16:05:49 +0000
+++ b/bzrlib/	2011-04-08 16:13:23 +0000
@@ -2341,7 +2341,7 @@ = store
     def get_sections(self):
-        # This is where we requires loading the store so we can see all defined
+        # This is where we require loading the store so we can see all defined
         # sections.
         sections =
         # Walk the revisions in the order provided

=== modified file 'doc/developers/configuration.txt'
--- a/doc/developers/configuration.txt	2011-04-08 15:59:11 +0000
+++ b/doc/developers/configuration.txt	2011-04-08 16:13:23 +0000
@@ -48,3 +48,21 @@
 basis for new classes which only need to register themselves in the right
 places to inherit from the existing basic tests and add their own specific
+Filtering sections
+For some contexts, only some sections from a given store will apply. Defining
+which is what the ``SectionMatcher`` are about.
+The main constraint here is that a ``SectionMatcher`` should delay the loading
+of the associated store as long as possible. The constructor should collect
+all data needed for the selection and uses it while processing the sections in
+Only ``ReadOnlySection`` objects are manipulated here but a ``SectionMatcher``
+can return dedicated ``Section`` to provide additional context (the
+``LocationSection`` add an ``extra_path`` attribute to implement the
+``appendpath`` policy for example).
+.. FIXME: Replace the appendpath example if/when it's deprecated ;)

More information about the bazaar-commits mailing list