403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.208
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/lib/python3/dist-packages/breezy/bzr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��g�$��t�SrSSKJr SSKJrJrJr SSKJr "SS5r"SS	\5r	"S
S\	5r
g)
a�Testament - a summary of a revision for signing.

A testament can be defined as "something that serves as tangible
proof or evidence."  In bzr we use them to allow people to certify
particular revisions as authentic.

The goal is that if two revisions are semantically equal, then they will
have a byte-for-byte equal testament.  We can define different versions of
"semantically equal" by using different testament classes; e.g. one that
includes or ignores file-ids.

We sign a testament rather than the revision XML itself for several reasons.
The most important is that the form in which the revision is stored
internally is designed for that purpose, and contains information which need
not be attested to by the signer.  For example the inventory contains the
last-changed revision for a file, but this is not necessarily something the
user cares to sign.

Having unnecessary fields signed makes the signatures brittle when the same
revision is stored in different branches or when the format is upgraded.

Handling upgrades is another motivation for using testaments separate from
the stored revision.  We would like to be able to compare a signature
generated from an old-format tree to newer tree, or vice versa.  This could
be done by comparing the revisions but that makes it unclear about exactly
what is being compared or not.

Different signing keys might indicate different levels of trust; we can in
the future extend this to allow signatures indicating not just that a
particular version is authentic but that it has other properties.

The signature can be applied to either the full testament or to just a
hash of it.

Testament format 1
~~~~~~~~~~~~~~~~~~

* timestamps are given as integers to avoid rounding errors
* parents given in lexicographical order
* indented-text form similar to log; intended to be human readable
* paths are given with forward slashes
* files are named using paths for ease of comparison/debugging
* the testament uses unix line-endings (\n)
�)�copy�)�contains_linebreaks�contains_whitespace�sha_strings)�Treec�z�\rSrSrSrSrSrSr\S5r	\S5r
SrS	rS
r
SrSrS
rSrSrSrSrg)�	Testament�Nz�Reduced summary of a revision.

Testaments can be

  - produced from a revision
  - written to a stream
  - loaded from a stream
  - compared to a revision
