~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-02 12:39:18 UTC
  • mfrom: (6449.5.7 ,branch=pending)
  • Revision ID: pqm@pqm.ubuntu.com-20120202123918-18gyztydwlr8jys6
(jelmer) Use config stacks for 'mail_client' configuration option. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
    lazy_regex,
93
93
    library_state,
94
94
    lockdir,
95
 
    mail_client,
96
95
    mergetools,
97
96
    osutils,
98
97
    symbol_versioning,
240
239
        return diff.DiffFromTool.from_string(cmd, old_tree, new_tree,
241
240
                                             sys.stdout)
242
241
 
243
 
    def get_mail_client(self):
244
 
        """Get a mail client to use"""
245
 
        selected_client = self.get_user_option('mail_client')
246
 
        _registry = mail_client.mail_client_registry
247
 
        try:
248
 
            mail_client_class = _registry.get(selected_client)
249
 
        except KeyError:
250
 
            raise errors.UnknownMailClient(selected_client)
251
 
        return mail_client_class(self)
252
 
 
253
242
    def _get_signature_checking(self):
254
243
        """Template method to override signature checking policy."""
255
244
 
2803
2792
Standard log formats are ``long``, ``short`` and ``line``. Additional formats
2804
2793
may be provided by plugins.
2805
2794
'''))
 
2795
option_registry.register_lazy('mail_client', 'bzrlib.mail_client',
 
2796
    'opt_mail_client')
2806
2797
option_registry.register(
2807
2798
    Option('output_encoding',
2808
2799
           help= 'Unicode encoding for output'