/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-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
 
180
180
def get_core_plugin_path():
181
181
    core_path = None
182
 
    bzr_exe = bool(getattr(sys, 'frozen', None))
183
 
    if bzr_exe:    # expand path for bzr.exe
 
182
    brz_exe = bool(getattr(sys, 'frozen', None))
 
183
    if brz_exe:    # expand path for brz.exe
184
184
        # We need to use relative path to system-wide plugin
185
 
        # directory because breezy from standalone bzr.exe
 
185
        # directory because breezy from standalone brz.exe
186
186
        # could be imported by another standalone program
187
187
        # (e.g. bzr-config; or TortoiseBzr/Olive if/when they
188
188
        # will become standalone exe). [bialix 20071123]
225
225
    # Ad-Hoc default: core is not overriden by site but user can overrides both
226
226
    # The rationale is that:
227
227
    # - 'site' comes last, because these plugins should always be available and
228
 
    #   are supposed to be in sync with the bzr installed on site.
229
 
    # - 'core' comes before 'site' so that running bzr from sources or a user
 
228
    #   are supposed to be in sync with the brz installed on site.
 
229
    # - 'core' comes before 'site' so that running brz from sources or a user
230
230
    #   installed version overrides the site version.
231
231
    # - 'user' comes first, because... user is always right.
232
232
    # - the above rules clearly defines which plugin version will be loaded if
393
393
        trace.warning("%s" % e)
394
394
        if re.search('\.|-| ', name):
395
395
            sanitised_name = re.sub('[-. ]', '_', name)
396
 
            if sanitised_name.startswith('bzr_'):
397
 
                sanitised_name = sanitised_name[len('bzr_'):]
 
396
            if sanitised_name.startswith('brz_'):
 
397
                sanitised_name = sanitised_name[len('brz_'):]
398
398
            trace.warning("Unable to load %r in %r as a plugin because the "
399
399
                    "file path isn't a valid module name; try renaming "
400
400
                    "it to %r." % (name, dir, sanitised_name))
600
600
 
601
601
 
602
602
class _PluginImporter(object):
603
 
    """An importer tailored to bzr specific needs.
 
603
    """An importer tailored to brz specific needs.
604
604
 
605
605
    This is a singleton that takes care of:
606
606
    - disabled plugins specified in 'blacklist',