403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.139
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/proc/self/root/usr/lib/python3/dist-packages/breezy/ui/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/proc/self/root/usr/lib/python3/dist-packages/breezy/ui/__pycache__/__init__.cpython-313.pyc
�

p��gKL�	���SrSSKrSSSSSSSSS.rS\S'S\S'SSjr"S	S
5r"SS5r"S
S\5r"SS\5r"SS\5r\"5r	Sr
"SS5r"SS5rg)�google�NTF)�yes�no�y�n�on�off�true�false�1�0c��Uc[nSn[U[5(aXR5nU$U$![a U$f=f)a`Returns a boolean if the string can be interpreted as such.

Interpret case insensitive strings as booleans. The default values
includes: 'yes', 'no, 'y', 'n', 'true', 'false', '0', '1', 'on',
'off'. Alternative values can be provided with the 'accepted_values'
parameter.

Args:
  s: A string that should be interpreted as a boolean. It should be of
     type string or unicode.

  accepted_values: An optional dict with accepted strings as keys and
     True/False as values. The strings will be tested against a lowered
     version of 's'.

Returns:
  True or False for accepted strings, None otherwise.
N)�_valid_boolean_strings�
isinstance�str�lower�KeyError)�s�accepted_values�vals   �4/usr/lib/python3/dist-packages/breezy/ui/__init__.py�bool_from_stringrBsX��&��0��
�C��!�S���	�!�'�'�)�,�C��J�3�J���	���J�	�s�8�
A�Ac�0�\rSrSrSrSrSrSrSrSr	g)	�ConfirmationUserInterfacePolicy�`zDWrapper for a UIFactory that allows or denies all confirmed actions.c�(�XlX lX0lg)aGenerate a proxy UI that does no confirmations.

Args:
  wrapped_ui: Underlying UIFactory.
  default_answer: Bool for whether requests for
    confirmation from the user should be noninteractively accepted or
    denied.
  specific_answers: Map from confirmation_id to bool answer.
N)�
wrapped_ui�default_answer�specific_answers)�selfrrrs    r�__init__�(ConfirmationUserInterfacePolicy.__init__cs��%��,�� 0��c�.�[URU5$�N)�getattrr)r �names  r�__getattr__�+ConfirmationUserInterfacePolicy.__getattr__qs���t����-�-r#c��SRURRURURUR
5$)Nz{}({!r}, {!r}, {!r}))�format�	__class__�__name__rrr�r s r�__repr__�(ConfirmationUserInterfacePolicy.__repr__ts;��%�,�,��N�N�#�#��O�O�����!�!�	
�	
r#c��X R;aURU$URbUR$URRXU5$r%)rrr�confirm_action�r �prompt�confirmation_id�
prompt_kwargss    rr2�.ConfirmationUserInterfacePolicy.confirm_action|sS���3�3�3��(�(��9�9�
�
 �
 �
,��&�&�&��?�?�1�1����
r#)rrrN)
r-�
__module__�__qualname__�__firstlineno__�__doc__r!r(r/r2�__static_attributes__�r#rrr`s��N�1�.�
�r#rc���\rSrSrSrSSSSSSS	S
.rSrSrS
rSr	Sr
S'SjrSrS(Sjr
SrSrSrSrSrSrSrS)SjrSrSrSrSrS rS*S!jrS"rS#rS$rS%rS&r g)+�	UIFactory�aYUI abstraction.

This tells the library how to display things to the user.  Through this
layer different applications can choose the style of UI.

UI Factories are also context managers, for some syntactic sugar some users
need.

Attributes:
  suppressed_warnings: Identifiers for user warnings that should
                       no be emitted.
z�Doing on-the-fly conversion from %(from_format)s to %(to_format)s.
This may take some time. Upgrade the repositories to the same format for better performance.z�Fetching into experimental format %(to_format)s.
This format may be unreliable or change in the future without an upgrade path.
z�The command 'brz %(deprecated_name)s' has been deprecated in brz %(deprecated_in_version)s. Please use 'brz %(recommended_name)s' instead.z�The option '%(deprecated_name)s' to 'brz %(command)s' has been deprecated in brz %(deprecated_in_version)s. Please use '%(recommended_name)s' instead.z�%(current_format_name)s is deprecated and a better format is available.
It is recommended that you upgrade by running the command
  brz upgrade %(basedir)sz3Stole dead lock %(lock_url)s %(other_holder_info)s.z*Not checking SSL certificate for %(host)s.)�cross_format_fetch�experimental_format_fetch�deprecated_command�deprecated_command_option�recommend_upgrade�locks_steal_dead�not_checking_ssl_certc�>�/Ul[5UlSUlg)NF)�_task_stack�set�suppressed_warnings�_quietr.s rr!�UIFactory.__init__�s�����#&�5�� ���r#c��U$)zmContext manager entry support.

Override in a concrete factory class if initialisation before use is
needed.
r=r.s r�	__enter__�UIFactory.__enter__�s	���r#c�$�UR5 g)z�Context manager exit support.

Override in a concrete factory class if more cleanup than a simple
self.clear_term() is needed when the UIFactory is finished with.
F)�
clear_term)r �exc_type�exc_val�exc_tbs    r�__exit__�UIFactory.__exit__�s��	
����r#c��Xlg)z�Tell the UI to be more quiet, or not.

