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/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��gBW��<�SrSSKrSSKrSSKrSSKrSSKJr SSKJr SSK	J
r
 SSKJr \"\"5S5 SS	K
JrJrJrJr SS
K
Jr SSK
Jr SSKJrJrJrJrJrJr SS
KJr SrSdSjr SSSSSS.r!SeSjr"Sr#Sr$"SS5r%"SS5r&Sr'Sr(SfSjr)"SS\*5r+"S S!\%5r,SgS"jr-S#r.ShS$jr/S%r0S&r1S'r2ShS(jr3SiS)jr4S*r5SjS+jr6S,r7S-r8S.r9S/r:SjS0jr;S1r<S2r=S3r>S4r?S5r@S6rASkS7jrBSlS8jrC"S9S:5rD"S;S<5rES=rF"S>S?\E5rG"S@SA\E5rH"SBSC\E5rI"SDSE\E5rJSFrK"SGSH\R�5rM\M"5rN\NR�SI\HSJ5 \NR�SK\GSL5 \NR�SM\ISN5 \NR�SO\JSP5 SQrPSRrQSSrRSTrSSUrT\R�\U\\R�/\W\U44"5rX\XR�SV\RSW5 \XR�SX\SSY5 \XR�SZ\TS[5 SmS\jrYS]rZS^r[S_r\S`r]Sar^\R�\U\\_\U\U4/\_\U\U444"5r`Sbra\`R�Sc\a5 \?\>\7\;/rbg)na�Code to show logs of changes.

Various flavors of log can be produced:

* for one file, or the whole tree, and (not done yet) for
  files in a given directory

* in "verbose" mode with a description of what changed from one
  version to the next

* with files and revision-ids shown

Logs are actually written out through an abstract LogFormatter
interface, which allows for different preferred formats.  Plugins can
register formats too.

Logs can be produced in either forward (oldest->newest) or reverse
(newest->oldest) order.

Logs can be filtered to show only revisions matching a particular
search string, or within a particular range of revisions.  The range
can be given as date/times, which are reduced to revisions before
calling in here.

In verbose mode we show a summary of what changed in each particular
revision.  Note that this is the delta for changes in that revision
relative to its left-most parent, not the delta relative to the last
logged revision.  So for example if you ask for a verbose log of
changes touching hello.c you will get a list of those revisions also
listing other things that were changed in the same revision, but not
all the changes since the previous revision that touched hello.c.
�N)�BytesIO)�Callable)�warn�)�lazy_importz�

from breezy import (
    config,
    controldir,
    diff,
    foreign,
    lazy_regex,
    )
from breezy.i18n import gettext, ngettext
)�errors�registry�revisionspec�trace)�revision)�	transport)�format_date�,format_date_with_offset_in_original_timezone�get_diff_header_encoding�get_terminal_encoding�	is_inside�terminal_width)�	InterTreec#�4# �URU5nUR5n[URU/55n[	U5nUH�nURU5n	[R"X�5n
U
RU5nUbUcXxSU-4v� U	RU5nO[Uc
Ub
XxSU-4v� OKX�:wa'XxSRX�54v� U	RU5nOU	RU5nX�:wa	XxSU-4v� WnUnU	nUc gUS-nM� g7f)aEYield a description of revisions which affect the file.

Each returned element is (revno, revision_id, description)

This is the list of revisions where the file is either added,
modified, renamed or deleted.

TODO: Perhaps some way to limit this to only particular revisions,
or to traverse a non-mainline set of revisions?
Nzdeleted zadded zrenamed {} => {}z	modified r)
�get_file_verifier�	get_graph�list�iter_lefthand_ancestry�len�
revision_treer�get�find_source_path�format)
�
repository�
last_revision�	last_tree�	last_path�
last_verifier�graph�history�revno�revision_id�	this_tree�this_intertree�	this_path�
this_verifiers
             �,/usr/lib/python3/dist-packages/breezy/log.py�find_touching_revisionsr-Ys9����/�/�	�:�M�� � �"�E��5�/�/�
