Rev 3435: (James Westby) -Derror will show the traceback when a plugin fails to in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon May 19 22:27:46 BST 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3435
revision-id:pqm at pqm.ubuntu.com-20080519212735-kzpy4bvzd76o2c2x
parent: pqm at pqm.ubuntu.com-20080519185645-whhuax9pml5sebk5
parent: john at arbash-meinel.com-20080519162736-5ihzl2do91aywb6x
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2008-05-19 22:27:35 +0100
message:
(James Westby) -Derror will show the traceback when a plugin fails to
load
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
------------------------------------------------------------
revno: 3427.2.4
revision-id:john at arbash-meinel.com-20080519162736-5ihzl2do91aywb6x
parent: john at arbash-meinel.com-20080519161700-doxcogvsyu7xypd6
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Mon 2008-05-19 11:27:36 -0500
message:
NEWS entry for -Derror and plugins
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
------------------------------------------------------------
revno: 3427.2.3
revision-id:john at arbash-meinel.com-20080519161700-doxcogvsyu7xypd6
parent: jw+debian at jameswestby.net-20080515172412-elgcslbbj24tp9z5
parent: pqm at pqm.ubuntu.com-20080519125348-0cj2omrjvzlh88xy
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Mon 2008-05-19 11:17:00 -0500
message:
merge latest bzr.dev
added:
bzrlib/smart/message.py message.py-20080222013625-ncqmh3nrxjkxab87-1
doc/es/ es-20080504181154-x2fm3oprvjohiz7n-1
doc/es/guia-desarrollador/ guiadesarrollador-20080504181514-qlh50dq1mj769bic-1
doc/es/guia-usuario/ guiausuario-20080504181514-qlh50dq1mj769bic-2
doc/es/guia-usuario/index.txt index.txt-20080512005856-hgdxkh9xo58n7zdp-2
doc/es/guia-usuario/resolving_conflicts.txt conflicts.txt-20080504181626-aqnzjwfhpju5ypfe-1
doc/es/guia-usuario/version_info.txt version_info.txt-20080504181730-u24nugzokrcrk1bf-1
doc/es/mini-tutorial/ minitutorial-20080504181514-qlh50dq1mj769bic-3
doc/es/mini-tutorial/index.txt index.txt-20080504182136-wmoc35u2t6kom8ca-1
doc/es/notas-version/ notasversion-20080504181514-qlh50dq1mj769bic-4
doc/es/referencia/ referencia-20080504181514-qlh50dq1mj769bic-5
doc/es/referencia-rapida/ referenciarapida-20080504181514-qlh50dq1mj769bic-6
doc/es/referencia-rapida/Makefile makefile-20080506002609-y60mr4avuqwzlf4s-1
doc/es/referencia-rapida/referencia-rapida.svg referenciarapida.svg-20080506002609-y60mr4avuqwzlf4s-2
doc/index.es.txt index.es.txt-20080506002113-aunzdhptcoc0h6hm-1
modified:
Makefile Makefile-20050805140406-d96e3498bb61c5bb
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/smart/protocol.py protocol.py-20061108035435-ot0lstk2590yqhzr-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/symbol_versioning.py symbol_versioning.py-20060105104851-9ecf8af605d15a80
bzrlib/tests/http_utils.py HTTPTestUtil.py-20050914180604-247d3aafb7a43343
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
bzrlib/transport/http/__init__.py http_transport.py-20050711212304-506c5fd1059ace96
bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
bzrlib/transport/http/wsgi.py wsgi.py-20061005091552-rz8pva0olkxv0sd8-2
bzrlib/transport/remote.py ssh.py-20060608202016-c25gvf1ob7ypbus6-1
doc/developers/network-protocol.txt networkprotocol.txt-20070903044232-woustorrjbmg5zol-1
doc/en/user-guide/bug_trackers.txt bug_trackers.txt-20070713223459-khxdlcudraii95uv-1
doc/en/user-guide/bzrtools_plugin.txt bzrtools_plugin.txt-20080509065016-cjc90f46407vi9a0-1
doc/en/user-guide/index.txt index.txt-20060622101119-tgwtdci8z769bjb9-2
doc/en/user-guide/part2_intro.txt best_practice_intro.-20071123154453-dk2mjhrg1vpjm5w2-1
doc/en/user-guide/svn_plugin.txt svn_plugin.txt-20080509065016-cjc90f46407vi9a0-2
doc/en/user-guide/web_browsing.txt web_browsing.txt-20080509065016-cjc90f46407vi9a0-3
doc/index.txt index.txt-20070813101924-07gd9i9d2jt124bf-1
------------------------------------------------------------
revno: 3427.2.2
revision-id:jw+debian at jameswestby.net-20080515172412-elgcslbbj24tp9z5
parent: jw+debian at jameswestby.net-20080515163539-820fx3349404nq7i
committer: James Westby <jw+debian at jameswestby.net>
branch nick: bzr.dev
timestamp: Thu 2008-05-15 18:24:12 +0100
message:
Just print the exception, keeping the API of log_exception_quietly the same.
This also means that -Derror doesn't tell the user to report everything to
launchpad.
modified:
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
------------------------------------------------------------
revno: 3427.2.1
revision-id:jw+debian at jameswestby.net-20080515163539-820fx3349404nq7i
parent: pqm at pqm.ubuntu.com-20080512115743-6uz3lnmrrbhmoiqe
committer: James Westby <jw+debian at jameswestby.net>
branch nick: bzr.dev
timestamp: Thu 2008-05-15 17:35:39 +0100
message:
Allow -Derror to show exceptions caused by plugin import errors.
modified:
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
=== modified file 'NEWS'
--- a/NEWS 2008-05-19 18:56:45 +0000
+++ b/NEWS 2008-05-19 21:27:35 +0000
@@ -17,6 +17,9 @@
FEATURES:
+ * Adding ``-Derror`` will now display a traceback when a plugin fails to
+ load. (James Westby)
+
* There is a new version of the network protocol used for bzr://, bzr+ssh://
and bzr+http:// connections. This will allow more efficient requests and
responses, and more graceful fallback when a server is too old to
=== modified file 'bzrlib/plugin.py'
--- a/bzrlib/plugin.py 2008-04-06 08:36:27 +0000
+++ b/bzrlib/plugin.py 2008-05-15 17:24:12 +0000
@@ -41,7 +41,9 @@
from bzrlib import (
config,
+ debug,
osutils,
+ trace,
)
from bzrlib import plugins as _mod_plugins
""")
@@ -220,6 +222,8 @@
else:
warning('Unable to load plugin %r from %r' % (name, d))
log_exception_quietly()
+ if 'error' in debug.debug_flags:
+ trace.print_exception(sys.exc_info(), sys.stderr)
@deprecated_function(one_three)
@@ -299,6 +303,8 @@
warning('Unable to load plugin %r from %r'
% (name, zip_name))
log_exception_quietly()
+ if 'error' in debug.debug_flags:
+ trace.print_exception(sys.exc_info(), sys.stderr)
def plugins():
=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py 2008-04-24 07:22:53 +0000
+++ b/bzrlib/trace.py 2008-05-15 17:24:12 +0000
@@ -414,6 +414,14 @@
return errors.EXIT_INTERNAL_ERROR
+def print_exception(exc_info, err_file):
+ exc_type, exc_object, exc_tb = exc_info
+ err_file.write("bzr: ERROR: %s.%s: %s\n" % (
+ exc_type.__module__, exc_type.__name__, exc_object))
+ err_file.write('\n')
+ traceback.print_exception(exc_type, exc_object, exc_tb, file=err_file)
+
+
# TODO: Should these be specially encoding the output?
def report_user_error(exc_info, err_file):
"""Report to err_file an error that's not an internal error.
@@ -421,18 +429,14 @@
These don't get a traceback unless -Derror was given.
"""
if 'error' in debug.debug_flags:
- report_bug(exc_info, err_file)
+ print_exception(exc_info, err_file)
return
err_file.write("bzr: ERROR: %s\n" % (exc_info[1],))
def report_bug(exc_info, err_file):
"""Report an exception that probably indicates a bug in bzr"""
- exc_type, exc_object, exc_tb = exc_info
- err_file.write("bzr: ERROR: %s.%s: %s\n" % (
- exc_type.__module__, exc_type.__name__, exc_object))
- err_file.write('\n')
- traceback.print_exception(exc_type, exc_object, exc_tb, file=err_file)
+ print_exception(exc_info, err_file)
err_file.write('\n')
err_file.write('bzr %s on python %s (%s)\n' % \
(bzrlib.__version__,
More information about the bazaar-commits
mailing list