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__/fetch_ghosts.cpython-39.pyc
a

�*�^��@sTddlmZddlmZddlmZddlmZddlm	Z	m
Z
Gdd�de�Zd	S)
�)�absolute_import�)�cleanup)�Branch)�note)�NoSuchRevision�BzrCommandErrorc@s8eZdZedd��Zdd�Zdd�Zdd�Zd	d
�ZdS)�GhostFetchercCsRt�d�d}|dur:|��}|dur0td��n
td|�t�|�d}|||�S)N�.rz*No branch specified and no location saved.zUsing saved location %s.)rZopen_containingZ
get_parentrr)�cls�other�this_branch�other_branch�r�5/usr/lib/python3/dist-packages/breezy/fetch_ghosts.py�from_cmdlines

zGhostFetcher.from_cmdlinecCs||_||_dS�N)r
r)�selfr
rrrr�__init__(szGhostFetcher.__init__cCsh|jj|jjk}t���<}|�|j���|r>|�|j���|��Wd�S1sZ0YdSr)	r
�baserr�	ExitStack�
enter_contextZ
lock_writeZ	lock_read�_run_locked)rZ
lock_otherZ
exit_stackrrr�run,s
zGhostFetcher.runc	cs�t�}|j��g}|ddur"dSt|�dkr�g}|D]P}||vrDq6|�|�z|jj�|�}|�|j�Wq6t	y�|VYq60q6|}q"dS)z5Find all ancestors that aren't stored in this branch.rN)
�setr
�
last_revision�len�addZ
repositoryZget_revision�extendZ
parent_idsr)r�seen�linesZ	new_lines�line�revisionrrr�iter_ghosts4s 
zGhostFetcher.iter_ghostsc	Csxg}g}|j��dur"td�dS|��}|D]@}z|j�|j|�|�|�Wq.tyl|�|�Yq.0q.||fS)NzNo revisions in branch.)r
r�printr#Zfetchr�appendr)rZ	installedZfailedZghostsr"rrrrGszGhostFetcher._run_lockedN)	�__name__�
__module__�__qualname__�classmethodrrrr#rrrrrr	s
r	N)
Z
__future__r�r�branchrZtracer�errorsrr�objectr	rrrr�<module>s