�r�B�C�G���L�E����,�,�[�9�	�"���y�<��"�3�3�I�>�	�� �Y�%6��j�9�&<�<�<�%�7�7�	�B�M�
�
�9�#8��h��&:�:�:�
�
#��'9�'@�'@��'V�W�W�%�7�7�	�B�M�%�7�7�	�B�M��-��+�	�*A�A�A�%�
��	��	����
��
��3�s�DDF�reversec		��U(aSn	OSn	U(aSn
OSn
[U[5(a[R"X5n[U[5(a[R"X5nUb0URS:Xa [R"UR5e[UUUUU	U
S9n[X5RU5 g![R
[R4a [R"U5ef=f![R
[R4a [R"U5ef=f)a�Write out human-readable log of commits to this branch.

This function is being retained for backwards compatibility but
should not be extended with new parameters. Use the new Logger class
instead, eg. Logger(branch, rqst).show(lf), adding parameters to the
make_log_request_dict function.

:param lf: The LogFormatter object showing the output.

:param verbose: If True show added/changed/deleted/renamed files.

:param direction: 'reverse' (default) is latest to earliest; 'forward' is
    earliest to latest.

:param start_revision: If not None, only show revisions >= start_revision

:param end_revision: If not None, only show revisions <= end_revision

:param limit: If set, shows only 'limit' revisions, all revisions are shown
    if None or 0.

:param show_diff: If True, output a diff after each revision.

:param match: Dictionary of search lists to use when matching revision
  properties.
�fullNr)�	direction�start_revision�end_revision�limit�
delta_type�	diff_type)�
isinstance�intr
�RevisionInfor�NoSuchRevision�RevnoOutOfBounds�InvalidRevisionNumberr&�make_log_request_dict�Logger�show)�branch�lf�verboser1r2r3r4�	show_diff�matchr5r6�rqsts            r,�show_logrF�s)��J��
��
���	��	��.�#�&�&�	?�)�6�6�v�N�N��,��$�$�	=�'�4�4�V�J�L���L�$6�$6�!�$;��*�*�<�+=�+=�>�>�!��%�!����
�D��6����b�!��+�%�%�v�'>�'>�?�	?��.�.�~�>�>�	?���%�%�v�'>�'>�?�	=��.�.�|�<�<�	=�s�C
�D�
;D�;ET)r1�levels�
generate_tags�exclude_common_ancestry�_match_using_deltasc��U(a.U(a"SU;aUSRU5 OU/US'OSU/0nUUUUUUUUU	UU
UUU
S.$)a�Convenience function for making a logging request dictionary.

    Using this function may make code slightly safer by ensuring
    parameters have the correct names. It also provides a reference
    point for documenting the supported parameters.

    :param direction: 'reverse' (default) is latest to earliest;
      'forward' is earliest to latest.

    :param specific_files: If not None, only include revisions
      affecting the specified files, rather than all revisions.

    :param start_revision: If not None, only generate
      revisions >= start_revision

    :param end_revision: If not None, only generate
      revisions <= end_revision

    :param limit: If set, generate only 'limit' revisions, all revisions
      are shown if None or 0.

    :param message_search: If not None, only include revisions with
      matching commit messages

    :param levels: the number of levels of revisions to
      generate; 1 for just the mainline; 0 for all levels, or None for
      a sensible default.

    :param generate_tags: If True, include tags for matched revisions.
`
    :param delta_type: Either 'full', 'partial' or None.
      'full' means generate the complete delta - adds/deletes/modifies/etc;
      'partial' means filter the delta using specific_files;
      None means do not generate any delta.

    :param diff_type: Either 'full', 'partial' or None.
      'full' means generate the complete diff - adds/deletes/modifies/etc;
      'partial' means filter the diff using specific_files;
      None means do not generate any diff.

    :param _match_using_deltas: a private parameter controlling the
      algorithm used for matching specific_files. This parameter
      may be removed in the future so breezy client code should NOT
      use it.

    :param exclude_common_ancestry: Whether -rX..Y should be interpreted as a
      range operator or as a graph difference.

    :param signature: show digital signature information

    :param match: Dictionary of list of search strings to use when filtering
      revisions. Keys can be 'message', 'author', 'committer', 'bugs' or
      the empty string to match any of the preceding properties.

    :param omit_merges: If True, commits with more than one parent are
      omitted.

�message)r1�specific_filesr2r3r4rGrHr5r6rI�	signaturerD�omit_mergesrJ)�append)r1rMr2r3r4�message_searchrGrHr5r6rJrIrDrNrOs               r,r=r=�st��X���E�!��i� �'�'��7�$2�#3��i� ��� 0�1�E��(�(�$���&� ��#:���"�2���c�^�[R5nU(aURU5 U$)z-Apply default values to a request dictionary.)�_DEFAULT_REQUEST_PARAMS�copy�update)rE�results  r,�_apply_log_request_defaultsrX?s$��
$�
)�
)�
+�F���
�
�d���MrRc�@�SSKJn URUR55nURRX5nUSUR:XaSUS3$USUR:XaSUS3$USUR:XagUSUR:Xagg)	z�Get the signature validity.

:param rev_id: revision id to validate
:param branch: branch of revision
:return: human readable string to print to log
r)�gpgzvalid signature from rzunknown key zinvalid signature!zno signatureN)
�breezyrZ�GPGStrategy�get_config_stackr�verify_revision_signature�SIGNATURE_VALID�SIGNATURE_KEY_MISSING�SIGNATURE_NOT_VALID�SIGNATURE_NOT_SIGNED)�rev_idr@rZ�gpg_strategyrWs     r,�format_signature_validityreGs�����?�?�6�#:�#:�#<�=�L�
�
�
�
8�
8��
N�F�
�a�y�C�'�'�'�&�v�a�y�k�2�2�
�a�y�C�-�-�-��f�Q�i�[�)�)�
�a�y�C�+�+�+�#�
�a�y�C�,�,�,��-rRc��\rSrSrSrSrSrg)�LogGeneratori\zA generator of log revisions.c�,�[UR5e)�VIterate over LogRevision objects.

:return: An iterator yielding LogRevision objects.
)�NotImplementedError�iter_log_revisions��selfs r,rk�LogGenerator.iter_log_revisions_s��
"�$�"9�"9�:�:rR�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rk�__static_attributes__rorRr,rgrg\s
��'�;rRrgc�0�\rSrSrSrSrSrSrSrSr	g)	r>igz5An object that generates, formats and displays a log.c�0�Xl[U5Ulg)z�Create a Logger.

:param branch: the branch to log
:param rqst: A dictionary specifying the query parameters.
  See make_log_request_dict() for supported values.
N)r@rXrE�rmr@rEs   r,�__init__�Logger.__init__js����/��5��	rRc�r�[U[5(d[SRU5SS9 URR5 [
USS5(aUR5 URU5 [
USS5(aUR5 SSS5 g!,(df   g=f)zLDisplay the log.

:param lf: The LogFormatter object to send the output to.
z!not a LogFormatter instance: {!r}�)�
stacklevel�	begin_logN�end_log)
r7�LogFormatterrrr@�	lock_read�getattrr~�
_show_bodyr)rmrAs  r,r?�Logger.showts��
�"�l�+�+��4�;�;�B�?�A�N�
�[�[�
"�
"�
$��r�;��-�-������O�O�B���r�9�d�+�+��
�
��%�
$�
$�s
�	AB(�(
B6c�L�URnUSbUR5US:�aUR5US'[USS5(dSUS'[USS5(dSUS'[USS5(dSUS	'[US
S5(dSUS'URURU5nUR5HnUR
U5 M UR5 g![Ra  [R"[S55ef=f)
zAShow the main log output.

Subclasses may wish to override this.
rGN�
supports_tagsFrH�supports_deltar5�
supports_diffr6�supports_signaturesrNz!Further revision history missing.)rE�
get_levelsr��_generator_factoryr@rk�log_revisionr�GhostRevisionUnusableHere�CommandError�gettext�show_advice)rmrArE�	generator�lrs     r,r��Logger._show_body�s���y�y����>�!�R�]�]�_�t�H�~�%E��]�]�_�D��N��r�?�E�2�2�$)�D��!��r�+�U�3�3�!%�D����r�?�E�2�2� $�D����r�0�%�8�8� %�D����+�+�D�K�K��>�	�	T��2�2�4������#�5�	������/�/�	T��%�%�g�.Q�&R�S�S�	T�s�6(C/�/4D#c��[U40UD6$)zLMake the LogGenerator object to use.

Subclasses may wish to override this.
)�_DefaultLogGeneratorrxs   r,r��Logger._generator_factory�s��
$�F�3�d�3�3rR)r@rEN)
rprqrrrsrtryr?r�r�rurorRr,r>r>gs��?�6�
��<4rRr>c		��[UUUUSUS9n	[U	[5(d[U	5n	[XX�S:gS9n	[	X	X5$)NT)�generate_merge_revisionsrIr)�include_merges)�_calc_view_revisionsr7r�_filter_revisions_touching_path�make_log_rev_iterator)
r@r5rDrG�path�start_rev_id�
end_rev_idr1rI�view_revisionss
          r,�+_log_revision_iterator_using_per_file_graphr��s[��*�����!%� 7�
�N��n�d�+�+��n�-��4��n�q�[��N�!���K�KrRc

��US:gn
U(+=(a U	=(d U=(d Un[UUUUU
UUS9n[UUUUUUS9$)Nr)r��delayed_graph_generationrI)�filesr1)r�r�)
r@r5rDrGrMr�r�r1rIr4r�r�r�s
             r,�+_log_revision_iterator_using_delta_matchingr��sm�� &��{��#1�1� �
�+��+���*�����!9�!9� 7��N�!����
���
�rRc
�z�URn[UR5S:Xa[RnOURSnURU5nURUR5nUS:XaUbUnOSn[5n	[5n
[RUUU	USSU
S9 U	R5$)z�Format a diff.

:param branch: Branch object
:param rev: Revision object
:param diff_type: Type of diff to generate
:param files: List of files to generate diff for (or None for all)
r�partialN�)�	old_label�	new_label�
path_encoding)rr�
parent_ids�
_mod_revision�
NULL_REVISIONrr'rr�diff�show_diff_trees�getvalue)r@�revr6r��repo�ancestor_id�tree_1�tree_2rM�sr�s           r,�_format_diffr��s������D�
�3�>�>��a��#�1�1���n�n�Q�'��
�
�
��
,�F�
�
�
����
0�F��I��%�"3������	�A�,�.�M������	����#���
�:�:�<�rRc��\rSrSrSrSrg)�_StartNotLinearAncestorizDRaised when a start revision is not found walking left-hand history.roN)rprqrrrsrtrurorRr,r�r�s��NrRr�c�L�\rSrSrSrSSjrSrSrSrg)	r�iz'The default generator of log revisions.Nc�4�XlX lX0lX@lXPlUUlXplX�lX�lX�l	X�l
X�lX�lX�l
U(a5UR5(a URR!5Ulg0Ulg�N)r@rGr4r6r5�show_signaturerOrMrDr2r3r1rIrJr��tags�get_reverse_tag_dict�rev_tag_dict)rmr@rGr4r6r5r�rOrHrMrDr2r3r1rIrJrNs                 r,ry�_DefaultLogGenerator.__init__s���&�����
�"��$��'���&��,���
�,��(��"��'>�$�#6� ��V�1�1�3�3� &��� @� @� B�D�� "�D�rRc#�# �SnUR5nUGH9nUGH.uupEpgnURS:waUbX`R:�aM.UR(a[UR5S:�aMZUc[
R"U5eURcSn	O+[URXpRUR5n	UR(a[X@R5n
OSn
[UUUUURRU5U	U
5v� UR (dGMUS-
nXR :�dGM.  g GM< g7f)rirNr)�_create_log_revision_iteratorrGrOrr�rr�r6r�r@rMr�re�LogRevisionr�rr4)rm�	log_count�revision_iterator�revsrcr&�merge_depthr��deltar�rNs           r,rk�'_DefaultLogGenerator.iter_log_revisions;s.���
�	� �>�>�@��%�D�<@�8�,���5��K�K�1�$�#�/�#�{�{�2���#�#��C�N�N�(;�a�(?���;� �:�:�6�B�B��>�>�)��D�'����S�.�.�$�:M�:M��D��&�&� 9�&�+�+� N�I� $�I�!������%�%�)�)�&�1������:�:�:���N�I� �J�J�.��E=A�&�s�D-E�4E�Ec
�`�[URURUR5upUR(ab[URURURURURUUURURURS9
$[UR5nUS:wa[R"SUS35e[!URURURURURSUUURURS9	$)zxCreate a revision iterator for log.

:return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
    delta).
)	r5rDrGrMr�r�r1rIr4rz9illegal LogRequest: must match-using-deltas when logging z filesr)r5rDrGr�r�r�r1rI)�_get_revision_limitsr@r2r3rJr�r5rDrGrMr1rIr4rr�BzrErrorr�)rmr�r��
file_counts    r,r��2_DefaultLogGenerator._create_log_revision_iteratorgs��$8��K�K��,�,�d�.?�.?�$
� ���#�#�>�����?�?��j�j��{�{�#�2�2�)�%��.�.�(,�(D�(D��j�j��
� �T�0�0�1�J��Q���o�o�$�$.�<�v�7���?�����?�?��j�j��{�{��(�(��+�)�%��.�.�(,�(D�(D�
�

rR)rJr@r5r6r1r3rIrGr4rDrOr�r�rMr2)NNNNNNNNNNNNNNN)	rprqrrrsrtryrkr�rurorRr,r�r�sE��1�
������������ $� ��#$#�L*�X*rRr�c��U(a$X:Xa[R"[S55eUS;a[[S5U-5eUR	5nU[
R:Xa/$U(a6X:Xa1U(a[X5(d[XXpR55$U(dI[UUUUS9nUS:XdU(a[XU5(d[U5nUS:Xa[U5nU$[UUUUUU5nUS:Xa[![#[U555nU$![a NAf=f)z�Calculate the revisions to view.

:return: An iterator of (revision_id, dotted_revno, merge_depth) tuples OR
         a list of the same tuples.
z:--exclude-common-ancestry requires two different revisions)r.�forwardzinvalid direction %r)rIr�)rr�r��
ValueErrorr r�r��_has_merges�_generate_one_revisionr&�_linear_view_revisions�_is_obvious_ancestorr�reversedr��_generate_all_revisions�_rebase_merge_depth�reverse_by_depth)	r@r�r�r1r�r�rI�	br_rev_id�	iter_revss	         r,r�r��sH���<�#=��!�!��P�Q�
�	
��.�.���!7�8�9�D�E�E��$�$�&�I��M�/�/�/��	�	��&�)��V�1P�1P�&�f�)�\�\�^�T�T�#�	�.����(?�	�I��I�%��,�V�:�N�N� ��O�	��I�%�$�Y�/�	���
(����� ��
�I��I��'�(8��i��(I�J�	����'�	�
�	�s�4AD1�1
D>�=D>c�6�X:XaX#S4/$[X5nXS4/$�Nr)�_compute_revno_str)r@rcr��br_revno�	revno_strs     r,r�r��s.��
���a�(�)�)�&�v�6�	��A�&�'�'rRc���/nU(a}[XX%5Hjupxn	[X5(aAURR5n
Ub U
R	X5(d
[5eUn OUR
XxU	45 Ml U$[R"[U5[UUUUS:HUS95nU$![
a  [R"[S55ef=f)Nz4Start revision not found in history of end revision.r.)�rebase_initial_depthsrI)r�r�rr�is_ancestorr�rPrr�r��	itertools�chain�iter�_graph_view_revisions)r@r�r�r1r�rI�initial_revisionsrcr&�depthr$r�s            r,r�r��s�����!	�(>��j�)�$��u��v�.�.�#�-�-�7�7�9�E�#�/��8I�8I�$�9�9�6�7�7�"(�J��%�,�,�f�U�-C�D�/)�4)�(� �_�_��
������#,�	�#9�$;�	
�	�N����3'�	��%�%��N�O��
�	�s�A"B7�.B7�7*C!c�v�URRU/5RU/5n[U5S:�$)z-Does a revision have multiple parents or not?r)r�get_parent_maprr)r@rc�parentss   r,r�r�)s6�����.�.��x�8�<�<�V�R�H�G��w�<�!��rRc��URU5nSRSU55$![Ra gf=f)zCompute the revno string from a rev_id.

:return: The revno string, or None if the revision is not in the supplied
    branch.
�.c3�8# �UHn[U5v� M g7fr�)�str)�.0�ns  r,�	<genexpr>�%_compute_revno_str.<locals>.<genexpr>;s���.��1��A����s�N)�revision_id_to_dotted_revno�joinrr:)r@rcr&s   r,r�r�/sH��/��2�2�6�:��
�x�x�.��.�.�.��	� � ����s�+�A�Ac�X�U(a�U(a�URU5nURU5n[U5S:Xa[U5S:XaUSUS:*$[U5S:Xa&[U5S:XaUSSUSS:XaUSUS:*$gg![Ra gf=f)z2Is start_rev_id an obvious ancestor of end_rev_id?Frr�r|T)r�rr:r)r@r�r��start_dotted�
end_dotteds     r,r�r�>s����
�	�!�=�=�l�K�L��;�;�J�G�J��|���!�c�*�o��&:���?�j��m�3�3�����"��J��1�$��Q�q�!�Z��!�_�4� ��?�j��m�3�3����%�$�$�	��	�s�"B�B)�(B)c#�&# �URnUR5nUc�Uc�URR5(d([R5R
S5(aUR5upgUnOUR5nSnURU[R45n	[U	5n
X�b[U5OSS4v� UbUS-nM*UR5nUcUnUSLnURU[R45n	[U	5n
['X
5n
U(dX�:XaU(dX�S4v� SnO	X�S4v� M<U(d
[)5eg![Ra UR5nSnN�f=f![R anUR"SS4v� SnAgSnAf[$a gf=f![$a M�[R anUR"SS4v� SnAM�SnAff=f7f)a�Calculate a sequence of revisions to view, newest to oldest.

:param start_rev_id: the lower revision-id
:param end_rev_id: the upper revision-id
:param exclude_common_ancestry: Whether the start_rev_id should be part of
    the iterated revisions.
:return: An iterator of (revision_id, dotted_revno, merge_depth) tuples.
    dotted_revno will be None for ghosts
:raises _StartNotLinearAncestor: if a start_rev_id is specified but
    is not found walking the left-hand history
N�calculate_revnosTrr)rr�_format�stores_revno�config�GlobalStackr�last_revision_infor�GhostRevisionsHaveNoRevnor rr�r��nextr��RevisionNotPresentr'�
StopIterationr�r�)r@r�r�rIr�r$r�r��	cur_revno�
graph_iterr'�e�found_startr�s              r,r�r�Ys$������D��N�N��E���
� 2��>�>�&�&�(�(�F�,>�,>�,@�,D�,D��-
�-
�
%�&,�&?�&?�&A�#��
%�	��,�,�.�I��I��1�1��
�3�3�5�
�
��
#�"�:�.��"�5J�3�y�>�PT�VW�W�W��(���N�I���(�(�*�	���"�J�"�d�*���1�1���4�4�6�
�
��
4�"�:�.��/�v�C�	�"�{�'B�2�)�a�7�7�"&�K��%�!�3�3�#�$�)�+�+���g�3�3�
!�"�0�0�2�	� �	�
!���,�,�
��m�m�T�4�/�/��� �
��
��"!�
���,�,�
��m�m�T�4�/�/���
�s��A*H�-E)�?7H�7F�AH�G�'AH�)&F�H�F�H�G�)F?�:H�?
G�H�G�H�
H�H�H�2H	�H�	H�Hc#�F# �U(aSnOSnURX!US9nU(d1UH*upxp�USR[[U	55U4v� M, gSnUHAupxp�UcUnU(aX�:aUnX�-nUSR[[U	55U4v� MC g7f)aTCalculate revisions to view including merges, newest to oldest.

:param branch: the branch
:param start_rev_id: the lower revision-id
:param end_rev_id: the upper revision-id
:param rebase_initial_depth: should depths be rebased until a mainline
  revision is found?
:return: An iterator of (revision_id, dotted_revno, merge_depth) tuples.
z#with-merges-without-common-ancestryzwith-merges)�start_revision_id�stop_revision_id�	stop_ruler�N)�iter_merge_sorted_revisionsr��mapr�)r@r�r�r�rIrr�rcr�r&�
_end_of_merge�depth_adjustments            r,r�r��s���� �9�	�!�	��7�7�$�y�8��N�!�9G�5�F���#�(�(�3�s�E�?�3�[�@�@�:H� ��9G�5�F���'�#.� ���1�
(3�$��/���#�(�(�3�s�E�?�3�[�@�@�:H�s�BB!c
���U(a_USS(aRUSS(aE[UVVVs/sHupo3PM	 snnn5nUS:waUVVVs/sHupo1X#U-
4PM nnnnU$s snnnfs snnnf)z,Adjust depths upwards so the top level is 0.rr|���)�min)r��rr��d�	min_depths     r,r�r��sp���.��+�A�.�>�"�3E�a�3H��.�9�.�w�q�Q��.�9�:�	���>�CQ�R�>���a�!��]�3�>�N�R����:��Rs�A)�A0c	�^�[T[5(a/S/[T5-n[[[	TXf55/5nOU4Sjn[U"5/5n[
H"n	U	[:XaU	"XX7XE5nMU	"XX75nM$ U$)aCreate a revision iterator for log.

:param branch: The branch being logged.
:param view_revisions: The revisions being viewed.
:param generate_delta: Whether to generate a delta for each revision.
  Permitted values are None, 'full' and 'partial'.
:param search: A user text search string.
:param files: If non empty, only revisions matching one or more of
  the files are to be kept.
:param direction: the direction in which view_revisions is sorted
:return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
    delta).
Nc3�.># �TH
nUSS4v� M g7fr�ro)�viewr�s �r,�_convert�'make_log_rev_iterator.<locals>._convert�s����&���T�4�(�(�'�s�)r7rrr��zip�log_adapters�_make_delta_filter)
r@r��generate_delta�searchr�r1�nones�log_rev_iteratorr�adapters
 `        r,r�r��s����$�.�$�'�'����^�,�,����c�.�%�&G�!H� I�J��	)� ����-�����(�(�&���%� �� '�v�v�X�� ��rRc
��U(dU$UR5VVVs/sH;upEXEVs/sH'n[RU[R5PM) sn4PM= nnnn[Xs5$s snfs snnnf)aZCreate a filtered iterator of log_rev_iterator matching on a regex.

:param branch: The branch being logged.
:param generate_delta: Whether to generate a delta for each revision.
:param match: A dictionary with properties as keys and lists of strings
    as values. To match, a revision may match any of the supplied strings
    within a single property but must match at least one string for each
    property.
:param log_rev_iterator: An input iterator containing all revisions that
    could be displayed, in lists.
:return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
    delta).
)�items�
lazy_regex�lazy_compile�re�
IGNORECASE�
_filter_re)r@r"rDr%�k�v�x�	search_res        r,�_make_search_filterr2st������K�K�M��!�D�A�
��B��1�Z�
$�
$�Q��
�
�
6��B�C�!����i�2�2��
C��s�A4�.A/�A4�/A4c	#�# �UH7nUVs/sHn[XS5(dMUPM nnU(dM3Uv� M9 gs snf7f�Nr)�
_match_filter)r1r%r�r��new_revss     r,r-r- s;��� ��#'�L�4�C�=���F�+K�C�4��L��8��N�!��L�s�
A�A�A�A�Ac�>�UR4UR4UR5[UR	55S.nUR5VVs/sH
o3HoDPM M snnUS'UH!upVXR;dM[
X%U5(aM! g gs snnf)N)rL�	committer�author�bugsr�FT)rLr8�get_apparent_authorsr�	iter_bugs�values�_match_any_filter)r1r��strings�
inner_list�itemr.r/s       r,r5r5's����K�K�>��m�m�%��+�+�-��S�]�]�_�%�	�G�+2�.�.�*:�R�*:�J�z�t�4�z�4�*:�R�G�B�K�����<� 1�'�*�a� @� @�����	Ss�Bc�.^�[U4SjU55$)Nc3�X># �UHnTHo!RU5v� M M! g7fr�)r#)r�rr�r?s   �r,r��$_match_any_filter.<locals>.<genexpr>6s!����9�C�q��A�x�x��{�{��{�C�s�'*)�any)r?�ress` r,r>r>5s����9�C�9�9�9rRc�P�U(d	U(dU$[URX1XE5$)a\Add revision deltas to a log iterator if needed.

:param branch: The branch being logged.
:param generate_delta: Whether to generate a delta for each revision.
  Permitted values are None, 'full' and 'partial'.
:param search: A user text search string.
:param log_rev_iterator: An input iterator containing all revisions that
    could be displayed, in lists.
:param files: If non empty, only revisions matching one or more of
  the files are to be kept.
:param direction: the direction in which view_revisions is sorted
:return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
    delta).
)�_generate_deltasr)r@r"r#r%r�r1s      r,r!r!9s*��"�%�������+�U��rRc#�# �USL=(a [U5S:�nU(a[U5nUS:XaSnOSnOSnUGH
nU(a	U(d gUV	s/sHo�SPM	 n
n	/nUS:XaGU(d@URU
5n[X�5Hup�UR	U	SU	SU
45 M! O�URX�S9n[X�5Hqup�U(aKU
bU
R5(dM&[
X�W5 UcSn
OUS:XaU	SSnURU5n
UR	U	SU	SU
45 Ms Uv� GM
 gs sn	f7f)	aBCreate deltas for each batch of revisions in log_rev_iterator.

If we're only generating deltas for the sake of filtering against
files, we stop generating deltas once all files reach the
appropriate life-cycle point. If we're receiving data newest to
oldest, then that life-cycle point is 'add', otherwise it's 'remove'.
Nrr.�add�removerr0)rM)r�set�get_revision_deltasrrP�has_changed�
_update_files�get_revision_delta)rr%r5r�r1�check_files�file_set�stop_onr�r��	revisionsr6�deltasr�rcs               r,rHrHQsY����t�#�6��E�
�Q��K���u�:���	�!��G��G��� ���x��'+�,�t���V�t�	�,��������3�3�I�>�F�!�$�/�
������Q���Q��� 7�8�0� �3�3�I�3�W�F�!�$�/�
����}�E�,=�,=�,?�,?� �%�e�w�?�%�-�$(�E�'�6�1�&)��V�A�Y�F�$.�$A�$A�&�$I�E�����Q���Q��� 7�8�%0�&��A!��
-�s�AE�E�$C/Ec
�@�US:XGaHURH6nURSU;dMURURS5 M8 URUR-H�nURSU;a<URURS5 URURS5 URSS:XdMg[U5Hnn[URSU5(dM#URU5 URURSU[URS5S-5 Mp M� gUS:XGaHURH6nURSU;dMURURS5 M8 URUR-H�nURSU;a<URURS5 URURS5 URSS:XdMg[U5Hnn[URSU5(dM#URU5 URURSU[URS5S-5 Mp M� gg)z�Update the set of files to search based on file lifecycle events.

:param files: a set of files to update
:param stop_on: either 'add' or 'remove' - take files out of the
  files set once their add or remove entry is detected respectively
rJrr�	directoryN�delete)�addedr�rK�copied�renamedrJ�kindrrr�removed)r�r�rSrAr�s     r,rOrO�s����%���K�K�D��y�y��|�u�$����T�Y�Y�q�\�*� ��L�L�5�=�=�0�D��y�y��|�u�$����T�Y�Y�q�\�*��	�	�$�)�)�A�,�'��y�y��|�{�*� ��K�D� ����1��t�4�4����T�*��	�	�$�)�)�A�,��c�$�)�)�A�,�6G�6I�1J�"J�K�(�1�
�H�	��M�M�D��y�y��|�u�$����T�Y�Y�q�\�*�"��L�L�5�=�=�0�D��y�y��|�u�$����T�Y�Y�q�\�*��	�	�$�)�)�A�,�'��y�y��|�{�*� ��K�D� ����1��t�4�4����T�*��	�	�$�)�)�A�,��c�$�)�)�A�,�6G�6I�1J�"J�K�(�1�	
rRc#�# �URnUH\nUVVs/sHun ovSPM
 nnn[URU55n	UV
s/sHo�SX�SSU
S4PM sn
v� M^ gs snnfs sn
f7f)a�Extract revision objects from the repository.

:param branch: The branch being logged.
:param generate_delta: Whether to generate a delta for each revision.
:param search: A user text search string.
:param log_rev_iterator: An input iterator containing all revisions that
    could be displayed, in lists.
:return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
    delta).
rr|N)r�dict�iter_revisions)r@r"r#r%rr�r�_�revision_idsrTr�s           r,�_make_revision_objectsrc�s�����"�"�J� ��26�7�$�J�D�!�Q�Q��$��7���2�2�<�@�A�	�AE�F��#�A��	�a�&��)�,�c�!�f�5��F�F�	!��7��F�s�A=�A2�!A=�A8�(A=c#��# �SnUHen[U5n[[U5U5VVs/sHupgUPM	 nnn[U5S:XaMIUv� [	[US-5S5nMX gs snnf7f)a�Group up a single large batch into smaller ones.

:param branch: The branch being logged.
:param generate_delta: Whether to generate a delta for each revision.
:param search: A user text search string.
:param log_rev_iterator: An input iterator containing all revisions that
    could be displayed, in lists.
:return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
    delta).
�	rg�?��N)r�r�rangerrr8)	r@r"r#r%�num�batchra�detail�steps	         r,�_make_batch_filterrl�sw����C�!���U����,/��c�
�E�,B�C�,B�y�q�F�,B�D�C��4�y�A�~���J��c�#��)�n�c�*�C��"��D�s�,A7�A1�;A7c�V�SnSnUbB[U[R5(d[U5eURnUR
nUcSnSnSnUbB[U[R5(d[U5eURnUR
nUR
5[R:wanU[R:XdU[R:Xa[R"[S55eUb$XF:�a[R"[S55eX54$)aGet and check revision limits.

:param branch: The branch containing the revisions.

:param start_revision: The first revision to be logged, as a RevisionInfo.

:param end_revision: The last revision to be logged, as a RevisionInfo

:return: (start_rev_id, end_rev_id) tuple.
Nr�Logging revision 0 is invalid.�3Start revision must be older than the end revision.)r7r
r9�	TypeErrorrcr&r r�r�rr�r�)r@r2r3r��start_revnor��	end_revnos       r,r�r��s���L��K��!��.�,�*C�*C�D�D��N�+�+�%�,�,��$�*�*�������J��I����,��(A�(A�B�B��N�+�+�!�(�(�
� �&�&�	�
�����!<�!<�<��M�7�7�7��]�8�8�8��%�%�g�.N�&O�P�P�� �[�%<��%�%��M�N��
�
�%�%rRc���UR5up4US:XagSnUcSnOT[U[R5(a"URnUR
=(d SnOUR
U5 UnSnUcUnOT[U[R5(a"URnUR
=(d UnOUR
U5 UnU[R:XdU[R:Xa[R"[S55eXh:�a[R"[S55eX�:agUn	0n
/nURR5nURU[R45H>n
X�:aX�U
'URU
5  O4X�::aX�U
'URU
5 U	S-n	M@ URS5 UR!5 X�XW4$)amGet the mainline revisions from the branch.

Generates the list of mainline revisions for the branch.

:param  branch: The branch containing the revisions.

:param  start_revision: The first revision to be logged.
        For backwards compatibility this may be a mainline integer revno,
        but for merge revision support a RevisionInfo is expected.

:param  end_revision: The last revision to be logged.
        For backwards compatibility this may be a mainline integer revno,
        but for merge revision support a RevisionInfo is expected.

:return: A (mainline_revs, rev_nos, start_rev_id, end_rev_id) tuple.
r)NNNNNrrnro)rr7r
r9rcr&�check_real_revnor�r�rr�r�rrrrPr.)r@r2r3�branch_revno�branch_last_revisionr�rqr�rrr�rev_nos�
mainline_revsr$r's              r,�_get_mainline_revsry�s���"*0�)B�)B�)D�&�L��q��%��L������n�l�&?�&?�@�@�)�0�0�L�(�.�.�3�!�K��#�#�N�3�(�K��J��� �	��l�L�$=�$=�>�>�%�,�,�J�$�*�*�:�l�I��#�#�L�1�$�I��
�3�3�3��m�1�1�1��!�!�'�*J�"K�L�L����!�!��I�J�
�	
���%��I��G��M����'�'�)�E��3�3��}�:�:�<����"�#,�K� �� � ��-���!�#,�K� �� � ��-��Q��	��	���T�"������<�;�;rRc���URR5nURRUSS5nURU5nURnUVV	V
s/sH	up�o�U4PM nn	nn
Sn[5n
Sn[
S[U5U5H4nX�X�-nU
RU"U5Vs/sHnUSPM
 sn5 M6 AA/nS/nUH�nUup�n
U
[U5:XaURU5 O
UU
S-S2	UUS'X�;dM=[
[U55H5nUUnUcM
U(dUSS:XdMURU5 SUU'M7 M� U$s sn
n	nfs snf)aoReturn the list of revision ids which touch a given path.

The function filters view_revisions and returns a subset.
This includes the revisions which directly change the path,
and the revisions which merge these changes. So if the
revision graph is::

    A-.
    |\ \
    B C E
    |/ /
    D |
    |\|
    | F
    |/
    G

And 'C' changes a file, then both C and D will be returned. F will not be
returned even though it brings the changes to C into the branch starting
with E. (Note that if we were using F as the tip instead of G, then we
would see C, D, F.)

This will also be restricted based on a subset of the mainline.

:param branch: The branch where we can get text revision information.

:param path: Filter out revisions that do not touch path.

:param view_revisions: A list of (revision_id, dotted_revno, merge_depth)
    tuples. This is the list of revisions which will be filtered. It is
    assumed that view_revisions is in merge_sort order (i.e. newest
    revision first ).

:param include_merges: include merge revisions in the result or not

:return: A list of (revision_id, dotted_revno, merge_depth) tuples.
rNi�rrr|)
r�get_file_graphr�path2idr�rLrgrrVrP)r@r�r�r�r$�
start_tree�file_idr�rcr&r��	text_keys�	next_keys�modified_text_revisions�
chunk_size�startr.rW�current_merge_stack�info�idx�nodes                      r,r�r�Qs���P
���,�,�.�E��"�"�0�0���1B�1�1E�F�J�� � ��&�G��)�)�N�?M�N�~�';�v�e�6�"�~�I�N��I�"�e���J��q�#�i�.�*�5���e�&8�9�	��&�&�n�Y�6O�'P�6O���!��6O�'P�Q�6�	�9�
�F� �&����#���u��C�+�,�,��&�&�t�,�#�E�A�I�K�0�&*���#��,��S�!4�5�6��*�3�/���#�%��a��A���
�
�d�+�37�+�C�0�7�� �M��KO��(Qs�E(�5E/
c��SSU4/U-n/nUH4nUSU:XaURU/5 M USRU5 M6 UH)n[U5S:�dM[USSUS-5USS&M+ UR5 /nUHnUR	U5 M US:Xa!UVs/sHowScM
UScMUPM nnU$s snf)z�Reverse revisions by depth.

Revisions with a different depth are sorted as a group with the previous
revision of that depth.  There may be no topological justification for this
but it looks much nicer.
Nr|rrr)rPrr�r.�extend)�merge_sorted_revisions�_depth�zd_revisions�valrTrW�chunkrs        r,r�r��s��� $�T�6�2�3�6L�L���L�%���q�6�V��
�����&����#�#�C�(�
&�"�	��y�>�A��,�Y�q�r�]�F�Q�J�G�I�a�b�M�"�����
�F����
�
�e���
��{�#�M�V���t�!�A�a�D�!�V��M��M��Ns�+	C
�8C
�C
c�0�\rSrSrSrSSjrSrg)r�i�z�A revision to be logged (by LogFormatter.log_revision).

A simple wrapper for the attributes of a revision to be logged.
The attributes may or may not be populated, as determined by the
logging options and the log formatter capabilities.
Nc��XlUcSUlO[U5UlX0lX@lXPlX`lXplgr�)r�r&r�r�r�r�r�rN)rmr�r&r�r�r�r�rNs        r,ry�LogRevision.__init__�s:�����=��D�J��U��D�J�&���
��	��	�"�rR)r�r�r�r�r&rNr�)NNrNNNN)rprqrrrsrtryrurorRr,r�r��s#���
����
�
��#rRr�c��\rSrSrSrSrSSjrSrSrSr	S	r
S
rSrSSjr
S
rSrSrSrSrSrSrg)r�i�aKAbstract class to display log messages.

At a minimum, a derived class must implement the log_revision method.

If the LogFormatter needs to be informed of the beginning or end of
a log it should implement the begin_log and/or end_log hook methods.

A LogFormatter should define the following supports_XXX flags
to indicate which LogRevision attributes it supports:

- supports_delta must be True if this log formatter supports delta.
  Otherwise the delta attribute may not be populated.  The 'delta_format'
  attribute describes whether the 'short_status' format (1) or the long
  one (2) should be used.

- supports_merge_revisions must be True if this log formatter supports
  merge revisions.  If not, then only mainline revisions will be passed
  to the formatter.

- preferred_levels is the number of levels this formatter defaults to.
  The default value is zero meaning display all levels.
  This value is only relevant if supports_merge_revisions is True.

- supports_tags must be True if this log formatter supports tags.
  Otherwise the tags attribute may not be populated.

- supports_diff must be True if this log formatter supports diffs.
  Otherwise the diff attribute may not be populated.

- supports_signatures must be True if this log formatter supports GPG
  signatures.

Plugins can register functions to show custom revision properties using
the properties_handler_registry. The registered function
must respect the following interface description::

    def my_show_properties(properties_dict):
        # code that returns a dict {'name':'value'} of the properties
        # to be shown
rNc	��XlUbXplO[USU5UlX lX0lUcSnX@lXPlX`lSUlX�l	g)a�Create a LogFormatter.

:param to_file: the file to output to
:param to_exact_file: if set, gives an output stream to which
     non-Unicode diffs are written.
:param show_ids: if True, revision-ids are to be displayed
:param show_timezone: the timezone to use
:param delta_format: the level of delta information to display
  or None to leave it to the formatter to decide
:param levels: the number of levels to display; None or -1 to
  let the log formatter decide.
:param show_advice: whether to show advice at the end of the
  log or not
:param author_list_handler: callable generating a list of
  authors to display for a given revision
N�streamr|r)
�to_file�
to_exact_filer��show_ids�
show_timezone�delta_formatrG�_show_advice�_merge_count�_author_list_handler)	rmr�r�r�r�rGr�r��author_list_handlers	         r,ry�LogFormatter.__init__s_��6���$�!.��
")��(�G�!D�D�� �
�*�����L�(����'�����$7�!rRc��[USS5(a:URbURS:XaURUlUR$SUlUR$)z1Get the number of levels to display or 0 for all.�supports_merge_revisionsFrr)r�rG�preferred_levelsrls r,r��LogFormatter.get_levels?sS���4�3�U�;�;��{�{�"�d�k�k�R�&7�"�3�3����{�{���D�K��{�{�rRc��[S5e)zCLog a revision.

:param  revision:   The LogRevision to be logged.
z not implemented in abstract base)rj�rmrs  r,r��LogFormatter.log_revisionHs��
"�"D�E�ErRc��UR(apURS:Xa_URS:�aNUR5nU(aURRU5 URRS5 gggg)z6Output user advice, if any, when the log is completed.rrz5Use --include-merged or -n0 to see merged revisions.
N)r�rGr��get_advice_separatorr��write)rm�
advice_seps  r,r��LogFormatter.show_adviceOse���������!1�d�6G�6G�!�6K��2�2�4�J�����"�"�:�.��L�L���W�X�	7L�!1�rRc��g)�8Get the text separating the log from the closing advice.r�rorls r,r��!LogFormatter.get_advice_separatorWs��rRc�Z�[RUR5up#U(aU$U$r�)r�parse_usernamer8)rmr��name�addresss    r,�short_committer�LogFormatter.short_committer[s%���-�-�c�m�m�<�
����K��rRc�&�URUSSSS9$)N�firstT�, )�short�sep)�authors�rmr�s  r,�short_author�LogFormatter.short_authoras���|�|�C���$�|�?�?rRc�4�URb
URnO[RU5nU"U5nU(aE[[	U55H-n[
R
Xg5up�U(aX�U'M)X�U'M/ UbURU5nU$)a�Generate list of authors, taking --authors option into account.

The caller has to specify the name of a author list handler,
as provided by the author list registry, using the ``who``
argument.  That name only sets a default, though: when the
user selected a different author list generation using the
``--authors`` command line switch, as represented by the
``author_list_handler`` constructor argument, that value takes
precedence.

:param rev: The revision for which to generate the list of authors.
:param who: Name of the default handler.
:param short: Whether to shorten names to either name or address.
:param sep: What separator to use for automatic concatenation.
)r��author_list_registryrrgrrr�r�)
rmr��whor�r�r��names�ir�r�s
          r,r��LogFormatter.authorsds��� �$�$�0�"&�";�";��#7�":�":�3�"?��#�C�(����3�u�:�&�� &� 5� 5�e�h� ?�
���#�!�H�&�!�H�'��?��H�H�U�O�E��rRc�v�[URR5S:�aU=RS-
slgg)z<Get the merge marker to include in the output or '' if none.rz [merge]r�)rr�r�r�r�s  r,�merge_marker�LogFormatter.merge_marker�s0���x�|�|�&�&�'�!�+�����"���rRc��URU5H-nURRSRX#55 M/ g)zDisplays the custom properties returned by each registered handler.

If a registered handler raises an error it is propagated.
�{}{}
N)�custom_propertiesr�r�r)rmr�indent�lines    r,�show_properties�LogFormatter.show_properties�s4��
�*�*�8�4�D��L�L���x���v�<�=�5rRc�d�URU5n[R5H,up4URUR	U"U555 M. U$![
aM [R"5 [R"[R"5UR5 M�f=f)z�Format the custom properties returned by each registered handler.

If a registered handler raises an error it is propagated.

:return: a list of formatted lines (excluding trailing newlines)
)�_foreign_info_properties�properties_handler_registry�	iteritemsr��_format_properties�	Exceptionr�log_exception_quietly�print_exception�sys�exc_infor�)rmr�lines�_key�handlers     r,r��LogFormatter.custom_properties�s����-�-�h�7��8�B�B�D�M�D�
D����T�4�4�W�X�5F�G�H�E�����
D��+�+�-��%�%�c�l�l�n�d�l�l�C�
D�s�&A�AB/�.B/c���[U[R5(a>URURR
R
UR55$SUR;a/$[RRUR5up#URUR
R
U55$![Ra /s$f=f)zUCustom log displayer for foreign revision identifiers.

:param rev: Revision object.
�:)
r7�foreign�ForeignRevisionr��mapping�vcs�show_foreign_revid�
foreign_revidr'�foreign_vcs_registry�parse_revision_idr�InvalidRevisionId)rmr�r�r�s    r,r��%LogFormatter._foreign_info_properties�s����c�7�2�2�3�3��*�*������2�2�3�3D�3D�E��
�
�s���&��I�	�%,�%A�%A�%S�%S����&�"�M��&�&�w�{�{�'E�'E�m�'T�U�U���'�'�	��I�	�s�1+C�C�Cc�j�/nUR5Hup4URUS-U-5 M U$)Nz: )r(rP)rm�
propertiesr��key�values     r,r��LogFormatter._format_properties�s6����$�*�*�,�J�C��L�L��t��e�+�,�-��rRc��[5nUR5RS5H)nURX5R	US5-S-5 M+ g)N�
�ignore�
)r�rstrip�splitr��decode)rmr�r�r��encoding�ls      r,rC�LogFormatter.show_diff�sD��(�*������$�$�U�+�A��M�M�&�8�8�H�h�#?�?�$�F�G�,rR)	r�r�r�r�rGr�r�r�r�)F�originalNNFNN)FN)rprqrrrsrtr�ryr�r�r�r�r�r�r�r�r�r�r�r�rCrurorRr,r�r��st��'�R��
� ����� �/8�b�F�Y���@� �D�>�� V�2�HrRr�z<------------------------------------------------------------c�X^�\rSrSrSrSrSrSrSrSr	U4Sjr
SrSrSr
SrS	rU=r$)
�LongLogFormatteri�Trc�>�[TU]"U0UD6 URS:XaURUlgUR
Ulg)Nr�)�superryr��_date_string_original_timezone�date_string�_date_string_with_timezone�rm�args�kwargs�	__class__s   �r,ry�LongLogFormatter.__init__�s?���
���$�)�&�)�����+�#�B�B�D��#�>�>�D�rRc�j�[URUR=(d SUR5$r��r�	timestamp�timezoner�r�s  r,r��+LongLogFormatter._date_string_with_timezone�s$���3�=�=�#�,�,�*;�!�T�=O�=O�P�PrRc�T�[URUR=(d S5$r�)rrrr�s  r,r��/LongLogFormatter._date_string_original_timezone�s!��;��M�M�3�<�<�,�1�
�	
rRc	��SUR-n[/nURb:URSR	URURU555 UR(aBURSR	SR[UR5555 UR(d
URcCURSR	URRRS555 UR(aLURRH2nURSR	URS555 M4 URURUR55 URR nUR#URS	5nXe/:wa/URS
R	SRU555 URSR	U55 URR$R'SS5nUb URS
R	U55 URSR	UR)UR555 UR*bURSUR*-5 URS5 URR,(dURS5 O]URR,R/S5nUR1S5H#n	URSR	U	55 M% UR2n
U
R5SR	USU-RU555 UR6b$SSKJn U"U
UR6SURUS9 UR<bfU
R5US-5 U
R?5 URAURBUR<U5 URBR?5 gg)�%Log a revision, either merged or not.�    Nzrevno: {}{}ztags: {}r�zrevision-id: {}�utf-8z
parent: {}�allz
author: {}z
committer: {}zbranch-nickzbranch nick: {}z
timestamp: {}zsignature: zmessage:z  (no message)�
r�z  {}r�r��report_deltaF��short_statusr�r�zdiff:
)"r��	_LONG_SEPr&rPrr�r�r��sortedr�r�r'r�r�r�r�r8r�r�rr�rNrLr�r�r�r�r��breezy.deltarr��flushrCr�)rmrr�r��	parent_idr8r��branch_nickrLr�r�rs            r,r��LongLogFormatter.log_revision�s���(�.�.�.������>�>�%��L�L��$�$�X�^�^�T�5F�5F�x�5P�Q�
��=�=��L�L��*�*�4�9�9�V�H�M�M�5J�+K�L�M��=�=�H�N�N�2��L�L�!�(�(����)A�)A�)H�)H��)Q�R�
��=�=�%�\�\�4�4�	����\�0�0��1A�1A�'�1J�K�L�5�
���T�+�+�H�L�L�9�:��L�L�*�*�	��,�,�x�|�|�U�3���k�!��L�L��,�,�T�Y�Y�w�-?�@�A�
���_�+�+�I�6�7��l�l�-�-�1�1�-��F���"��L�L�*�1�1�+�>�?�
���_�+�+�D�,<�,<�X�\�\�,J�K�L����)��L�L���);�);�;�<�
���Z� ��|�|�#�#��L�L�)�*��l�l�*�*�1�1�&�9�G��]�]�4�(�����V�]�]�1�-�.�)��,�,���
�
�h�o�o�f�t�f�}�.B�.B�5�.I�J�K��>�>�%�1������"�����
��=�=�$��M�M�&�9�,�-��M�M�O�
�N�N�4�-�-�x�}�}�f�E����$�$�&�
%rRc��g)r�z=------------------------------------------------------------
rorls r,r��%LongLogFormatter.get_advice_separator&s��rR)r�)rprqrrrsr�r�r�r�r�r�ryr�r�r�r�ru�
__classcell__�rs@r,r�r��sD���#�����N��M��M���?�Q�
�
>'�@�rRr�c�B^�\rSrSrSrSrSrSrSrU4Sjr	Sr
SrU=r$)�ShortLogFormatteri+Trc�4>�[TU]"U0UD6 0Ulgr�)r�ry�revno_width_by_depthr�s   �r,ry�ShortLogFormatter.__init__2s���
���$�)�&�)�$&��!rRc��URnSU-nURRU5nUc?URbURR	S5S:XaSnOSnX@RU'SUS--nUR
nSnUR(a3S	RS
R[UR555nURUSUUR=(d SURUR5[URRURR=(d SUR S
SS9UUR#U54--5 UR%URX5-5 UR&(d
URcIURUU-SRURR(R+S55-5 URR,(dURX5-S-5 ObURR,R/S5nUR1S5H(n	URX5-SRU	5-5 M* UR2b3SSKJn
 U
"UUR2UR8S:HUR&X5-S9 UR:b'UR=UR>UR:S5 URS5 g)Nrr�r��� rr�z {{{}}}r�z%*s %s	%s%s%s
r�%Y-%m-%dF��date_fmt�show_offsetzrevision-id:{}
r
z
(no message)
rr�z{}
rrz      ) r�r"rr&�findr�r�rr�rr�r�r�rrrr�r�r�r�r'r�rLr�r�r�rrr�r�rCr�)rmrr�r��revno_width�offsetr�r�rLr�rs           r,r��ShortLogFormatter.log_revision6s���$�$���%����/�/�3�3�E�:�����~�~�%����)<�)<�S�)A�R�)G���!��/:�%�%�e�,���a��(���,�,�����=�=��#�#�D�I�I�f�X�]�]�.C�$D�E�D��
�
�� �����$�"��!�!�(�,�,�/���L�L�*�*��L�L�)�)�.�Q��&�&�'� %����!�!�(�+�
��
�	
�$	
���X�\�\�6�?�;��=�=�H�N�N�2��M�M����$�+�+�H�L�L�,D�,D�,K�,K�G�,T�U�V�
�
�|�|�#�#��M�M�&�/�,<�<�=��l�l�*�*�1�1�&�9�G��]�]�4�(���
�
�f�o��
�
�a�0@�@�A�)��>�>�%�1������!�.�.�!�3������
��=�=�$��N�N�4�-�-�x�}�}�h�G��
�
�d�rR)r")
rprqrrrsr�r�r�r�r�ryr�rurrs@r,r r +s/���#�����N��M��M�'�E�ErRr c�V^�\rSrSrSrSrSrU4SjrSrSr	Sr
SrSS	jrS
r
U=r$)�LineLogFormatteri~Trc�V>�[TU]"U0UD6 [5nUbUS-
nX0lgr4)r�ryr�
_max_chars)rmr�r�widthrs    �r,ry�LineLogFormatter.__init__�s1���
���$�)�&�)�� �����A�I�E��rRc�@�Ub[U5U::aU$USUS-
S-$)Nr�z...)r)rmr��max_lens   r,�truncate�LineLogFormatter.truncate�s-���?�c�#�h�'�1��J��=�W�q�[�!�E�)�)rRc�j�[URUR=(d SURSSS9$)Nrr(Fr)rr�s  r,r��LineLogFormatter.date_string�s1����M�M��L�L��A������
�	
rRc�>�UR(dgUR$)Nz(no message))rLr�s  r,rL�LineLogFormatter.message�s���{�{�!��;�;�rRc	��SUR-nURRURURUR
URURU55 URRS5 g)Nz  r�)r�r�r��
log_stringr&r�r3r�)rmrr�s   r,r��LineLogFormatter.log_revision�s_����,�,�,��������O�O�������d�o�o�x�}�}�f�
�	
�
	
