failure to lazy-load a plugin repository format should not be fatal

Bug #252479 reported by Martin Pool
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned
Breezy
Triaged
Low
Unassigned

Bug Description

If we fail to lazy-load something from a registry, we should possibly give a warning rather than a fatal error. In the case below this format is not relevant to the command I'm trying to run.

mbp@grace% bzr info
bbzr: ERROR: exceptions.ImportError: failed to load bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCRichRoot: No module named index2.btree_index

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 818, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 1049, in run
    verbose=noise_level, outfile=self.outf)
  File "/usr/lib/python2.5/site-packages/bzrlib/info.py", line 346, in show_bzrdir_info
    outfile)
  File "/usr/lib/python2.5/site-packages/bzrlib/info.py", line 361, in show_component_info
    format = describe_format(control, repository, branch, working)
  File "/usr/lib/python2.5/site-packages/bzrlib/info.py", line 449, in describe_format
    format = bzrdir.format_registry.make_bzrdir(key)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 2707, in make_bzrdir
    return self.get(key)()
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 2659, in helper
    bd.repository_format = _load(repository_format)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 2644, in _load
    raise ImportError('failed to load %s: %s' % (full_name, e))
ImportError: failed to load bzrlib.plugins.groupcompress.repofmt.RepositoryFormatPackGCRichRoot: No module named index2.btree_index

bzr 1.6b3 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'info']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_AU.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
  groupcompress /home/mbp/.bazaar/plugins/groupcompress [unknown]
  gtk /home/mbp/.bazaar/plugins/gtk [0.95.0dev1]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /home/mbp/.bazaar/plugins/loom [1.4.0dev0]
  pqm /home/mbp/.bazaar/plugins/pqm [1.3.0dev0]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Low
Revision history for this message
John A Meinel (jameinel) wrote :

I agree, though as these are development formats, I don't think it is critical to fix this yet.

Changed in bzr:
status: New → Triaged
Martin Pool (mbp)
Changed in bzr:
status: Triaged → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: added: format-infrastructure formats
removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.