403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/breezy/__pycache__/trace.cpython-313.pyc
�

p��g=V����SrSSKrSSKrSSKrSSKrSSKrSSKJr SSKrSSK	J	r	 \	"\
"5S5 SSKJr Sq
SqSq\R r\R$"S5rS	rS
rSr"SS
\5rSrSrSrSrSrSrS.SjrSr Sr!Sr"Sr#S/Sjr$S/Sjr%Sr&Sr'S0Sjr(Sr)S0Sjr*S r+S1S!jr,S"r-S#r.S2S$jr/S%r0S&r1S'r2"S(S)\Rf5r4"S*S+5r5"S,S-\55r6g)3a�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.
�N)�StringIO�)�lazy_importzI
from breezy import (
    bedding,
    debug,
    osutils,
    ui,
    )
)�errors�brzc�l�[RR5 [R"U0UD6 g)zVOutput a note to the user.

Takes the same parameters as logging.info.

:return: None
N)�ui�
ui_factory�
clear_term�_brz_logger�info��args�kwargss  �./usr/lib/python3/dist-packages/breezy/trace.py�noterhs'���M�M�������d�%�f�%�c�l�[RR5 [R"U0UD6 g�N)r	r
rr�warningrs  rrrvs%���M�M��������(��(rc�0�[R"U0UD6 g)zaShow an error message to the user.

Don't use this for exceptions, use report_exception instead.
N)r�errorrs  r�
show_errorr{s��
���t�&�v�&rc�$�\rSrSrSrSrSrSrg)�_Bytes�z.Compat class for displaying bytes on Python 2.c�2�S[RU5-$)N�b)�str�__repr__��selfs rr �_Bytes.__repr__�s���S�\�\�$�'�'�'rc�&�URSS5$)N�ascii�replace)�decoder!s r�__unicode__�_Bytes.__unicode__�s���{�{�7�I�.�.r�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r r(�__static_attributes__r*rrrr�s��8�(�/rrc�r�[cg[[SS5b[R(ag[U[5(aURSS5nU(aX-nOUn[R"5nSRU[-
U5n[RURS55 g)N�closedr%r&z{:0.3f}  {}
�utf-8)�_trace_file�getattrr2�
isinstance�bytesr'�time�format�_brz_log_start_time�write�encode)�fmtr�out�nows    r�mutterr@�s������	��X�t�,�8�k�>P�>P���#�u����j�j��)�,����j����
�)�)�+�C�
�
 �
 ��':�!:�C�
