BzrCommandError: unknown command "revert"

Bug #662763 reported by Romain Chalumeau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar All Docs Website
Fix Released
Undecided
Unassigned

Bug Description

Hello,

testing the generation of the doc for plugins, i got this issue :

$> scripts/document-plugin.py ALL

creating plugins/en/launchpad-plugin.txt ...
Traceback (most recent call last):
  File "scripts/document-plugin.py", line 357, in <module>
    build_help_for_plugin(plugin_object, outf)
  File "scripts/document-plugin.py", line 65, in build_help_for_plugin
    for cmd_object in get_commands_for_plugin(plugin):
  File "scripts/document-plugin.py", line 205, in get_commands_for_plugin
    shown_commands = [(n, o) for n, o in commands if not o.hidden]
  File "scripts/document-plugin.py", line 204, in <genexpr>
    commands = ((n, mod_commands.get_cmd_object(n)) for n in names)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 240, in get_cmd_object
    return _get_cmd_object(cmd_name, plugins_override)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 262, in _get_cmd_object
    cmd = hook(cmd, cmd_name)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 332, in _get_plugin_command
    return plugin_cmds.get(cmd_name)()
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 90, in get
    return registry.Registry.get(self, real_name)
  File "/usr/lib/python2.6/dist-packages/bzrlib/registry.py", line 173, in get
    return self._dict[self._get_key_or_default(key)].get_obj()
  File "/usr/lib/python2.6/dist-packages/bzrlib/registry.py", line 61, in get_obj
    self._do_import()
  File "/usr/lib/python2.6/dist-packages/bzrlib/registry.py", line 70, in _do_import
    obj = __import__(self._module_name, globals(), locals(), names)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/commands.py", line 301, in <module>
    class cmd_qrevert(QBzrCommand):
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/commands.py", line 304, in cmd_qrevert
    takes_options = [ui_mode_option, bzr_option('revert', 'no-backup')]
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/commands.py", line 215, in bzr_option
    cmd=get_cmd_object(cmd_name, False)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 242, in get_cmd_object
    raise errors.BzrCommandError('unknown command "%s"' % cmd_name)
bzrlib.errors.BzrCommandError: unknown command "revert"

'revert' appears with the command :
$>bzr help commands

My environment :
Bazaar (bzr) 2.2.0
  Python interpreter: /usr/bin/python 2.6.6
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.35-22-generic-i686-with-Ubuntu-10.10-maverick
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib

bzr-alldocs revno: 49

Rgds/Romain

Revision history for this message
Martin Pool (mbp) wrote :

I suspect this is because it needs to call the new bzrlib.initialize(); could you try adding that?

Revision history for this message
Romain Chalumeau (rom1-chal) wrote :

Hi,

it's okay, i haven't anymore this exception.
Here is my patch if needed.

Thx
Romain

Jelmer Vernooij (jelmer)
Changed in bzr-alldocs:
status: New → In Progress
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This was already merged.

Changed in bzr-alldocs:
assignee: Jelmer Vernooij (jelmer) → nobody
status: In Progress → Fix Released
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.