~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Martin von Gagern
  • Date: 2011-06-01 12:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6009.
  • Revision ID: martin.vgagern@gmx.net-20110601125356-lwozv2vecea6hxfz
Change from no_decorate to classify as name for the argument.

The command line switch remains as --no-classify, to keep backwards
compatibility.  Users are free to include --no-classify in an alias, and
still use --classify to change back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
 
72
72
import bzrlib
73
73
 
 
74
from bzrlib.symbol_versioning import (
 
75
    deprecated_function,
 
76
    deprecated_in,
 
77
    )
 
78
 
74
79
lazy_import(globals(), """
75
80
from bzrlib import (
76
81
    debug,
125
130
    _bzr_logger.warning(*args, **kwargs)
126
131
 
127
132
 
 
133
@deprecated_function(deprecated_in((2, 1, 0)))
 
134
def info(*args, **kwargs):
 
135
    """Deprecated: use trace.note instead."""
 
136
    note(*args, **kwargs)
 
137
 
 
138
 
 
139
@deprecated_function(deprecated_in((2, 1, 0)))
 
140
def log_error(*args, **kwargs):
 
141
    """Deprecated: use bzrlib.trace.show_error instead"""
 
142
    _bzr_logger.error(*args, **kwargs)
 
143
 
 
144
 
 
145
@deprecated_function(deprecated_in((2, 1, 0)))
 
146
def error(*args, **kwargs):
 
147
    """Deprecated: use bzrlib.trace.show_error instead"""
 
148
    _bzr_logger.error(*args, **kwargs)
 
149
 
 
150
 
128
151
def show_error(*args, **kwargs):
129
152
    """Show an error message to the user.
130
153
 
559
582
    try:
560
583
        sys.stdout.flush()
561
584
        sys.stderr.flush()
562
 
    except ValueError, e:
563
 
        # On Windows, I get ValueError calling stdout.flush() on a closed
564
 
        # handle
565
 
        pass
566
585
    except IOError, e:
567
586
        import errno
568
587
        if e.errno in [errno.EINVAL, errno.EPIPE]: