SyntaxError in plugin with lazy-registered command causes crash on "bzr help hidden-commands"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
First, some info on my installation:
*******
Tonys-MacBook-
Bazaar (bzr) 2.2.0
Python interpreter: /usr/bin/python 2.6.1
Python standard library: /System/
Platform: Darwin-
bzrlib: /Library/
Bazaar configuration: /Users/
Bazaar log file: /Users/
Copyright 2005-2010 Canonical Ltd.
http://
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
Bazaar is part of the GNU Project to produce a free operating system.
*******
Tonys-MacBook-
/Library/
*******
Tonys-MacBook-
Python 2.7
*******
Running OS X Snow Leopard (10.6.4) on 64-bit architecture.
*******
I see that Bazaar is using an older version of Python on my system. Not sure what to think about that.
So there are a couple of commands that will actually result in a very similar error, but I put "help hidden-commands" in the Summary line of this bug because that's the command whose traceback I posted below.
Here it is:
*******
Tonys-MacBook-
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/Library/
return the_callable(*args, **kwargs)
File "/Library/
ret = run(*run_argv)
File "/Library/
return self.run(
File "/Library/
return self._operation
File "/Library/
self.cleanups, self.func, *args, **kwargs)
File "/Library/
result = func(*args, **kwargs)
File "/Library/
result = func(*args, **kwargs)
File "/Library/
bzrlib.
File "/Library/
outfile.
File "/Library/
result = topic_registry.
File "/Library/
return obj(topic)
File "/Library/
shown_commands = [(n, o) for n, o in commands if o.hidden == hidden]
File "/Library/
commands = ((n, _mod_commands.
File "/Library/
return _get_cmd_
File "/Library/
cmd = hook(cmd, cmd_name)
File "/Library/
return plugin_
File "/Library/
return registry.
File "/Library/
return self._dict[
File "/Library/
self.
File "/Library/
obj = __import_
File "/Users/
from bzrlib.
File "/Users/
<<<<<<< TREE
^
SyntaxError: invalid syntax
bzr 2.2.0 on python 2.6.1 (Darwin-
arguments: ['/usr/
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
bash_completion /Library/
bzrtools /Library/
colo /Library/
email /Library/
explorer /Library/
extmerge /Library/
fastimport /Library/
keychain /Users/
launchpad /Library/
log_rss /Users/
loom /Library/
netrc_
news_merge /Library/
pipeline /Library/
plugin_info /Users/
push_and_update /Users/
qbzr /Library/
rewrite /Library/
stats /Users/
svn /Library/
upload /Library/
xmloutput /Library/
*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https:/
including this traceback and a description of the problem.
*******
description: | updated |
tags: | removed: bazaar bzr osx python |
tags: | added: help plugin |
So the immediate cause here is the plugin_info plugin you have installed in ~/.bazaar/plugins is broken, the .py file has a syntax error due to a "<<<<<<<" conflict marker.
So removing or fixing that plugin, or running with --no-plugins, would fix this for you.
bzr itself should cope better when a lazy-registered command from a plugin fails to load for whatever reason though, so this is also a valid bug in bzr.