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

  • Committer: Andrew Bennetts
  • Date: 2008-04-02 00:14:00 UTC
  • mfrom: (3324 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3756.
  • Revision ID: andrew.bennetts@canonical.com-20080402001400-r1pqse38i03dl97w
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
            ## import pdb; pdb.set_trace()
200
200
            if re.search('\.|-| ', name):
201
201
                sanitised_name = re.sub('[-. ]', '_', name)
202
 
                trace.warning("Unable to load %r in %r as a plugin because file path"
203
 
                        " isn't a valid module name; try renaming it to %r."
204
 
                        % (name, d, sanitised_name))
 
202
                if sanitised_name.startswith('bzr_'):
 
203
                    sanitised_name = sanitised_name[len('bzr_'):]
 
204
                trace.warning("Unable to load %r in %r as a plugin because the "
 
205
                        "file path isn't a valid module name; try renaming "
 
206
                        "it to %r." % (name, d, sanitised_name))
205
207
            else:
206
208
                trace.warning('Unable to load plugin %r from %r' % (name, d))
207
209
            trace.log_exception_quietly()