HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: //kunden/lib/python3/dist-packages/breezy/__pycache__/missing.cpython-39.pyc
a

�*�^#�@sfdZddlmZddlmZmZddd�Zdd
d�Zdd
d�Zddd�Z	dd�Z
ddd�Zdd�ZdS)zIDisplay what revisions are missing in 'other' from 'this' and vice versa.�)�absolute_import�)�errors�logNc		csZ|duri}|D]D\}}}|�|�}|r4|�|�}nd}tj|||||�|�d�VqdS)N)�deltaZtags)Zget_revisionZget_revision_deltarZLogRevision�get)	�	revisionsZrevision_source�verboseZrev_tag_dict�revno�rev_id�merge_depth�revr�r�0/usr/lib/python3/dist-packages/breezy/missing.py�iter_log_revisionss
�r�allFcCs�|durd}|���\|���4t|||||||d�Wd�Wd�S1sX0YWd�n1sv0YdS)aFind revisions from each side that have not been merged.

    :param local_branch: Compare the history of local_branch
    :param remote_branch: versus the history of remote_branch, and determine
        mainline revisions which have not been merged.
    :param restrict: ('all', 'local', 'remote') If 'all', we will return the
        unique revisions from both sides. If 'local', we will return None
        for the remote revisions, similarly if 'remote' we will return None for
        the local revisions.
    :param include_merged: Show mainline revisions only if False,
        all revisions otherwise.
    :param backward: Show oldest versions first when True, newest versions
        first when False.
    :param local_revid_range: Revision-id range for filtering local_branch
        revisions (lower bound, upper bound)
    :param remote_revid_range: Revision-id range for filtering remote_branch
        revisions (lower bound, upper bound)

    :return: A list of [(revno, revision_id)] for the mainline revisions on
        each side.
    NF)�restrict�include_merged�backward�local_revid_range�remote_revid_range)Z	lock_read�_find_unmerged)�local_branch�
remote_branchrrrrrrrr�
find_unmerged(s�rTc
Cs�|durdS|sgSg}|}|}||vr~|�|g�}|�|�}	|	sDq~|�|durXt|�nd|df�|	d}|dur |d8}q |s�|��|S)aEnumerate the mainline revisions for these revisions.

    :param ancestry: A set of revisions that we care about
    :param graph: A Graph which lets us find the parents for a revision
    :param tip_revno: The revision number for the tip revision
    :param tip: The tip of mainline
    :param backward: Show oldest versions first when True, newest versions
        first when False.
    :return: [(revno, revision_id, 0)] for all revisions in ancestry that
        are left-hand parents from tip, or None if ancestry is None.
    Nrr)Zget_parent_mapr�append�str�reverse)
�ancestry�graph�	tip_revno�tiprZmainlineZcurZ	cur_revnoZ
parent_map�parentsrrr�_enumerate_mainlineJs*
�
r#c
st�durdS�sgS|��}�fdd�|D�}|s<t�|�}g}|D]*\}}	}
}}|�d�tt|��|	|
f�qD|S)a,Enumerate the revisions for the ancestry.

    :param branch: The branch we care about
    :param ancestry: A set of revisions that we care about
    :param graph: A Graph which lets us find the parents for a revision
    :param tip_revno: The revision number for the tip revision
    :param tip: The tip of the ancsetry
    :param backward: Show oldest versions first when True, newest versions
        first when False.
    :return: [(revno, revision_id)] for all revisions in ancestry that
        are parents from tip, or None if ancestry is None.
    Ncs*g|]"\}}}}|�vrd||||f�qS)rr)�.0Zrevid�n�d�e�rrr�
<listcomp>�s
�z*_enumerate_with_merges.<locals>.<listcomp>�.)Ziter_merge_sorted_revisionsrZreverse_by_depthr�join�mapr)
�branchrrr r!rZmerge_sorted_revisionsZrevline�seqrrr
Zend_of_mergerr(r�_enumerate_with_mergesqs
�
r/cs(�dus|dur|S��fdd�|D�S)Ncs*g|]"}��|d�d�d�r|�qS)rr)Z
is_between)r$r
�r�revid_rangerrr)�s�z _filter_revs.<locals>.<listcomp>r)rZrevsr1rr0r�_filter_revs�sr2c	CsPz|��\}}Wn&tjtjfy6d}|��}Yn0z|��\}	}
Wn&tjtjfyn|��}
d}	Yn0||
kr�ggfS|j�|j�}|dkr�d}|�|
|g�}
nB|dkr�d}
|�||
g�}n&|dkr�td|f��|�	||
�\}}
|�rt
||||||�}t
||
||	|
|�}n t|||||�}t|
||	|
|�}t|||�t|||�fS)zSSee find_unmerged.

    The branches should already be locked before entering.
    NZremoteZlocalrz6param restrict not one of "all", "local", "remote": %r)
Zlast_revision_infor�UnsupportedOperationZGhostRevisionsHaveNoRevnoZ
last_revisionZ
repositoryZ	get_graphZfind_unique_ancestors�
ValueErrorZfind_differencer/r#r2)rrrrrrrZlocal_revnoZlocal_revision_idZremote_revnoZremote_revision_idrZlocal_extraZremote_extra�localsZremotesrrrr�s`
���������rcst�fdd�|D��}|S)Ncsg|]}�||f�qSrr)r$�r��history_maprrr)��z$sorted_revisions.<locals>.<listcomp>)�sorted)rr8rr7r�sorted_revisions�sr;)N)rNFNN)T)T)NN)
�__doc__Z
__future__r�rrrrr#r/r2rr;rrrr�<module>s

�
"
(�
#	�
6