Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/mercurial/__pycache__/ |
Upload File : |
o �]LbX � @ s� d dl mZ d dlZddlmZ ddlmZmZ ddlm Z m Z mZmZm Z mZmZmZmZmZ ddd �ZG d d� de�Z ddd �Zdd� Zddd�Zdd� Zdd� Zdd� Zdd� ZdS )� )�absolute_importN� )�_)�hex�short) � bookmarks� branchmap�error�obsolete�phases�pycompat�scmutil�setdiscovery� treediscovery�utilFc s� |� d�s t�| |||�S |r#| jj�t�fdd�|D ��r#|d|fS tj| j| || |d�}|\}}}|rG|sG| jj� t � fdd�|D ��}t |�||pPt |�fS )a� Return a tuple (common, anyincoming, heads) used to identify the common subset of nodes between repo and remote. "common" is a list of (at least) the heads of the common subset. "anyincoming" is testable as a boolean indicating if any nodes are missing locally. If remote does not support getbundle, this actually is a list of roots of the nodes that would be incoming, to be supplied to changegroupsubset. No code except for pull should be relying on this fact any longer. "heads" is either the supplied heads, or else the remote's heads. "ancestorsof" if not None, restrict the discovery to a subset defined by these nodes. Changeset outside of this set won't be considered (but may still appear in "common"). If you pass heads and they are all known locally, the response lists just these heads in "common" and in "heads". Please use findcommonoutgoing to compute the set of outgoing nodes to give extensions a good hook into outgoing. s getbundlec 3 � � | ]}� |�V qd S �N� ��.0�h�� knownnoder �5/usr/lib/python3/dist-packages/mercurial/discovery.py� <genexpr>; � � z%findcommonincoming.<locals>.<genexpr>F)�abortwhenunrelated�ancestorsofc 3 � � | ]}� |� V qd S r r �r �n)�has_noder r r I � � )�capabler �findcommonincoming� changelog�hasnode�allr �findcommonheads�ui�any�list) �repo�remote�heads�forcer �res�common�anyinc�srvheadsr )r! r r r$ s$ � r$ c @ s@ e Zd ZdZ ddd�Zdd� Zejdd� �Zejd d � �Z dS )�outgoinga� Represents the result of a findcommonoutgoing() call. Members: ancestorsof is a list of the nodes whose ancestors are included in the outgoing operation. missing is a list of those ancestors of ancestorsof that are present in local but not in remote. common is a set containing revs common between the local and the remote repository (at least all of those that are ancestors of ancestorsof). commonheads is the list of heads of common. excluded is the list of missing changeset that shouldn't be sent remotely. Some members are computed on demand from the heads, unless provided upfront by discovery.Nc s� d ||fv sJ ��j }|d u r|�� }|rDg }|D ]}|��fdd�|�|�D �� q|�||�\}} } t|�� | }� fdd�|D �}n|sJ�jg}|| _|| _|| _ d | _ d | _g | _d S )Nc s g | ] }|� j kr|�qS r )�nullid)r �p)r, r r � <listcomp>n s z%outgoing.__init__.<locals>.<listcomp>c � g | ]}|� vr|�qS r r r )�includedr r r7 u � ) r% r. �extend�parents�nodesbetween�setr5 �commonheadsr �_revlog�_common�_missing�excluded)�selfr, r? r �missingroots�cl� discbasesr �csets�rootsr. r )r9 r, r �__init__c s( zoutgoing.__init__c C s"