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__/hooks.cpython-313.pyc
�

p��gA���%SrSSKJrJr SSKJr \"\"5S5 "SS\R5r"SS\R\	S	45r
S
r\
"5r\Hur
rr\R!\
\\5 M CC
CCSr"SS	\5r"S
S5rSrSr0r\\\	\	\	4\\\R4\	44\S'Srg)�google�)�errors�registry)�lazy_importzd
from breezy import (
    _format_version_tuple,
    pyutils,
    )
from breezy.i18n import gettext
c��\rSrSrSrSrSrg)�UnknownHook�$zBThe %(type)s hook '%(hook)s' is unknown in this version of breezy.c�Z�[RRU5 XlX lg�N)r�BzrError�__init__�type�hook)�self�	hook_type�	hook_names   �./usr/lib/python3/dist-packages/breezy/hooks.pyr
�UnknownHook.__init__'s����� � ��&��	��	�)rrN)�__name__�
__module__�__qualname__�__firstlineno__�_fmtr
�__static_attributes__�rrrr$s��O�D�rrc�&�\rSrSrSrSrSrSrg)�KnownHooksRegistry�-c�,�URX4UU5 gr)�
register_lazy)r�hook_module_name�hook_member_name�hook_factory_member_names    r�register_lazy_hook�%KnownHooksRegistry.register_lazy_hook3s��	
���
�0��$�	
rc#�b# �UR5HnXRU54v� M g7f)aYield (hook_key, (parent_object, attr)) tuples for every registered
hook, where 'parent_object' is the object that holds the hook
instance.

This is useful for resetting/restoring all the hooks to a known state,
as is done in breezy.tests.TestCase._clear_hooks.
N)�keys�key_to_parent_and_attribute)r�keys  r�iter_parent_objects�&KnownHooksRegistry.iter_parent_objects<s+����9�9�;�C��7�7��<�<�<��s�-/c�\�[R"U6up#n[RX#5U4$)aConvert a known_hooks key to a (parent_obj, attr) pair.

:param key: A tuple (module_name, member_name) as found in the keys of
    the known_hooks registry.
:return: The parent_object of the hook and the name of the attribute on
    that parent object where the hook is kept.
)�pyutils�calc_parent_name�get_named_object)rr*�
parent_mod�
parent_member�attrs     rr)�.KnownHooksRegistry.key_to_parent_and_attributeGs/��+2�*B�*B�C�*H�'�
�4��'�'�
�B�D�H�HrrN)rrrrr%r+r)rrrrrr-s��
�	=�	Irr�Hooks))z
breezy.branchzBranch.hooks�BranchHooks)zbreezy.controldirzControlDir.hooks�ControlDirHooks)zbreezy.commandsz
Command.hooks�CommandHooks)z
breezy.config�ConfigHooks�_ConfigHooks)zbreezy.info�hooks�	InfoHooks)zbreezy.lockz
Lock.hooks�	LockHooks)zbreezy.mergezMerger.hooks�
MergeHooks)zbreezy.msgeditorr;�MessageEditorHooks)zbreezy.mutabletreezMutableTree.hooks�MutableTreeHooks)zbreezy.bzr.smart.clientz_SmartClient.hooks�SmartClientHooks)zbreezy.bzr.smart.serverzSmartTCPServer.hooks�SmartServerHooks)z
breezy.statusr;�StatusHooks)zbreezy.transportzTransport.hooks�TransportHooks)z&breezy.version_info_formats.format_riozRioVersionInfoBuilder.hooks�RioVersionInfoBuilderHooks)zbreezy.merge_directivezBaseMergeDirective.hooks�MergeDirectiveHooksc�(�[R"U6$)z�Convert a known_hooks key to a object.

:param key: A tuple (module_name, member_name) as found in the keys of
    the known_hooks registry.
:return: The object this specifies.
)r.r0)r*s r�known_hooks_key_to_objectrHos���#�#�S�)�)rc�V�\rSrSrSrSSjrSSjrSrSrSr	S	r
S
rSrSr
S
rg)r5�yz�A dictionary mapping hook name to a list of callables.

