/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: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
    state.plugins = {}
77
77
 
78
78
 
79
 
def load_plugins(path=None, state=None):
 
79
def load_plugins(path=None, state=None, warn_load_problems=True):
80
80
    """Load breezy plugins.
81
81
 
82
82
    The environment variable BRZ_PLUGIN_PATH is considered a delimited
103
103
    if (None, 'entrypoints') in _env_plugin_path():
104
104
        _load_plugins_from_entrypoints(state)
105
105
    state.plugins = plugins()
 
106
    if warn_load_problems:
 
107
        for plugin, errors in state.plugin_warnings.items():
 
108
            for error in errors:
 
109
                trace.warning('%s', error)
106
110
 
107
111
 
108
112
def _load_plugins_from_entrypoints(state):
189
193
def _env_disable_plugins(key='BRZ_DISABLE_PLUGINS'):
190
194
    """Gives list of names for plugins to disable from environ key."""
191
195
    disabled_names = []
192
 
    env = osutils.path_from_environ(key)
 
196
    env = os.environ.get(key)
193
197
    if env:
194
198
        for name in env.split(os.pathsep):
195
199
            name = _expect_identifier(name, key, env)
201
205
def _env_plugins_at(key='BRZ_PLUGINS_AT'):
202
206
    """Gives list of names and paths of specific plugins from environ key."""
203
207
    plugin_details = []
204
 
    env = osutils.path_from_environ(key)
 
208
    env = os.environ.get(key)
205
209
    if env:
206
210
        for pair in env.split(os.pathsep):
207
211
            if '@' in pair:
222
226
    'path', or None and one of the values 'user', 'core', 'entrypoints', 'site'.
223
227
    """
224
228
    path_details = []
225
 
    env = osutils.path_from_environ(key)
 
229
    env = os.environ.get(key)
226
230
    defaults = {
227
231
        "user": not env,
228
232
        "core": True,