/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Andrew Bennetts
  • Date: 2009-08-21 00:04:55 UTC
  • mfrom: (4634 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4639.
  • Revision ID: andrew.bennetts@canonical.com-20090821000455-6oygnl6rt3291bwp
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
 
479
479
def report_bug(exc_info, err_file):
480
480
    """Report an exception that probably indicates a bug in bzr"""
481
 
    import platform
482
 
    print_exception(exc_info, err_file)
483
 
    err_file.write('\n')
484
 
    err_file.write('bzr %s on python %s %s\n' % \
485
 
                       (bzrlib.__version__,
486
 
                        bzrlib._format_version_tuple(sys.version_info),
487
 
                        platform.platform(aliased=1)))
488
 
    err_file.write('arguments: %r\n' % sys.argv)
489
 
    err_file.write(
490
 
        'encoding: %r, fsenc: %r, lang: %r\n' % (
491
 
            osutils.get_user_encoding(), sys.getfilesystemencoding(),
492
 
            os.environ.get('LANG')))
493
 
    err_file.write("plugins:\n")
494
 
    for name, a_plugin in sorted(plugin.plugins().items()):
495
 
        err_file.write("  %-20s %s [%s]\n" %
496
 
            (name, a_plugin.path(), a_plugin.__version__))
497
 
    err_file.write(
498
 
"""\
499
 
*** Bazaar has encountered an internal error.
500
 
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
501
 
    including this traceback, and a description of what you
502
 
    were doing when the error occurred.
503
 
""")
 
481
    from bzrlib.crash import report_bug
 
482
    report_bug(exc_info, err_file)