/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/config.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
import os
78
78
import sys
79
79
 
80
 
import brzlib
81
 
from brzlib.decorators import needs_write_lock
82
 
from brzlib.lazy_import import lazy_import
 
80
import breezy
 
81
from breezy.decorators import needs_write_lock
 
82
from breezy.lazy_import import lazy_import
83
83
lazy_import(globals(), """
84
84
import base64
85
85
import fnmatch
86
86
import re
87
87
 
88
 
from brzlib import (
 
88
from breezy import (
89
89
    atomicfile,
90
90
    controldir,
91
91
    debug,
103
103
    urlutils,
104
104
    win32utils,
105
105
    )
106
 
from brzlib.i18n import gettext
107
 
from brzlib.util.configobj import configobj
 
106
from breezy.i18n import gettext
 
107
from breezy.util.configobj import configobj
108
108
""")
109
 
from brzlib import (
 
109
from breezy import (
110
110
    commands,
111
111
    hooks,
112
112
    lazy_regex,
113
113
    registry,
114
114
    )
115
 
from brzlib.symbol_versioning import (
 
115
from breezy.symbol_versioning import (
116
116
    deprecated_in,
117
117
    deprecated_method,
118
118
    )
208
208
        raise NotImplementedError(self.config_id)
209
209
 
210
210
    def get_change_editor(self, old_tree, new_tree):
211
 
        from brzlib import diff
 
211
        from breezy import diff
212
212
        cmd = self._get_change_editor()
213
213
        if cmd is None:
214
214
            return None
636
636
        These are all empty initially, because by default nothing should get
637
637
        notified.
638
638
        """
639
 
        super(_ConfigHooks, self).__init__('brzlib.config', 'ConfigHooks')
 
639
        super(_ConfigHooks, self).__init__('breezy.config', 'ConfigHooks')
640
640
        self.add_hook('load',
641
641
                      'Invoked when a config store is loaded.'
642
642
                      ' The signature is (store).',
671
671
        These are all empty initially, because by default nothing should get
672
672
        notified.
673
673
        """
674
 
        super(_OldConfigHooks, self).__init__('brzlib.config', 'OldConfigHooks')
 
674
        super(_OldConfigHooks, self).__init__('breezy.config', 'OldConfigHooks')
675
675
        self.add_hook('load',
676
676
                      'Invoked when a config store is loaded.'
677
677
                      ' The signature is (config).',
2455
2455
 
2456
2456
    def get_help_text(self, additional_see_also=None, plain=True):
2457
2457
        result = self.help
2458
 
        from brzlib import help_topics
 
2458
        from breezy import help_topics
2459
2459
        result += help_topics._format_see_also(additional_see_also)
2460
2460
        if plain:
2461
2461
            result = help_topics.help_as_plain_text(result)
2706
2706
Whether revisions associated with tags should be fetched.
2707
2707
"""))
2708
2708
option_registry.register_lazy(
2709
 
    'bzr.transform.orphan_policy', 'brzlib.transform', 'opt_transform_orphan')
 
2709
    'bzr.transform.orphan_policy', 'breezy.transform', 'opt_transform_orphan')
2710
2710
option_registry.register(
2711
2711
    Option('bzr.workingtree.worth_saving_limit', default=10,
2712
2712
           from_unicode=int_from_store,  invalid='warning',
2836
2836
Standard log formats are ``long``, ``short`` and ``line``. Additional formats
2837
2837
may be provided by plugins.
2838
2838
'''))
2839
 
option_registry.register_lazy('mail_client', 'brzlib.mail_client',
 
2839
option_registry.register_lazy('mail_client', 'breezy.mail_client',
2840
2840
    'opt_mail_client')
2841
2841
option_registry.register(
2842
2842
    Option('output_encoding',
2860
2860
 
2861
2861
Each function takes branch, rev_id as parameters.
2862
2862
'''))
2863
 
option_registry.register_lazy('progress_bar', 'brzlib.ui.text',
 
2863
option_registry.register_lazy('progress_bar', 'breezy.ui.text',
2864
2864
                              'opt_progress_bar')
2865
2865
option_registry.register(
2866
2866
    Option('public_branch',
2899
2899
lost if the machine crashes.  See also dirstate.fdatasync.
2900
2900
'''))
2901
2901
option_registry.register_lazy('smtp_server',
2902
 
    'brzlib.smtp_connection', 'smtp_server')
 
2902
    'breezy.smtp_connection', 'smtp_server')
2903
2903
option_registry.register_lazy('smtp_password',
2904
 
    'brzlib.smtp_connection', 'smtp_password')
 
2904
    'breezy.smtp_connection', 'smtp_password')
2905
2905
option_registry.register_lazy('smtp_username',
2906
 
    'brzlib.smtp_connection', 'smtp_username')
 
2906
    'breezy.smtp_connection', 'smtp_username')
2907
2907
option_registry.register(
2908
2908
    Option('selftest.timeout',
2909
2909
        default='600',
2951
2951
           from_unicode=bool_from_store, invalid='warning',
2952
2952
           help='''Whether to validate signatures in brz log.'''))
2953
2953
option_registry.register_lazy('ssl.ca_certs',
2954
 
    'brzlib.transport.http._urllib2_wrappers', 'opt_ssl_ca_certs')
 
2954
    'breezy.transport.http._urllib2_wrappers', 'opt_ssl_ca_certs')
2955
2955
 
2956
2956
option_registry.register_lazy('ssl.cert_reqs',
2957
 
    'brzlib.transport.http._urllib2_wrappers', 'opt_ssl_cert_reqs')
 
2957
    'breezy.transport.http._urllib2_wrappers', 'opt_ssl_cert_reqs')
2958
2958
 
2959
2959
 
2960
2960
class Section(object):
3878
3878
 
3879
3879
    def _get_overrides(self):
3880
3880
        # FIXME: Hack around library_state.initialize never called
3881
 
        if brzlib.global_state is not None:
3882
 
            return brzlib.global_state.cmdline_overrides.get_sections()
 
3881
        if breezy.global_state is not None:
 
3882
            return breezy.global_state.cmdline_overrides.get_sections()
3883
3883
        return []
3884
3884
 
3885
3885
    def get_shared_store(self, store, state=None):
3896
3896
            otherwise.
3897
3897
        """
3898
3898
        if state is None:
3899
 
            state = brzlib.global_state
 
3899
            state = breezy.global_state
3900
3900
        if state is None:
3901
3901
            global _shared_stores_at_exit_installed
3902
3902
            stores = _shared_stores
4301
4301
# themselves. The builder will receive a test instance and should return a
4302
4302
# ready-to-use store or stack.  Plugins that define new store/stacks can also
4303
4303
# register themselves here to be tested against the tests defined in
4304
 
# brzlib.tests.test_config. Note that the builder can be called multiple times
 
4304
# breezy.tests.test_config. Note that the builder can be called multiple times
4305
4305
# for the same test.
4306
4306
 
4307
4307
# The registered object should be a callable receiving a test instance