e.g. ['FOO'] Is the list of items to be called when the
FOO hook is triggered.
Nc�b�[RU5 0Ul0UlXlX lg)z�Create a new hooks dictionary.

:param module: The module from which this hooks dictionary should be loaded
    (used for lazy hooks)
:param member_name: Name under which this hooks dictionary should be loaded.
    (used for lazy hooks)
N)�dictr
�_callable_names�_lazy_callable_names�_module�_member_name)r�module�member_names   rr
�Hooks.__init__�s+��	
�
�
�d��!���$&��!���'�rc���X;a[R"U5eUR(a.[R	URUR
U4/5nOSn[
UUUUUS9nX`U'g)aAdd a hook point to this dictionary.

:param name: The name of the hook, for clients to use when registering.
:param doc: The docs for the hook.
:param introduced: When the hook was introduced (e.g. (0, 15)).
:param deprecated: When the hook was deprecated, None for
    not-deprecated.
N)�name�doc�
introduced�
deprecated�	callbacks)r�DuplicateKeyrO�_lazy_hooks�
setdefaultrP�	HookPoint)rrUrVrWrXrY�	hookpoints       r�add_hook�Hooks.add_hook�sp���<��%�%�d�+�+��<�<�#�.�.����t�0�0�$�7���I��I����!�!��
�	��T�
rc�\�[UR55n/nURRnUR	U5 UR	S[U5-5 UR	S5 UH&nXnUR	UR
55 M( SRU5$)zGenerate the documentation for this Hooks instance.

This introspects all the individual hooks and returns their docs as well.
�-��
)�sortedr(�	__class__r�append�len�docs�join)r�
hook_names�	hook_docsrUrrs      rri�
Hooks.docs�s���
�D�I�I�K�(�
��	��~�~�&�&�����������s�4�y��)������#�I��?�D����T�Y�Y�[�)�$��y�y��#�#rc��URRUS5nUc5Ub2URRURUR4S5nUcgU$)aGet the name for a_callable for UI display.

If no name has been registered, the string 'No hook name' is returned.
We use a fixed string rather than repr or the callables module because
the code names are rarely meaningful for end users and this is not
intended for debugging.
NzNo hook name)rM�getrNrr�r�
a_callablerUs   r�
get_hook_name�Hooks.get_hook_name�sa���#�#�'�'�
�D�9���<�J�2��,�,�0�0��&�&�
�(;�(;�<�d��D��<�!��rc� �XnURnU"X#U5 UbURX#U5 gg![a! [URRU5ef=f![
a" [R"URU5ef=f)a{Install a_callable in to the hook hook_name lazily, and label it.

:param hook_name: A hook name. See the __init__ method for the complete
    list of hooks.
:param callable_module: Name of the module in which the callable is
    present.
:param callable_member: Member name of the callable.
:param name: A name to associate the callable with, to show users what
    is running.
N)
�KeyErrorrrfr�	hook_lazy�AttributeErrorr�UnsupportedOperation�install_named_hook_lazy�name_hook_lazy)rr�callable_module�callable_memberrUrrvs       rry�Hooks.install_named_hook_lazy�s���	B��?�D�	>����I�
�o��=�������$�G����	B��d�n�n�5�5�y�A�A�	B���	R��-�-�d�.J�.J�D�Q�Q�	R�s�3�A!�+A�!,B
c��XnUR	U5 UbURX#5 gg![a! [URRU5ef=f![
a UR
X#5 Naf=f)a�Install a_callable in to the hook hook_name, and label it name.

:param hook_name: A hook name. See the __init__ method for the complete
    list of hooks.
:param a_callable: The callable to be invoked when the hook triggers.
    The exact signature will depend on the hook - see the __init__
    method for details on each hook.
:param name: A name to associate a_callable with, to show users what is
    running.
N)rurrfrrgrwr�	name_hook)rrrqrUrs     r�install_named_hook�Hooks.install_named_hook�s��	B��?�D�	(��K�K�
�#����N�N�:�,����	B��d�n�n�5�5�y�A�A�	B��
�	(��I�I�j�'�	(�s�.�A�+A�A:�9A:c���XnURnU"U5 g![a! [URRU5ef=f![
a" [R"URU5ef=f)zkUninstall named hooks.

:param hook_name: Hook point name
:param label: Label of the callable to uninstall
N)	rurrfr�	uninstallrwrrx�uninstall_named_hook)rr�labelrr�s     rr��Hooks.uninstall_named_hook�s|��	B��?�D�	����I�
�e����	B��d�n�n�5�5�y�A�A�	B���	O��-�-�d�.G�.G��N�N�	O�s��A
�+A�
,A6c� �X RU'g)z=Associate name with a_callable to show users what is running.N)rMrps   rr�Hooks.name_hooks��+/���Z�(rc�"�X0RX4'gr)rN)rr{r|�
callable_names    rrz�Hooks.name_hook_lazys��HU�!�!�?�"D�Er)rMrNrPrO�NNr)rrrr�__doc__r
r_rirrryr�r�rrzrrrrr5r5ys6���(��4$� �"H�4-�.�"0�Vrc�R�\rSrSrSrSSjrSrSrSrSr	S	r
S
rSrSr
S
rg)r]ianA single hook that clients can register to be called back when it fires.

Attributes:
  name: The name of the hook.
  doc: The docs for using the hook.
  introduced: A version tuple specifying what version the hook was
                  introduced in. None indicates an unknown version.
  deprecated: A version tuple specifying what version the hook was
                  deprecated or superseded in. None indicates that the hook
                  is not superseded or deprecated. If the hook is
                  superseded then the doc should describe the recommended
                  replacement hook to register for.
Nc�V�XlX lX0lX@lUc/UlgXPlg)aCreate a HookPoint.

:param name: The name of the hook, for clients to use when registering.
:param doc: The docs for the hook.
:param introduced: When the hook was introduced (e.g. (0, 15)).
:param deprecated: When the hook was deprecated, None for
    not-deprecated.
N)rUr�rWrX�
_callbacks)rrUrVrWrXrYs      rr
�HookPoint.__init__"s*���	���$��$���� �D�O�'�Orc�~�SSKn/nURUR5 URS[UR5-5 URS5 UR(a[UR5nOSnUR[
S5U-5 UR(a2[UR5nUR[
S5U-5 URS5 URURURSS	95 URS5 S
RU5$)zTGenerate the documentation for this HookPoint.

:return: A string terminated in \n.
�N�~rc�unknownzIntroduced in: %szDeprecated in: %sF)�break_long_wordsrd)�textwraprgrUrhrW�_format_version_tuple�gettextrX�extend�wrapr�rj)rr��strings�introduced_string�deprecated_strings     rri�HookPoint.docs4s���
	������t�y�y�!����s�S����^�+�,����r���?�?� 5�d�o�o� F�� )�����w�2�3�6G�G�H��?�?� 5�d�o�o� F���N�N�7�#6�7�:K�K�L����r�����x�}�}�T�\�\�E�}�J�K����r���y�y��!�!rc�l�[U[U55=(a URUR:H$r)�
isinstancer�__dict__)r�others  r�__eq__�HookPoint.__eq__Ls%���%��d��,�P����4�=�=�1P�Prc�h�[R"X5nURRXC45 g)a&Lazily register a callback to be called when this HookPoint fires.

:param callback_module: Module of the callable to use when this
    HookPoint fires.
:param callback_member: Member name of the callback.
:param callback_label: A label to show in the UI while this callback is
    processing.
N)r�_LazyObjectGetterr�rg)r�callback_module�callback_member�callback_label�
obj_getters     rrv�HookPoint.hook_lazyOs)���/�/��Q�
������
�;�<rc�h�[R"U5nURRX245 g)z�Register a callback to be called when this HookPoint fires.

:param callback: The callable to use when this HookPoint fires.
:param callback_label: A label to show in the UI while this callback is
    processing.
N)r�
_ObjectGetterr�rg)r�callbackr�r�s    rr�HookPoint.hook[s)���+�+�H�5�
������
�;�<rc���/nURHnUupEXQ:XdMURU5 M! U/:Xa[SRU55eUHnURR	U5 M  g)z`Uninstall the callback with the specified label.

:param label: Label of the entry to uninstall
zNo entry with label {!r}N)r�rgru�format�remove)rr��entries_to_remove�entry�entry_callback�entry_labels      rr��HookPoint.uninstallesq��
���_�_�E�,1�)�^��#�!�(�(��/�%���"��5�<�<�U�C�D�D�&�E��O�O�"�"�5�)�'rc�(�SUR5$)Nc3�F# �UHupUR5v� M g7fr)�get_obj)�.0r�rUs   r�	<genexpr>�%HookPoint.__iter__.<locals>.<genexpr>us���I��~�x�� � �"�"��s�!)r��rs r�__iter__�HookPoint.__iter__ts��I����I�Irc�,�[UR5$r)rhr�r�s r�__len__�HookPoint.__len__ws���4�?�?�#�#rc��/nURSR[U5R55 URUR5 URS5 UR
nUH`up4UR[
UR555 URS5 URU5 URS5 Mb [U5S:XaSUS'URS5 S	RU5$)
Nz<{}(z), callbacks=[�(z),r�)���z]>rc)
rgr�rrrUr��reprr�rhrj)rr�rYr��
callback_names     r�__repr__�HookPoint.__repr__zs��������v�}�}�T�$�Z�%8�%8�9�:����t�y�y�!����'�(��O�O�	�'0�#�H��N�N�4�� 0� 0� 2�3�4��N�N�3���N�N�=�)��N�N�4� �	(1�
�y�>�Q���G�B�K����t���w�w�w��r)r�r�rXrWrUr�)rrrrr�r
rir�rvrr�r�r�r�rrrrr]r]s6���(�$"�0Q�
=�=�
*�J�$� rr]a�
Hooks
=====

Introduction
------------

A hook of type *xxx* of class *yyy* needs to be registered using::

  yyy.hooks.install_named_hook("xxx", ...)

See :doc:`Using hooks<../user-guide/hooks>` in the User Guide for examples.

The class that contains each hook is given before the hooks it supplies. For
instance, BranchHooks as the class is the hooks class for
`breezy.branch.Branch.hooks`.

Each description also indicates whether the hook runs on the client (the
machine where bzr was invoked) or the server (the machine addressed by
the branch URL).  These may be, but are not necessarily, the same machine.

Plugins (including hooks) are run on the server if all of these is true:

  * The connection is via a smart server (accessed with a URL starting with
    "bzr://", "bzr+ssh://" or "bzr+http://", or accessed via a "http://"
    URL when a smart server is available via HTTP).

  * The hook is either server specific or part of general infrastructure rather
    than client specific code (such as commit).

c���[/n[[R55H-n[	U5nURUR
55 M/ SRU5$)Nrd)�_help_prefixre�known_hooksr(rHrgrirj)�topic�segments�hook_keyr;s    r�hooks_help_textr��sN���~�H��;�+�+�-�.��)�(�3������
�
��%�/��9�9�X��rr[c��XU4n[R"U5n[RU/5R	Xd45 g)aMInstall a callable in to a hook lazily, and label it name.

:param hookpoints_module: Module name of the hook points.
:param hookpoints_name: Name of the hook points.
:param hook_name: A hook name.
:param callable: a callable to call for the hook.
:param name: A name to associate a_callable with, to show users what is
    running.
N)rr�r[r\rg)�hookpoints_module�hookpoints_namerrqrUr*r�s       r�install_lazy_named_hookr��s<���y�
9�C��'�'�
�3�J����3��#�*�*�J�+=�>rN)�
__docformat__rcrrr�globalsrr�Registry�strr�_builtin_known_hooksr��_hook_module�_hook_attribute�_hook_classr%rHrLr5r]r�r�r[�tuple�listr��__annotations__r�rrr�<module>r�s��"��
�'��$���I��	��&�/�/��#I��*�*�3��<�8�#I�L��,!�"��2F�.�L�/�;��"�"�<��+�N�3G��,���*�WV�D�WV�tu �u �p��B�UW��T�%��S�#�
�&��U�8�3I�3I�3�3N�-O�(P�P�
Q�V�?r

Youez - 2016 - github.com/yon3zu
LinuXploit