~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/configuration.txt

  • Committer: Martin von Gagern
  • Date: 2011-06-01 12:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6009.
  • Revision ID: martin.vgagern@gmx.net-20110601125356-lwozv2vecea6hxfz
Change from no_decorate to classify as name for the argument.

The command line switch remains as --no-classify, to keep backwards
compatibility.  Users are free to include --no-classify in an alias, and
still use --classify to change back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
* a name: a valid python identifier (even if it's not used as an
7
7
  identifier in python itself)
8
8
 
9
 
* a value: a unicode string or a list of unicode strings.
 
9
* a value: a unicode string
10
10
 
11
11
Option
12
12
------
19
19
* default: the default value that Stack.get() should return if no
20
20
  value can be found for the option.
21
21
 
22
 
* default_from_env: a list of environment variables. The first variable set
23
 
  will provide a default value overriding 'default' which remains the
24
 
  default value if *no* environment variable is set.
25
 
 
26
 
* help: a doc string describing the option, the first line should be a
27
 
  summary and can be followed by a blank line and a more detailed
28
 
  explanation.
29
 
 
30
 
* from_unicode: a callable accepting a unicode string and returning a
31
 
  suitable value for the option. If the string cannot be coerced it should
32
 
  return None.
33
 
 
34
 
* invalid: the action to be taken when an invalid value is encountered in a
35
 
  store (during a Stack.get()).
 
22
Since plugins should be able to lazily register options, the associated help
 
23
is not part of the object but provided at registration time.
36
24
 
37
25
Sections
38
26
--------
86
74
all data needed for the selection and uses it while processing the sections in
87
75
``get_sections``.
88
76
 
89
 
Only ``ReadOnlySection`` objects are manipulated here but a
90
 
``SectionMatcher`` can return dedicated ``Section`` objects to provide
91
 
additional context (the ``LocationSection`` add an ``extra_path`` attribute
92
 
to implement the ``appendpath`` policy for example). If no sections match,
93
 
an empty list is returned.
 
77
Only ``ReadOnlySection`` objects are manipulated here but a ``SectionMatcher``
 
78
can return dedicated ``Section`` to provide additional context (the
 
79
``LocationSection`` add an ``extra_path`` attribute to implement the
 
80
``appendpath`` policy for example).
94
81
 
95
82
.. FIXME: Replace the appendpath example if/when it's deprecated ;)
96
83
 
97
 
Specific section matchers can be implemented by overriding ``get_sections``
98
 
or just ``match``.
99
 
 
100
 
``bzrlib`` provides:
101
 
 
102
 
* ``LocationMatcher(store, location)``: To select all sections that match
103
 
  ``location``.
104
 
 
105
 
* ``NameMatcher(store, unique_id)``: To select a single section matching
106
 
  ``unique_id``.
107
 
 
108
84
Stacks
109
85
------
110
86