Typically this suppresses progress bars; the application may also look
at ui_factory.is_quiet().
N�rL)r �states  r�be_quiet�UIFactory.be_quiet�s	���r#c�(�URX-5$)a=Seek user confirmation for an action.

If the UI is noninteractive, or the user does not want to be asked
about this action, True is returned, indicating brz should just
proceed.

The confirmation id allows the user to configure certain actions to
always be confirmed or always denied, and for UIs to specialize the
display of particular confirmations.

Args:
  prompt: Suggested text to display to the user.
  prompt_kwargs: A dictionary of arguments that can be
      string-interpolated into the prompt.
  confirmation_id: Unique string identifier for the confirmation.
��get_booleanr3s    rr2�UIFactory.confirm_action�s��"���� 6�7�7r#c�,�[UR5e)a�Prompt the user for a password.

Args:
  prompt: The prompt to present the user (must be unicode)
  kwargs: Arguments which will be expanded into the prompt.
               This lets front ends display different things if
               they so choose.

Returns: The password string, return None if the user canceled the
         request. Note that we do not touch the encoding, users may
         have whatever they see fit and the password should be
         transported as is.
)�NotImplementedError�get_password�r r4�kwargss   rrc�UIFactory.get_password�s��"�$�"3�"3�4�4r#c��UR$r%rYr.s r�is_quiet�UIFactory.is_quiet�s���{�{�r#Nc�(�URX5nU$)a�Get a stream for sending out bulk text data.

This is used for commands that produce bulk text, such as log or diff
output, as opposed to user interaction.  This should work even for
non-interactive user interfaces.  Typically this goes to a decorated
version of stdout, but in a GUI it might be appropriate to send it to a
window displaying the text.

The caller may flush but should not close the returned stream.

Args:
  encoding: Unicode encoding for output; if not specified
    uses the configured 'output_encoding' if any; otherwise the
    terminal encoding.
    (See get_terminal_encoding.)

  encoding_type: How to handle encoding errors:
    replace/strict/escape/exact.  Default is replace.
)�_make_output_stream_explicit)r �encoding�
encoding_type�
out_streams    r�make_output_stream�UIFactory.make_output_stream�s��(�6�6�x�O�
��r#c�^�[SRURR55e)Nz%{} doesn't support make_output_stream)rbr+r,r-�r rlrms   rrk�&UIFactory._make_output_stream_explicits'��!�3�:�:�4�>�>�;R�;R�S�
�	
r#c��SSKJn UR(aU"URSU5nO	U"SU5nURRU5 U$)zuReturn a nested progress bar.

When the bar has been finished with, it should be released by calling
bar.finished().
�)�ProgressTask���N)�progressrvrI�append)r rv�ts   r�nested_progress_bar�UIFactory.nested_progress_barsL��	,�����T�-�-�b�1�4�8�A��T�4�(�A�������"��r#c�d�UR(d$[R"SRU5SS9 XR;aURR	U5 O.[R"SRXR5SS9 UR(dUR5 gg)z,Called by the ProgressTask when it finishes.z#{!r} finished but nothing is activeru��
stacklevelz {!r} is not in active stack {!r}N)rI�warnings�warnr+�remove�_progress_all_finished�r �tasks  r�_progress_finished�UIFactory._progress_finished&s�������M�M�5�<�<�T�B�q�
��#�#�#����#�#�D�)��M�M�2�9�9�$�@P�@P�Q��
�����'�'�)� r#c��g)z1Called when the top-level progress task finished.Nr=r.s rr�� UIFactory._progress_all_finished6s��r#c��g)zYCalled by the ProgressTask when it changes.

Should be specialized to draw the progress.
Nr=r�s  r�_progress_updated�UIFactory._progress_updated:s��
	
r#c��g)z�Prepare the terminal for output.

