File: //kunden/lib/python3/dist-packages/breezy/__pycache__/trace.cpython-39.pyc
a
�*�^�W � @ s� d Z ddlmZ ddlZddlZddlZddlZddlZddlmZ ee � d� ddl
Z
ee � d� ddlmZ dd l
mZmZmZ dadadae
jZe�d
�Zdd� Zd
d� Zdd� ZG dd� de�Zdd� Zdd� Zdd� Zdd� Z dd� Z!dd� Z"dOdd �Z#d!d"� Z$d#d$� Z%d%d&� Z&d'd(� Z'dPd*d+�Z(dQd,d-�Z)d.d/� Z*d0d1� Z+dRd3d4�Z,d5Z-dSd6d7�Z.d8d9� Z/dTd;d<�Z0d=d>� Z1d?d@� Z2dUdAdB�Z3dCdD� Z4dEdF� Z5dGdH� Z6G dIdJ� dJej7�Z8G dKdL� dLe9�Z:G dMdN� dNe:�Z;dS )Va� Messages and logging.
Messages are supplied by callers as a string-formatting template, plus values
to be inserted into it. The actual %-formatting is deferred to the log
library so that it doesn't need to be done for messages that won't be emitted.
Messages are classified by severity levels: critical, error, warning, info,
and debug.
They can be sent to two places: stderr, and `$XDG_CACHE_HOME/breezy/brz.log`.
For purposes such as running the test suite, they can also be redirected away
from both of those two places to another location.
`brz.log` gets all messages, and full tracebacks for uncaught exceptions.
This trace file is always in UTF-8, regardless of the user's default encoding,
so that we can always rely on writing any message.
Output to stderr depends on the mode chosen by the user. By default, messages
of info and above are sent out, which results in progress messages such as the
list of files processed by add and commit. In debug mode, stderr gets debug messages too.
Errors that terminate an operation are generally passed back as exceptions;
others may be just emitted as messages.
Exceptions are reported in a brief form to stderr so as not to look scary.
BzrErrors are required to be able to format themselves into a properly
explanatory message. This is not true for builtin exceptions such as
KeyError, which typically just str to "0". They're printed in a different
form.
� )�absolute_importN� )�lazy_importz"
import tempfile
import traceback
zI
from breezy import (
bedding,
debug,
osutils,
ui,
)
)�errors)�PY3�StringIO� text_type�brzc O s t j�� tj| i |�� dS )zbOutput a note to the user.
Takes the same parameters as logging.info.
:return: None
N)�ui�
ui_factory�
clear_term�_brz_logger�info��args�kwargs� r �./usr/lib/python3/dist-packages/breezy/trace.py�notes s
r c O s t j�� tj| i |�� d S �N)r
r r r
�warningr r r r r � s
r c O s t j| i |�� dS )ziShow an error message to the user.
Don't use this for exceptions, use report_exception instead.
N)r
�errorr r r r �
show_error� s r c @ s e Zd ZdZdd� Zdd� ZdS )�_Bytesz.Compat class for displaying bytes on Python 2.c C s dt �| � S )N�b)�str�__repr__��selfr r r r � s z_Bytes.__repr__c C s | � dd�S )N�ascii�replace)�decoder r r r �__unicode__� s z_Bytes.__unicode__N)�__name__�
__module__�__qualname__�__doc__r r"