zbazaar-ng testament version 1
z!bazaar-ng testament short form 1
Fc�V�URU5nURU5nU"X45$)z3Produce a new testament from a historical revision.)�get_revision�
revision_tree)�cls�
repository�revision_id�rev�trees     �6/usr/lib/python3/dist-packages/breezy/bzr/testament.py�
from_revision�Testament.from_revision]s.���%�%�k�2���'�'��4���3�~��c�d�URRUR55nU"X!5$)z-Produce a new testament from a revision tree.)�_repositoryr
�get_revision_id)rrrs   r�from_revision_tree�Testament.from_revision_treeds-�����+�+�D�,@�,@�,B�C���3�~�rc�$�URUlURUlUR=(d SUlURUlURUlUR
SSUl[
U[5(d[S5eX l	[UR5Ul[UR5(a[UR5e[UR5(a[UR5eg)z*Create a new testament for rev using tree.rNz?As of bzr 2.4 Testament.__init__() takes a Revision and a Tree.)r�	committer�timezone�	timestamp�message�
parent_ids�
isinstancer�	TypeErrorrr�
properties�revpropsr�
ValueErrorr)�selfrrs   r�__init__�Testament.__init__js����?�?�����������)���
�������{�{����.�.��+����$��%�%��Q��
��	��S�^�^�,��
��t�/�/�0�0��T�-�-�.�.��t�~�~�.�.��T�^�^�,�,�/rc�x�/nURnU"UR5 U"SURRS5S35 U"SURS35 U"S[UR5S35 U"S[UR5S35 U"S5 [UR5HDn[U5(a[U5eU"SRURS555 MF U"S	5 URR5HnU"SRU55 M U"S
5 UR5HupVU"UR!XV55 M UR#UR%55 UVs/sHowR'S5PM sn$s snf)z�Yield text form as a sequence of lines.

The result is returned in utf-8, because it should be signed or
hashed in that encoding.
z
revision-id: �utf-8�
zcommitter: ztimestamp: z
timezone: z	parents:
z  {}
z	message:
zinventory:
)�append�long_headerr�decoder�intr r�sortedr"rr'�formatr!�
splitlines�_get_entries�_entry_to_line�extend�_revprops_to_lines�encode)r(�r�a�	parent_id�l�path�ie�lines        r�
as_text_lines�Testament.as_text_lines}sp��
��
�H�H��	�$�
�
��	�M�$�*�*�1�1�'�:�;�2�
>�?�	�K����'�r�
*�+�	�K��D�N�N�+�,�B�
/�0�	�J�s�4�=�=�)�*�"�
-�.�	�,������0�I�"�9�-�-� ��+�+�
�h�o�o�i�.�.�w�7�8�9�1�	
�,�����(�(�*�A�
�h�o�o�a� �!�+�	�.���)�)�+�H�D�
�d�!�!�$�+�,�,�	����(�(�*�+�12�3�����G�$��3�3��3s�F7c�V�SURRURS95$)Nc3�.# �UHupp4X4v� M
 g7f�N�)�.0r>�
file_class�kindr?s     r�	<genexpr>�)Testament._get_entries.<locals>.<genexpr>�s"���
�1�,��4��J�1�s�)�include_root)r�
list_filesrL�r(s rr5�Testament._get_entries�s2��
�04�	�	�0D�0D�!�.�.�1E�1�
�	
rc���[U5(a[U5e[U[5(dUR	S5nURSS5RSS5$)N�ascii�\�/� �\ �rr'r#�strr0�replace�r(r>s  r�_escape_path�Testament._escape_path�sQ���t�$�$��T�"�"��$��$�$��;�;�w�'�D��|�|�D�#�&�.�.�s�E�:�:rc��[UR5(a[UR5eSnSnURS:Xa9UR(d
[5eURR
S5nSnOHURS:Xa8UR(d
[5eURUR5nSnSRURURU5URR
S5UU5nU$)z.Turn an inventory entry into a testament line.��filerQrT�symlinkz  {} {} {}{}{}
�utf8)
r�file_idr'rI�	text_sha1�AssertionErrorr0�symlink_targetrZr3)r(r>r?�content�content_spacerr=s      rr6�Testament._entry_to_line�s����r�z�z�*�*��R�Z�Z�(�(�����
�7�7�f���<�<�$�&�&��l�l�)�)�'�2�G� �N�
�W�W�	�
!��$�$�$�&�&��'�'��(9�(9�:�G� �N��%�%��G�G����d�#��J�J���f�%���
���rc�@�SRUR55$)Nr)�joinrArNs r�as_text�Testament.as_text�s���x�x��*�*�,�-�-rc�x�URRS5SURUR54--$)z$Return short digest-based testament.rQsrevision-id: %s
sha1: %s
)�short_headerr9r�as_sha1rNs r�
as_short_text�Testament.as_short_text�s@��� � �'�'��0�3Q�����L�L�N�U
�4
�
�	
rc�n�UR(d/$S/n[URR55Hwup#[U5(a[	U5eURSR
U55 UR5H#nURSR
U55 M% My U$)zPack up revision properties.zproperties:
z  {}:
z    {}
)r&r2�itemsrr'r.r3r4)r(r:�name�valuer@s     rr8�Testament._revprops_to_lines�s����}�}��I�
���!�$�-�-�"5�"5�"7�8�K�D�"�4�(�(� ��&�&�
�H�H�Y�%�%�d�+�,��(�(�*������*�*�4�0�1�+�	9��rc�4�[UR55$rE)rrArNs rrn�Testament.as_sha1�s���4�-�-�/�0�0r)rr!r"rr&r rrN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r/rmrL�classmethodrrr)rAr5rZr6rjror8rn�__static_attributes__rFrrr
r
Nsk���4�K�7�L��L���������
-�&4�8
�;��6.�
��1rr
c�*�\rSrSrSrSrSrSrSrSr	g)	�StrictTestament��zDThis testament format is for use as a checksum in bundle format 0.8.z bazaar-ng testament version 2.1
z#bazaar-ng testament short form 2.1
Fc��[RXU5SSnUSURRS5--
nUSSS.UR-
nU$)N���rTr,z yes
z no
)TF)r
r6�revisionr0�
executable)r(r>r?r=s    rr6�StrictTestament._entry_to_line�sV���$�$�T��4�S�b�9��	�S�2�;�;�%�%�g�.�
.�.��	�H�W�
-�b�m�m�
<�<���rrFN)
rxryrzr{r|r/rmrLr6r~rFrrr�r��s��N�5�K�9�L��L�rr�c�*�\rSrSrSrSrSrSrSrSr	g)	�StrictTestament3��z�This testament format is for use as a checksum in bundle format 0.9+.

It differs from StrictTestament by including data about the tree root.
z"bazaar testament version 3 strict
z%bazaar testament short form 3 strict
Tc���[U5(a[U5e[U[5(dUR	S5nUS:XaSnURSS5RSS5$)NrQr]�.rRrSrTrUrVrYs  rrZ�StrictTestament3._escape_path�s]���t�$�$��T�"�"��$��$�$��;�;�w�'�D��2�:��D��|�|�D�#�&�.�.�s�E�:�:rrFN)
rxryrzr{r|r/rmrLrZr~rFrrr�r��s���
8�K�;�L��L�;rr�N)r|r�osutilsrrrrrr
r�r�rFrr�<module>r�s>��"+�n�K�K��N1�N1�b�i��;��;r

Youez - 2016 - github.com/yon3zu
LinuXploit