This will, for example, clear text progress bars, and leave the
cursor at the leftmost position.
Nr=r.s rrR�UIFactory.clear_termA���	
r#c�Z�URUn[U5U-$![a7 SRX5n[R"SU-SS9 [U5s$f=f![a<nSRXU5n[R"USS9 [U5sSnA$SnAff=f)Nzbrz warning: {!r}, {!r}zno template for warning: rur~z'brz unprintable warning: {!r}, {!r}, {})�_user_warning_templatesrr+r�r�r�
ValueError)r �
warning_id�message_args�template�fail�es      r�format_user_warning�UIFactory.format_user_warningIs���	��3�3�J�?�H�	��x�=�<�/�/���	�,�3�3�J�M�D��M�M�+�d�2�q�
��t�9��	���	�<�C�C��!��D�
�M�M�$�1�-��t�9���	�s,� �
A$�>A!� A!�$
B*�.1B%�B*�%B*c�,�[UR5e)a�Prompt the user for a list of alternatives.

Args:
  msg: message to be shown as part of the prompt.

  choices: list of choices, with the individual choices separated
    by '\n', e.g.: choose("Save changes?", "&Yes\n&No\n&Cancel"). The
    letter after the '&' is the shortcut key for that choice. Thus you
    can type 'c' to select "Cancel".  Shorcuts are case insensitive.
    The shortcut does not need to be the first letter. If a shorcut key
    is not provided, the first letter for the choice will be used.

  default: default choice (index), returned for example when enter
    is pressed for the console version.

Returns:
  the index fo the user choice (so '0', '1' or '2' for respectively
  yes/no/cancel in the previous example).
)rb�choose)r �msg�choices�defaults    rr��UIFactory.choose[s��("�$�+�+�.�.r#c�4�URUS-SSS9nUS:H$)z�Get a boolean question answered from the user.

Args:
  prompt: a message to prompt the user with. Should be a single
    line without terminating \\n.

Returns:
  True or False for y/yes or n/no.
�?z&yes
&noN)r�r)r�)r r4�choices   rr_�UIFactory.get_booleanqs&�����V�c�\�;���E����{�r#c�,�[UR5e)z�Get an integer from the user.

Args:
  prompt: a message to prompt the user with. Could be a multi-line
    prompt but without a terminating \\n.

Returns:
  A signed integer.
)rb�get_integer�r r4s  rr��UIFactory.get_integer~s��"�$�"2�"2�3�3r#c��[5$)z�Construct a new ProgressView object for this UI.

Application code should normally not call this but instead
nested_progress_bar().
)�NullProgressViewr.s r�make_progress_view�UIFactory.make_progress_view�s
�� �!�!r#c�&�URSUUS9 g)z�Recommend the user upgrade a control directory.

Args:
  current_format_name: Description of the current format
  basedir: Location of the control dir
rE)�current_format_name�basedirN)�show_user_warning)r r�r�s   rrE�UIFactory.recommend_upgrade�s ��	
���� 3��	�	
r#c��g)z~Called by transports as they do IO.

This may update a progress bar, spinner, or similar display.
By default it does nothing.
Nr=)r �	transport�
byte_count�	directions    r�report_transport_activity�#UIFactory.report_transport_activity�r�r#c��g)aWrite out whatever transport activity has been measured.

Implementations are allowed to do nothing, but it is useful if they can
write a line to the log file.

Args:
  display: If False, only log to disk, if True also try to display
    a message to the user.

Returns:
  None
Nr=�r �displays  r�log_transport_activity� UIFactory.log_transport_activity�s��	
r#c��g)agShow a warning to the user.

This is specifically for things that are under the user's control (eg
outdated formats), not for internal program warnings like deprecated
APIs.

This can be overridden by UIFactory subclasses to show it in some
appropriate way; the default UIFactory is noninteractive and does
nothing.  format_user_warning maps it to a string, though other
presentations can be used for particular UIs.

Args:
  warning_id: An identifier like 'cross_format_fetch' used to
    check if the message is suppressed and to look up the string.
  message_args: Arguments to be interpolated into the message.
Nr=)r r�r�s   rr��UIFactory.show_user_warning�s��"	
r#c�,�[UR5e)z�Show an error message (not an exception) to the user.

The message should not have an error prefix or trailing newline.  That
will be added by the factory if appropriate.
)rb�
show_error�r r�s  rr��UIFactory.show_error�s��"�$�/�/�2�2r#c�,�[UR5e)zShow a message to the user.)rb�show_messager�s  rr��UIFactory.show_message����!�$�"3�"3�4�4r#c�,�[UR5e)zShow a warning to the user.)rb�show_warningr�s  rr��UIFactory.show_warning�r�r#)rLrIrK��)N�replacer%�F)!r-r8r9r:r;r�r!rOrVr[r2rcrhrorkr{r�r�r�rRr�r�r_r�r�rEr�r�r�r�r�r�r<r=r#rr?r?�s����
2�
)�
=�

9�

(�S�"N�? ��D�
���8�&5� ��.
�

�*� 
�
�
��$/�,�
4�"�
�
�
� 
�&3�5�5r#r?c�$�\rSrSrSrSrSrSrg)�NoninteractiveUIFactoryi�z Base class for UIs with no user.c��g)NTr=r3s    rr2�&NoninteractiveUIFactory.confirm_action����r#c�L�SRURR5$)Nz{}())r+r,r-r.s rr/� NoninteractiveUIFactory.__repr__�s���}�}�T�^�^�4�4�5�5r#r=N)r-r8r9r:r;r2r/r<r=r#rr�r��s��*��6r#r�c�B�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rg)�SilentUIFactoryi�aA UI Factory which never prints anything.

This is the default UI, if another one is never registered by a program
using breezy, and it's also active for example inside 'brz serve'.

Methods that try to read from the user raise an error; methods that do
output do nothing.
c�.�[RU5 gr%)r?r!r.s rr!�SilentUIFactory.__init__�s�����4� r#c��gr%r=r�s  r�note�SilentUIFactory.note����r#c��gr%r=rds   r�get_username�SilentUIFactory.get_username�r�r#c��[U5$r%)�NullOutputStreamrrs   rrk�,SilentUIFactory._make_output_stream_explicit�s
����)�)r#c��gr%r=r�s  rr��SilentUIFactory.show_error�r�r#c��gr%r=r�s  rr��SilentUIFactory.show_message�r�r#c��gr%r=r�s  rr��SilentUIFactory.show_warningr�r#r=N)
r-r8r9r:r;r!r�r�rkr�r�r�r<r=r#rr�r��s*���!�
��*�
�
�
r#r�c�L�\rSrSrSrSrSrSrSrSr	S
Sjr
S	rS
rSr
g)�CannedInputUIFactoryiz%A silent UI that return canned input.c��Xlgr%��	responses)r r�s  rr!�CannedInputUIFactory.__init__s��"�r#c�b�SRURRUR5$)Nz{}({!r}))r+r,r-r�r.s rr/�CannedInputUIFactory.__repr__s#��� � ����!8�!8�$�.�.�I�Ir#c�(�URX-5$r%r^)r r4r5�argss    rr2�#CannedInputUIFactory.confirm_actions������
�.�.r#c�8�URRS5$�Nr�r��popr�s  rr_� CannedInputUIFactory.get_boolean����~�~�!�!�!�$�$r#c�8�URRS5$r�r�r�s  rr�� CannedInputUIFactory.get_integerr�r#c�8�URRS5$r�r�rds   rrc�!CannedInputUIFactory.get_passwordr�r#c�8�URRS5$r�r�rds   rr��!CannedInputUIFactory.get_usernamer�r#c�Z�UR(a[SRU55eg)Nz)expected all input in {!r} to be consumed)r��AssertionErrorr+r.s r�assert_all_input_consumed�.CannedInputUIFactory.assert_all_input_consumeds)���>�>� �;�B�B�4�H��
�r#r�Nr�)r-r8r9r:r;r!r/r2r_r�rcr�rr<r=r#rr�r�s.��/�#�J�/�%�%�%�%�r#r�c� �SSKJn U"XU5$)zBConstruct and return a suitable UIFactory for a text mode program.�)�
TextUIFactory)�textr)�stdin�stdout�stderrrs    r�make_ui_for_terminalr
)s��$����/�/r#c�4�\rSrSrSrSrSrSrS	SjrSr	g)
r�i2z(Soak up and ignore progress information.c��gr%r=r.s r�clear�NullProgressView.clear5r�r#c��gr%r=r�s  r�
show_progress�NullProgressView.show_progress8r�r#c��gr%r=)r r�r�r�s    r�show_transport_activity�(NullProgressView.show_transport_activity;r�r#c��gr%r=r�s  rr��'NullProgressView.log_transport_activity>r�r#r=Nr�)
r-r8r9r:r;r
rrr�r<r=r#rr�r�2s��2�
�
�
�
r#r�c�0�\rSrSrSrSrSrSrSrSr	g)	r�iBz)Acts like a file, but discard all output.c��Xlgr%�rl)r rls  rr!�NullOutputStream.__init__Es�� �
r#c��gr%r=�r �datas  r�write�NullOutputStream.writeHr�r#c��gr%r=rs  r�
writelines�NullOutputStream.writelinesKr�r#c��gr%r=r.s r�close�NullOutputStream.closeNr�r#rN)
r-r8r9r:r;r!rr!r$r<r=r#rr�r�Bs��3�!�
�
�
r#r�r%)
�
__docformat__r�rrrr?r�r�r��
ui_factoryr
r�r�r=r#r�<module>r(s���"�
��>��
�	
�	�
���
�	��#��s��#��s���<$�$�NQ5�Q5�h
6�i�6�
�-�
�@�?��>�
�
�
0�

�

� 

�

r#

Youez - 2016 - github.com/yon3zu
LinuXploit