�����4� rRc���/nU(a URSRU55 Ub7URURURU5US-S-55 O URURU55 URUR	U55 [UR5S:�aURS5 U(a:SRSR[U555nURU5 URUR55 URUSRU5RS	5-U5$)
awFormat log info into one string. Truncate tail of string.

:param revno:      revision number or None.
                   Revision numbers counts from 1.
:param rev:        revision object
:param max_chars:  maximum length of resulting string
:param tags:       list of tags or None
:param prefix:     string to prefix each line
:return:           formatted truncated string
z{}:r��rz[merge]z{{{}}}r�r'r�)rPrr8r�r�rr�r�r�get_summaryr�)rmr&r��	max_charsr��prefix�out�tag_strs        r,r?�LineLogFormatter.log_string�s������J�J�u�|�|�E�*�+�� ��J�J�t�}�}�T�%6�%6�s�%;�i�!�m�PQ�=Q�R�S��J�J�t�(�(��-�.��
�
�4�#�#�C�(�)��s�~�~���"��J�J�y�!���o�o�d�i�i��t��&=�>�G��J�J�w���
�
�3�?�?�$�%��}�}�V�c�h�h�s�m�&:�&:�4�&@�@�)�L�LrR)r3)Nr�)rprqrrrsr�r�r�ryr8r�rLr�r?rurrs@r,r1r1~s9���#�����M� �*�

