Rev 2844: Also include plugin path and version in traceback in http://sourcefrog.net/bzr/trivial

Martin Pool mbp at sourcefrog.net
Fri Sep 21 07:13:10 BST 2007


At http://sourcefrog.net/bzr/trivial

------------------------------------------------------------
revno: 2844
revision-id: mbp at sourcefrog.net-20070921061309-6uwzovw08llb2zdz
parent: mbp at sourcefrog.net-20070921030710-koafxqdakilf56t8
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: trivial
timestamp: Fri 2007-09-21 16:13:09 +1000
message:
  Also include plugin path and version in traceback
modified:
  bzrlib/tests/blackbox/test_exceptions.py test_exceptions.py-20060604211237-yi2cxg0ose3xk4id-1
  bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
=== modified file 'bzrlib/tests/blackbox/test_exceptions.py'
--- a/bzrlib/tests/blackbox/test_exceptions.py	2007-09-21 03:07:10 +0000
+++ b/bzrlib/tests/blackbox/test_exceptions.py	2007-09-21 06:13:09 +0000
@@ -35,7 +35,7 @@
         self.assertContainsRe(err,
             '(?m)^encoding: .*, fsenc: .*, lang: .*')
         self.assertContainsRe(err,
-            '(?m)^plugins: \[.*\]')
+            '(?m)^plugins:$')
 
     # TODO: assert-fail doesn't need to always be present; we could just
     # register (and unregister) it from tests that want to touch it.

=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py	2007-09-21 03:07:10 +0000
+++ b/bzrlib/trace.py	2007-09-21 06:13:09 +0000
@@ -360,9 +360,10 @@
         'encoding: %r, fsenc: %r, lang: %r\n' % (
             osutils.get_user_encoding(), sys.getfilesystemencoding(),
             os.environ.get('LANG')))
-    err_file.write(
-        "plugins: %r\n" % (
-            sorted(plugin.plugins().keys())))
+    err_file.write("plugins:\n")
+    for name, a_plugin in sorted(plugin.plugins().items()):
+        err_file.write("  %-20s %s [%s]\n" %
+            (name, a_plugin.path(), a_plugin.__version__))
     err_file.write(
         "\n"
         "** Please send this report to bazaar at lists.ubuntu.com\n"




More information about the bazaar-commits mailing list