/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/plugin.py

  • Committer: Jelmer Vernooij
  • Date: 2017-08-26 19:06:32 UTC
  • mto: This revision was merged to the branch mainline in revision 6773.
  • Revision ID: jelmer@jelmer.uk-20170826190632-nmiqnyff6s4htneh
Use get_global_state>

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    :param state: The library state object that records loaded plugins.
76
76
    """
77
77
    if state is None:
78
 
        state = breezy.global_state
 
78
        state = breezy.get_global_state()
79
79
    state.plugins = {}
80
80
 
81
81
 
92
92
    :param state: The library state object that records loaded plugins.
93
93
    """
94
94
    if state is None:
95
 
        state = breezy.global_state
 
95
        state = breezy.get_global_state()
96
96
    if getattr(state, 'plugins', None) is not None:
97
97
        # People can make sure plugins are loaded, they just won't be twice
98
98
        return
332
332
    :returns: Iterator of text lines (including newlines.)
333
333
    """
334
334
    if state is None:
335
 
        state = breezy.global_state
 
335
        state = breezy.get_global_state()
336
336
    all_names = sorted(set(state.plugins).union(state.plugin_warnings))
337
337
    for name in all_names:
338
338
        if name in state.plugins:
445
445
    """Return a string holding a concise list of plugins and their version.
446
446
    """
447
447
    if state is None:
448
 
        state = breezy.global_state
 
448
        state = breezy.get_global_state()
449
449
    items = []
450
450
    for name, a_plugin in sorted(state.plugins.items()):
451
451
        items.append("%s[%s]" %