��!�M�MrRr1c�"�\rSrSrSrSrSrSrg)�GnuChangelogLogFormatteri�Tc�(�URn[URRURR=(d SUR
SSS9nUR
URSSS9nURSS	5nURS
RX455 URGb:URR5(GaURRURR-URR-HRnURScURSnOURSnURS
RU55 MT URR URR"-H>nURSRURSURS55 M@ URS5 URR$(dURS5 gURR$R'S5nUR)S5H1nURSRUR+555 M3 URS5 g)rrr(Fr)r�r�)r�z <z  <z{}  {}

Nrz	* {}:
z	* {}:
	* {}:
r�z	No commit message
rz	{}
)r�rr�rrr�r��replacer�rr�rNrYr]�modifiedr�r[rZrLr�r��lstrip)	rmrr��date_str�
committer_str�cr�rLr�s	         r,r��%GnuChangelogLogFormatter.log_revision�s����,�,����L�L�"�"��L�L�!�!�&�Q������
�����X�\�\�7���E�
�%�-�-�d�E�:�
��
�
�l�)�)�(�B�C��>�>�%�(�.�.�*D�*D�*F�*F����$�$�x�~�~�'=�'=�=����@W�@W�W���6�6�!�9�$��6�6�!�9�D��6�6�!�9�D��
�
�k�0�0��6�7�
X��^�^�+�+�h�n�n�.C�.C�C���
�
�2�9�9�!�&�&��)�Q�V�V�A�Y�O�P�D�
�M�M�$���|�|�#�#��M�M�1�2��l�l�*�*�1�1�&�9�G��]�]�4�(���
�
�h�o�o�a�h�h�j�9�:�)��M�M�$�rRroN)rprqrrrsr�r�r�rurorRr,rJrJ�s��#���N�# rRrJc�<�[S5nURSX5$r�)r1r?)r�rDrAs   r,�line_logrT�s��	�$�	�B�
�=�=��s�.�.rRc�$�\rSrSrSrSrSrSrg)�LogFormatterRegistryi�zRegistry for log formatters.c�0�URU5"U0UD6$)z�Construct a formatter from arguments.

