ROOTPLOIT
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: ws67150586 (67150586)
PHP: 8.3.36
Disabled: NONE
Upload Files
File: //kunden/kunden/kunden/lib/python3/dist-packages/mercurial/__pycache__/namespaces.cpython-313.pyc
�

6�h� ��^�SSKJr SSKJr SSKJrJrJr Sr"SS5r	"SS	5r
g
)�)�annotations�)�_)�	registrar�
templatekw�utilc��Uc/$U/$)z>
a convenience method to return an empty list instead of None
�)�vals �6/usr/lib/python3/dist-packages/mercurial/namespaces.py�tolistr
s���{��	��u��c�R�\rSrSrSrSrSrSrSrS
Sjr	S	r
\
rS
S
jrSr
Srg)�
namespaces�z�provides an interface to register and operate on multiple namespaces. See
the namespace class below for details on the namespace object.

rc�n�[R"5Ul[R"5nSnSnSn[SSUSUUUSS9nUR
U5 SnS	nS
n[SSUSUUUS
1SS9nUR
U5 Sn	Sn
Sn[SSUSU	U
USS9nUR
U5 g)Nc�6�URR5$�N)�
_bookmarks�keys��repos r�<lambda>�%namespaces.__init__.<locals>.<lambda>#s����� 4� 4� 6rc�J�[URRU55$r)r
r�get�r�names  rrr$s���t���/B�/B�4�/H�(Irc�$�URU5$r)�
nodebookmarks�r�nodes  rrr%s���(:�(:�4�(@rs	bookmarkssbookmarkT)�templatename�logfmt�	listnames�namemap�nodemap�builtinc�X�UR5VVs/sHupUPM	 snn$s snnfr)�tagslist)r�t�ns   rrr1s��t�}�}�� ?��t�q��� ?�� ?s�&c�^�[URRRU55$r)r
�
_tagscache�tagsrrs  rrr2s���t���/C�/C�/G�/G��/M�(Nrc�$�URU5$r)�nodetagsr!s  rrr3s
���
�
�d�(;rstagsstagstip)r#r$r%r&r'�
deprecatedr(c�>�UR5R5$r)�	branchmaprrs rrr@s��d�n�n�.�3�3�5rc�8�[URUS55$)NT)r
�	branchtiprs  rrrAs��f�T�^�^�D�$�-G�&Hrc�(�XR5/$r)�branchr!s  rrrBs��t�z�'8�'8�':�&;rsbranchessbranch)r�sortdict�_namesr�
getlogcolumns�	namespace�addnamespace)�self�columns�bmknames�
bmknamemap�
bmknodemapr,�tagnames�
tagnamemap�
tagnodemap�bnames�bnamemap�bnodemaps            r�__init__�namespaces.__init__s����m�m�o����*�*�,��7��I�
�@�
���$��;�'�����
��	
���!��?��N�
�;�
�����6�?�����x��	
��	
���!��5��H��;����"��9�%�����
��	
���!�rc� �URU$)zreturns the namespace object�r:)r>r<s  r�__getitem__�namespaces.__getitem__Ns���{�{�9�%�%rc�6�URR5$r)r:�__iter__�r>s rrP�namespaces.__iter__Rs���{�{�#�#�%�%rNc�8�URRX5$r)r:r)r>r<�defaults   rr�namespaces.getUs���{�{���y�2�2rc�6�URR5$r)r:�itemsrQs rrW�namespaces.itemsXs���{�{� � �"�"rc�L^�Ub(URRUTRT5 OTURTR'TR[R;aA[
R"[R5nU"TRSS1S9U4Sj5ngg)z�register a namespace

namespace: the name to be registered (in plural form)
order: optional argument to specify the order of namespaces
       (e.g. 'branches' should be listed before 'bookmarks')

Nsreposctx)�requiresc�F>�[R"XTR5$r)r�	shownamesr)�context�mappingr<s  �r�
generatekw�+namespaces.addnamespace.<locals>.generatekwns���!�+�+�G�i�n�n�M�Mr)r:�insertrr�keywordsr�templatekeyword)r>r<�orderrcr_s `   rr=�namespaces.addnamespace]s�������K�K���u�i�n�n�i�@�*3�D�K�K�	���'��>�>��!4�!4�4�'�7�7�
�8K�8K�L�O�
�Y�^�^�w��6G�
H�
N�I�
N�	5rc��URR5H!up4URX5nU(dMUs $ [[	S5U-5e)z�
Return the 'best' node for the given name. What's best is defined
by the namespace's singlenode() function. The first match returned by
a namespace in the defined precedence order is used.

Raises a KeyError if there is no such node.
sno such name: %s)r:rW�
singlenode�KeyErrorr)r>rr�ns�vr,s      rrg�namespaces.singlenodersM���[�[�&�&�(�E�B����T�(�A��q���)��q�,�-��4�5�5rrLr)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�_names_versionrIrMrPrrW�	iteritemsr=rg�__static_attributes__r
rrrrs:���
�N�/�b&�&�3�#��I�N�*6rrc�H�\rSrSrSrS	SjrSrSrSrSr	g)
r<�a�provides an interface to a namespace

Namespaces are basically generic many-to-many mapping between some
(namespaced) names and nodes. The goal here is to control the pollution of
jamming things into tags or bookmarks (in extension-land) and to simplify
internal bits of mercurial: log output, tab completion, etc.

More precisely, we define a mapping of names to nodes, and a mapping from
nodes to names. Each mapping returns a list.

Furthermore, each name mapping will be passed a name to lookup which might
not be in its domain. In this case, each method should return an empty list
and not raise an error.

This namespace object will define the properties we need:
  'name': the namespace (plural form)
  'templatename': name to use for templating (usually the singular form
                  of the plural namespace name)
  'listnames': list of all names in the namespace (usually the keys of a
               dictionary)
  'namemap': function that takes a name and returns a list of nodes
  'nodemap': function that takes a node and returns a list of names
  'deprecated': set of names to be masked for ordinary use
  'builtin': bool indicating if this namespace is supported by core
             Mercurial.
Nc��XlX lX0lX@lXPlX`lXplX�lU(aX�lURcURUlURcURUlURc&SUR-RS5S-UlU	c[5UlOX�lX�lg)a�create a namespace

name: the namespace to be registered (in plural form)
templatename: the name to use for templating
logname: the name to use for log output; if not specified templatename
         is used
colorname: the name to use for colored log output; if not specified
           logname is used
logfmt: the format to use for (i18n-ed) log output; if not specified
        it is composed from logname
listnames: function to list all names
namemap: function that inputs a name, output node(s)
nodemap: function that inputs a node, output name(s)
deprecated: set of names to be masked for ordinary use
builtin: whether namespace is implemented by core Mercurial
singlenode: function that inputs a name, output best node (or None)
Ns%s:�
s%s
)
rr#�logname�	colornamer$r%r&r'rg�ljust�setr2r()r>rr#rxryr$r%r&r'r2r(rgs            rrI�namespace.__init__�s���>�	�(����"����"�������(�O��<�<���,�,�D�L��>�>�!�!�\�\�D�N��;�;��!�D�L�L�0�7�7��;�g�E�D�K���!�e�D�O�(�O��rc�6�[URX55$)zSmethod that returns a (sorted) list of names in a namespace that
match a given node)�sortedr')r>rr"s   r�names�namespace.names�s���d�l�l�4�.�/�/rc�6�[URX55$)zMmethod that returns a list of nodes in a namespace that
match a given name.

)r~r&)r>rrs   r�nodes�namespace.nodes�s��
�d�l�l�4�.�/�/rc��^�URX5nU(aF[U5S:�a2URm[U4SjU55nTR	U5$US$g)z�returns the best node for the given name

By default, the best node is the node from nodes() with the highest
revision number. It can be overriden by the namespace.rc3�F># �UHnTRU5v� M g7fr)�rev)�.0r"�cls  �r�	<genexpr>�'namespace.singlenode.<locals>.<genexpr>�s����8�a�d�R�V�V�D�\�\�a�s�!rN)r&�len�	changelog�maxr")r>rrr,�maxrevr�s     @rrg�namespace.singlenode�sT���

�L�L��$����1�v��z��^�^���8�a�8�8���w�w�v��&��Q�4�K�r)r(ryr2r%r$rxrr&r'rgr#)
NNNNNNNNFN)
rlrmrnrorprIrr�rgrsr
rrr<r<�s<���<����������<�|0�
0�
rr<N)�
__future__r�i18nr�rrrr
rr<r
rr�<module>r�s3��"�����i6�i6�Xs�sr