@�C����c�j�j��)�*rc���SSKn[5nUcSnOUS-nURXTS9 UR5R	5nSRUSS5n[
US-/X'4-Q76 g)z�Perform a mutter of fmt and args, logging the call trace.

:param stacklevel: The number of frames to show. None will show all
    frames.
:param fmt: The format string to pass to mutter.
:param args: A list of substitution variables.
rNr)�limit�file�
���z
Called from:
%s)�	tracebackr�print_stack�getvalue�
splitlines�joinr@)�
stacklevelr=rrF�outfrB�formatted_lines�formatted_stacks        r�mutter_callsiterO�su����:�D������Q���
�����1��m�m�o�0�0�2�O��i�i���� 4�5�O�
�3�%�%�D��0B�)B�Drc��SSKn[R"U5URnUS::agUS-n[R	X5 g![
a gf=f)Nri@z.old)�stat�os�ST_SIZE�osutils�rename�OSError)�trace_fnamerQ�size�	old_fnames    r�_rollover_trace_mayberZ�sS�����w�w�{�#�D�L�L�1���7�?���&�(�	����{�.������s�)A�A�
A�Ac��[RRS5nU(aU$[RR	[
R
5S5$)z�Return the brz log filename.

:return: A path to the log file
:raise EnvironmentError: If the cache directory could not be created
�BRZ_LOGzbrz.log)rR�environ�get�pathrJ�bedding�	cache_dir)�brz_logs r�_get_brz_log_filenamerc�s<���j�j�n�n�Y�'�G����
�7�7�<�<��)�)�+�Y�7�7rc��Sn[5q[[5 U"[5nURS5 UR	5S::a3URS5 URS5 URS5 U$![
a8n[RRSRU55 SnAgSnAff=f)	z�Open the brz.log trace file.

If the log is more than a particular length, the old file is renamed to
brz.log.old and a new file is started.  Otherwise, we append to the
existing file.

This sets the global _brz_log_filename.
c�F�[R[R-[R-n[R
"X5n[R"USS5$![a)nUR[R:waeSnAOSnAff=f[R
"X[R-[R-S5n[RU5 M�![a)nUR[R:waeSnAOSnAff=fM�)z�Open existing log file, or create with ownership and permissions.

It inherits the ownership and permissions (masked by umask) from
the containing directory to cope better with being run under sudo
with $HOME still set to the user's homedir.
Ni��abr)rR�O_WRONLY�O_APPENDrT�O_TEXT�openrV�errno�ENOENT�O_CREAT�O_EXCL�copy_ownership_from_path�EEXIST�fdopen)�filename�flags�fd�es    r�_open_or_create_log_file�/_open_brz_log.<locals>._open_or_create_log_file�s������b�k�k�)�G�N�N�:���
��W�W�X�-����y�y��T�1�%�%���
��7�7�e�l�l�*��+��
��
��W�W�X�r�z�z�'9�B�I�I�'E�u�M��
�0�0��:����
��7�7�e�l�l�*��+��
��s/�A$�$
B�.B�B�9C+�+
D�5D�D�
�s=this is a debug log for diagnosing/reporting problems in brz
s=you can delete or truncate this file, or include sections in
s8bug reports to https://bugs.launchpad.net/brz/+filebug

zfailed to open trace file: {}
N)	rc�_brz_log_filenamerZr;�tellrV�sys�stderrr9)rv�brz_log_filerus   r�
_open_brz_logr�s���&�2F�1�3���/�0�/�0A�B�����5�!�����!�#����Q�
�
���Q�
�
���M�
�����F�	�
�
���:�A�A�!�D�E�E���F�s�A>B�
C�.C�Cc�>�[R[SS9n[5nUb#UR	URS5S-5 [
USS5n[R"[RS9n[R"S5RU5 U$)	a�Configure default logging: messages to stderr and debug to brz.log.

This should only be called once per process.

Non-command-line programs embedding breezy do not need to call this.  They
can instead either pass a file to _push_log_file, or act directly on
logging.getLogger("brz").

Output can be redirected away by calling _push_log_file.

:return: A memento from push_log_file for restoring the log state.
�local)�timezoner3rxzA[%(process)5d] %(asctime)s.%(msecs)03d %(levelname)s: %(message)sz%Y-%m-%d %H:%M:%S)�streamr)
rT�format_local_dater:rr;r<�
push_log_file�logging�
StreamHandlerr|r}�	getLogger�
addHandler)�
start_timer~�memento�stderr_handlers    r�enable_default_loggingr�s����*�*�+>��*�Q�J� �?�L������:�,�,�W�5��=�>���L���G��*�*�#�*�*�=�N����e��'�'��7��Nrc�j�[US[RS9nUcSnUR[R"X55 [R
"S5nURSSnURSS2	URU5 UR[R5 [nUq	SXSX`4$)z�Intercept log and trace messages and send them to a file.

:param to_file: A file-like object to which messages will be sent.

:returns: A memento that should be passed to _pop_log_file to restore the
    previously active logging.
r3��levelNz%(levelname)8s  %(message)sr�log_memento)
�EncodedStreamHandlerr��DEBUG�setFormatter�	Formatterr��handlersr��setLevelr4)�to_file�
log_format�date_format�new_handler�
brz_logger�old_handlers�old_trace_files       rr�r�2s���'�w��w�}�}�M�K���2�
����W�.�.�z�G�H��"�"�5�)�J��&�&�q�)�L����A�����+�&�����
�
�&�!�N��K��<�n�N�Nrc��Uupp4nUq[R"S5nURU5 UR	5 X&lUbUR
5 gg)z�Undo changes to logging/tracing done by _push_log_file.