:param name: Name of the formatter to construct.  'short', 'long' and
    'line' are built-in.
)r)rmr�r�rs    r,�make_formatter�#LogFormatterRegistry.make_formatter�s���x�x��~�t�.�v�.�.rRc�b�UR5nURURS55$)N�
log_format)r]r)rmr@rQs   r,�get_default� LogFormatterRegistry.get_default�s(���#�#�%���x�x����l�+�,�,rRroN)rprqrrrsrtrXr\rurorRr,rVrV�s��&�/�-rRrVr�zModerately short log format.�longzDetailed log format.r�z&Log format with one line per revision.z
gnu-changelogz#Format used by GNU ChangeLog files.c�.�[RX5 gr�)�log_formatter_registry�register)r��	formatters  r,�register_formatterrcs���#�#�D�4rRc��[R"U/UQ70UD6$![a# [R"[S5U-5ef=f)z�Construct a formatter from arguments.

name -- Name of the formatter to construct; currently 'long', 'short' and
    'line' are supported.
zunknown log formatter: %r)r`rX�KeyErrorrr�r�)r�r�rs   r,�
log_formatterrfsP��O�%�4�4�T�K�D�K�F�K�K���O��!�!�'�*E�"F��"M�N�N�O�s	��-A	c�(�UR5SS$r�)r;�r�s r,�author_list_allri#s���#�#�%�a�(�(rRc�T�UR5nUS/$![a /s$f=fr�)r;�
IndexError)r��lsts  r,�author_list_firstrm's4��

�
"�
"�
$�C���A��x������	��s��'�'c��UR/$r�)r8rhs r,�author_list_committerro/s���M�M�?�rRrzAll authorsr�zThe first authorr8z
The committerc
�6�Uc1[R"[55"[RSS9n[USUSS9nSn[
[[U5[U555H/n[U5U::d[U5U::dX'X:wdM-Un O UcURS5 gU[U5:a�URS5 URS	5 [
U[U55HAnURRX5n[X�S
-SS5n	URU	5 MC URS5 URS5 U[U5:a,URS
5 [UUSSUS
-[U5S9 gg)a)Show the change in revision history comparing the old revision history to the new one.

:param branch: The branch where the revisions exist
:param old_rh: The old revision history
:param new_rh: The new revision history
:param to_file: A file to write the results to. If None, stdout will be used
NrL)rFr��r�r�r��Nothing seems to have changed
�<************************************************************�
Removed Revisions:
rr�

�Added Revisions:
r�)rBr1r2r3)�codecs�	getwriterrr��stdoutrfrg�maxrr�r�get_revisionr�r�rF)
r@�old_rh�new_rhr�r[rA�base_idxr�r�r�s
          r,�show_changed_revisionsr>ss�����"�"�#8�#:�;��J�J�y�
��
��U�G�:�
�B��H�
�3�s�6�{�C��K�0�
1���v�;�!��s�6�{�a�/�6�9��	�3I��H��2�
���
�
�7�8���#�f�+���
�
�h���
�
�.�/��x��V��-�A��#�#�0�0���;�C��S�a�%��D�1�B��O�O�B��.�	�
�
�h���
�
�f���#�f�+���
�
�*�+������#�a�<��V��
	
�rRc���/n[5n/n[5nUR5nURU5nURU5n	Sn
SnSnU(dU(a�U(a7[U5n
UR	U
5 URU
5 X�;aU
n
OQU(a7[U	5nUR	U5 URU5 X�;aUn
OU(aM�U(aM�UR5 UR5 U
b,XURU
5S-SnX3RU
5S-SnX54$![a SnN�f=f![a SnN�f=f)z�Calculate the uncommon lefthand history between two revisions.

:param old_revision_id: The original revision id.
:param new_revision_id: The new revision id.
:param repository: The repository to use for the calculation.

return old_history, new_history
NTFr)	rLrrrrPrJrr.�index)�old_revision_id�new_revision_idr�old_history�
old_revisions�new_history�
new_revisionsr$�new_iter�old_iter�
stop_revision�do_old�do_new�new_revision�old_revisions               r,�get_history_changer�qsy���K��E�M��K��E�M�� � �"�E��+�+�O�<�H��+�+�O�<�H��M�
�F�
�F�
�F��	
�#�H�~���"�"�<�0��!�!�,�/��0�$0�M��1��	
�#�H�~���"�"�<�0��!�!�,�/��0�$0�M��1�)�&�F�F�.��������� �!�"3�"3�M�"B�Q�"F�"H�I��!�"3�"3�M�"B�Q�"F�"H�I���#�#��1!�
���
��!�
���
�s$�'D?�%E�?E�
E�E �E c��UR5upE[X5UR5upgU/:XaU/:XaURS5 g[RU5nU"SUSS9n	U/:wa[URS5 URS5 [
URXbU	5 URS5 URS5 U/:wa/URS	5 U[U5-
S
-n
[X	SSU
S9 gg)
z�Show the changes made to a branch.

:param branch: The branch to show changes about.
:param output: A file-like object to write changes to.
:param old_revno: The revno of the old tip.
:param old_revision_id: The revision_id of the old tip.
rrNFr�rqrsrtrurvrr�)rBr1r2)	rr�rr�r`r\�
show_flat_logrrF)r@�output�	old_revnor��	new_revnor�r�r�r[rArqs           r,�show_branch_changer��s���"(�!:�!:�!<��I�1��&�*;�*;� ��K��b��[�B�.����6�7��'�3�3�F�;�J�	�U�F�*�	M�B��b�����X�����-�.��f�'�'���D����X�����V���b�����)�*��#�k�"2�2�Q�6������;�	
�rRc��URU5n[U5H&upV[XeU-SS5nURU5 M( g)aShow a simple log of the specified history.

:param repository: The repository to retrieve revisions from.
:param history: A list of revision_ids indicating the lefthand history.
:param last_revno: The revno of the last revision_id in the history.
:param lf: The log formatter to use.
rN)�
get_revisions�	enumerater�r�)rr%�
last_revnorArTr�r�r�s        r,r�r��sC���(�(��1�I��I�&���
��*�n�a��
6��
�����'rRc��SSKJn [RR	US5upEnURUR
55 U(aU/URUSS5-nO	U/USS-n/nU"XS5up�U/S/4;aU/X�4$U	c�U
c�UcUR5nSnUHin[XL5n
U
(dBUc-URS5nURRU5nU(a[X�5n
URX�45 Mk GO X�:XaLURRU
R 5nUH n[XL5n
URX�45 M" O�U
R nUcUR5nOURRU5nSnUH�n[XL5n
U
(deUcWU	R nUc-URS5nURRU5nOURRU5n[X�5n
URX�45 M� XXX�4$![Ra Sn
GNgf=f)a�Find files and kinds given a list of files and a revision range.

We search for files at the end of the range. If not found there,
we try the start of the range.

:param revisionspec_list: revision range as parsed on the command line
:param file_list: the list of paths given on the command line;
  the first of these can be a branch location or a file path,
  the remainder must be file paths
:param exit_stack: When the branch returned is read locked,
  an unlock call will be queued to the exit stack.
:return: (branch, info_list, start_rev_info, end_rev_info) where
  info_list is a list of (relative_path, found, kind) tuples where
  kind is one of values 'directory', 'file', 'symlink', 'tree-reference'.
  branch will be read-locked.
r)�_get_revision_rangerN�logr�)�breezy.builtinsr��
controldir�
ControlDir�open_containing_tree_or_branch�
enter_contextr��safe_relpath_files�
basis_tree�_get_kind_for_file�
get_rev_idrrrr:rPrc)�revisionspec_list�	file_list�
exit_stackr��tree�br��relpaths�	info_list�start_rev_info�end_rev_info�tree1�fpr\�rev1rcs                r,�_get_info_for_log_filesr��sA��"4��)�)�H�H��ST��V�M�D�T����Q�[�[�]�+���6�D�3�3�I�a�b�M�B�B���6�I�a�b�M�)���I�#6�7H�U�#S� �N��B���:���"�n�2�2���,�"6��<��<�<�>�D����B�%�d�/�D���=�A� �|�|�A���
!"��� :� :�4� @���-�e�8�D����b�Z�(�� 
�	'��|�|�)�)�,�*=�*=�>���B�%�d�/�D����b�Z�(���$�$���>��<�<�>�D��<�<�-�-�f�5�D����B�%�d�/�D���=�+�2�2�F��~� �|�|�A��� !��� :� :�4� @�� !��� :� :�6� B��)�%�4�����b�Z�(��
��5�5��K"�0�0�$�#��$�s�H?�?I�Ic��UR5 URU5sSSS5 $![Ra SSS5 gf=f!,(df   g=f)z6Return the kind of a path or None if it doesn't exist.N)r��stored_kind�_mod_transport�
NoSuchFile)r�r�s  r,r�r�)	sR��	
���	�	��#�#�D�)�
�	���(�(�	��	
�	�	��
�	�s&�A�-�A�A�A�A�
Ac�h�/n/nUR5H7up4US:XaURU5 MUS:XdM&URU5 M9 0nU(a)[SS[U55nSR	U5XV'U(a)[SS[U55nSR	U5XV'U$)N�fixed�relatedz	fixes bugz
fixes bugsr'zrelated bugzrelated bugs)r<rP�ngettextrr�)r�fixed_bug_urls�related_bug_urls�bug_url�status�ret�texts       r,�_bugs_properties_handlerr�9	s����N���#�-�-�/����W���!�!�'�*�
�y�
 ��#�#�G�,�	0�

�C����\�3�~�3F�G���H�H�^�,��	���
�~�s�;K�7L�M���H�H�-�.��	��JrR�bugs_properties_handler)Fr.NNNFN)r.NNNNNNTNNTFNFFr�)FF)F)TF)Nr.)T)r)Nr^)crtrwr�r+r��ior�typingr�warningsrr�globalsr�rr	r
rrr�r
r��osutilsrrrrrrr�rr-rFrTr=rXrergr>r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r2r-r5r>r!rHrOrcrlr�ryr�r�r�r�rr�r r1rJrT�RegistryrVr`rarcrfrirmror��Revisionrr�rr�r�r�r�r�r_r�r�r rorRr,�<module>r�s���"�B��	�
����$���I�
�
�4�3�'�)����(�\
����
��
�F"�X���$��������
�������!�
���d�N��*;�;�?4�?4�DL�<#�L�BO�i�O��<��P#�!�@�F(�"�
F�R�/��8?D�J,�b�!�+A�\�KT�'�T3�0��:�
MV��01�h L�FG�&+�,'&�TS<�lQ�h�>#�#�<fH�fH�T
�	�Y�|�Y�xP��P�fDM�|�DM�N' �|�' �T/�

-�8�,�,�
-� .�/������
� >������(8�:P�Q����
��F������-�/T��
5�	O�)��� �(�(���=�)�)�*�D��I�5�	6�6�������e�_�m�D����g�'8�:L�M����k�+@�/�R�0
�f/$�d
�@�U6�p�'�/�/���4��S��>�"�D��c��N�2�	3�3�����$�$�$��7������	�rR

Youez - 2016 - github.com/yon3zu
LinuXploit