This flushes, but does not close the trace file (so that anything that was
in it is output.

Takes the memento returned from _push_log_file.
rN)r4r�r��
removeHandler�closer��flush)�entry�magicr�r�r��new_trace_filer�s       r�pop_log_filer�Ts`��JO�F�U�+�~� �K��"�"�5�)�J����[�)�����&���!�����"rc�>�SSKn[UR55 g)z�Log the last exception to the trace file only.

Used for exceptions that occur internally and that may be
interesting to developers but not to users.  For example,
errors loading plugins.
rN)rFr@�
format_exc)rFs r�log_exception_quietlyr�is���
�9���!�"rc�h�Uq[US:5 [RR	US:5 g)zUSet the verbosity level.

:param level: -ve for quiet, 0 for normal, +ve for verbose
rN)�_verbosity_level�_update_logging_levelr	r
�be_quietr�s r�set_verbosity_levelr�us,�����%�!�)�$��M�M���5�1�9�%rc��[$)z@Get the verbosity level.

See set_verbosity_level() for values.
�r�r*rr�get_verbosity_levelr��s
��
�rc�@�U(a[S5 g[S5 g)N���r)r���quiets rr�r��s����B���A�rc��U(a$[R[R5 g[R[R5 g)zHide INFO messages if quiet.N)rr�r��WARNING�INFOr�s rr�r��s)������W�_�_�-����W�\�\�*rc��[S:$)z Is the verbosity level negative?rr�r*rr�is_quietr���
���a��rc��[S:�$)z Is the verbosity level positive?rr�r*rr�
is_verboser��r�rc�j�[RS:XaSSKJn UR	XS9 g[XS9 g)zWrite out a memory dump.�win32r)�
win32utils)�message�shortN)r|�platform�breezyr��debug_memory_win32api�_debug_memory_proc)r�r�r�s   r�debug_memoryr��s*��
�|�|�w��%��(�(��(�F��7�8r)�VmPeak�VmSize�VmRSSc���[SR[R"55S5nUR5nUR
5 U(a[U5 UR5HHnU(d
[U5 M[H'nURU5(dM[U5  MF MJ g![a gf=f!UR
5 f=f)Nz/proc/{}/status�rb)rjr9rR�getpidrV�readr�rrI�
_short_fields�
startswith)r�r��status_file�status�line�fields      rr�r��s�����,�3�3�B�I�I�K�@�$�G����!�!�#��������W�
��!�!�#�����J�&���?�?�5�)�)���J��'�	$�������
	����s�.C�C�
C
�C
�C"c�4�SSKnURSSS9up#[R"US5nSSKJn UR
U5 URSRU55 WbUR5 gWb[R"U5 gg![a URS5 [5 NV[a URS	5 [5 N|f=f!WbUR5 fWb[R"U5 ff=f)
Nr�brz_memdumpz.json)�prefix�suffix�w)�scannerzMemory dumped to {}
z'Dumping memory requires meliae module.
z Exception while dumping memory.
)
�tempfile�mkstemprRrq�meliaer��dump_gc_objectsr;r9�ImportErrorr��
BaseExceptionr�)�err_filer�rt�name�	dump_filer�s      r�_dump_memory_usager��s�����	$��'�'�}�W�'�M�H�B��	�	�"�c�*�I�&��#�#�I�.��N�N�2�9�9�$�?�@�� ��O�O��
�^��H�H�R�L����	$��N�N�E�F�!�#��	$��N�N�>�?�!�#�	$��� ��O�O��
�^��H�H�R�L��s0�A B�%C$�;C'�=$C$�!C'�#C$�$C'�'0Dc�~�URnURnUS;d
U(aUS:XaU$SRX25$)z�Give name of error class including module for non-builtin exceptions.

If `unqualified_breezy_errors` is True, errors specific to breezy will
also omit the module prefix.
)�builtins�
exceptions�__main__z
breezy.errorsz{}.{})r+r,r9)�eclass�unqualified_breezy_errors�
class_name�module_names    r�_qualified_exception_namer��s@�����J��#�#�K��<�<�!�k�_�&D����>�>�+�2�2rc���[5 S[R;a[X5 [R
$Uup#n[
U[5(a!URS5 [R
$[
U[5(aaURS5 S[R;a[U5 [R
$URS5 [R
$[
U[5(a<[U5RS5(a[UUS5 [R
$[USS	5(d[X5 [R
$[
U[ 5(a[[US
S5["R$:Xa!URS5 [R
$[X5 [R
$['X5 [R($)
z�Report an exception to err_file (typically stderr) and to brz.log.

This will show either a full traceback or a short message as appropriate.

:return: The appropriate exit code for this error.
rzbrz: interrupted
zbrz: out of memory
�mem_dumpz)Use -Dmem_dump to dump memory to a file.
zNo module named z7You may need to install this Python library separately.�internal_errorTrkNzbrz: broken pipe
)r��debug�debug_flags�print_exceptionr�
EXIT_ERRORr6�KeyboardInterruptr;�MemoryErrorr�r�rr��report_user_errorr5�EnvironmentErrorrk�EPIPE�
report_bug�EXIT_INTERNAL_ERROR)�exc_infor��exc_type�
exc_object�exc_tbs     r�report_exceptionr�s������%�#�#�#���+�� � � �#+� �H�&��*�/�0�0����+�,�� � � �	�J��	,�	,����-�.���*�*�*��x�(�� � � �
�N�N�G�H�� � � �	�J��	,�	,��Z��1K�1K��2�2�	���E�	
�
� � � �
�Z�!1�4�
8�
8��(�-�� � � �	�J� 0�	1�	1��:�w��-����<��N�N�/�0��$�$�$�	�(�-�� � � ��8�&��)�)�)rc��SSKnUup4nURSR[U5U55 URS5 UR	X4XQS9 g)Nrzbrz: ERROR: {}: {}
rD)rC)rFr;r9r�r�)r�r�rFr�r�r�s      rr�r�sR���#+� �H�&��N�N��%�%�&?��&I�:�V��
�N�N�4��
���h�F��Jrc��URSR[US555 U(a!URSRU55 gg)z�Report to err_file an error that's not an internal error.

These don't get a traceback unless -Derror was given.

:param exc_info: 3-tuple from sys.exc_info()
:param advice: Extra advice to the user to be printed following the
    exception.
zbrz: ERROR: {}
rz{}
N)r;r9r)r�r��advices   rr�r�&sB��
�N�N�%�,�,�S��!��-=�>�?�
����v�}�}�V�,�-�rc� �SSKJn U"X5 g)z9Report an exception that probably indicates a bug in brz.r)r�N)�breezy.crashr�)r�r�r�s   rr�r�4s
��'��x�"rc��[RR5 [RR5 g![a g[
a5nSSKnURURUR4;aSnAgeSnAff=f)Nr)	r|�stdoutr�r}�
ValueErrorrVrk�EINVALr�)rurks  r�_flush_stdout_stderrr
;sf��
��
�
�����
�
������
�	
�����7�7�u�|�|�U�[�[�1�1����
�s!�<?�
B	�	B	�*B�B�B	c�D�[(a[R5 ggr)r4r�r*rr�_flush_tracerMs���{�����rc�.�\rSrSrSrSSjrSrSrSrg)	r�iTadRobustly write logging events to a stream using the specified encoding.

Messages are expected to be formatted to unicode, but UTF-8 byte strings
are also accepted. An error during formatting or a str message in another
encoding will be quitely noted as an error in the Bazaar log file.

The stream is not closed so sys.stdout or sys.stderr may be passed.
Nc��[RRX5 XlUc
[	USS5nX lX0lg)N�encodingr%)r��Handler�__init__r�r5rr)r"r�rrr�s     rr�EncodedStreamHandler.__init__^s7����� � ��-������v�z�7�;�H� �
��rc�H�[URSS5nUbU"5 gg)Nr�)r5r�)r"r�s  rr��EncodedStreamHandler.flushfs$������W�d�3�����G�rc�B�[UR[5(d!URRS5nX!lUR	U5n[U[5(dURS5nUR
R
URURUR5S-5 g![aX [5 S=p$[UR5n[UR5nO![a Of=f[SX$5 gf=f)Nr3rxz<Unformattable>z&Logging record unformattable: %s %% %s)r6�msgrr'r9r�r;r<rr�	Exceptionr��reprrr@)r"�recordrr�rs     r�emit�EncodedStreamHandler.emitks���	H��f�j�j�#�.�.��j�j�'�'��0�� �
��;�;�v�&�D��d�C�(�(��{�{�7�+���K�K���d�k�k�$�-�-����E��M�N���	H�!�#�*�*�C�
��6�:�:�&���F�K�K�(����
��
��
�;�S�G�	H�s6�B9B<�<D�*C?�>D�?
D�	D�D�D�D)rrr�)N�strictr)	r+r,r-r.r/rr�rr0r*rrr�r�Ts�����
Hrr�c�$�\rSrSrSrSrSrSrg)�Configi�z�Configuration of message tracing in breezy.

This implements the context manager protocol and should manage any global
variables still used. The default config used is DefaultConfig, but
embedded uses of breezy may wish to use a custom manager.
c��U$rr*r!s r�	__enter__�Config.__enter__�s���rc��g�NFr*�r"r��exc_valr�s    r�__exit__�Config.__exit__�s��rr*N�r+r,r-r.r/r r&r0r*rrrr�s����rrc�$�\rSrSrSrSrSrSrg)�
DefaultConfigi�zjA default configuration for tracing of messages in breezy.

This implements the context manager protocol.
c�:�[Ul[5UlU$r)rz�_original_filenamer��_original_stater!s rr �DefaultConfig.__enter__�s��"3���5�7����rc�F�[UR5 URqgr#)r�r-r,rzr$s    rr&�DefaultConfig.__exit__�s���T�)�)�*� �3�3��r)r,r-Nr(r*rrr*r*�s���
�
rr*)NN)T)�T)Fr)7r/rkr�rRr|r8�iorr�r�globalsr1rr�r4rz�_start_timer:r�rrrrrrr@rOrZrcrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r
rrr�rr*r*rr�<module>r5sB��"�P
��	�
���
�$���I��
���������(�(������&��&�)�
'�/�S�/�+�,E�*
�	8�A�H�:O�D�*	#�&���+� �
 �
9�.�
��*�03�-*�`K�.�#��$�+H�7�?�?�+H�\���F�r

Youez - 2016 - github.com/yon3zu
LinuXploit