https://t.me/RX1948
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/hgext/infinitepush/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/hgext/infinitepush/__pycache__/bundleparts.cpython-310.pyc
o

�]Lb��@s�ddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
ddlmZejZdZdd	�Zd
d�Zdd
�ZGdd�de�ZdS)�)�absolute_import)�_)�hex)�bundle2�changegroup�error�
extensions�pycompat�
revsetlang�util�)�commonsb2x:infinitepushcCs�|js
t�td���tt�|�vrt�td�t��t|t�	d|j�|�t
�|�}|�d�t
|�}t||j�t
�|||d�}i}||d<|r`||d<d|d	<|j}	||	vr`t|	|�|d	<t|�shd
|d<g}
|
�tjt��t�|�|d��|
S)
Nsno commits to pushsno server support for %rs%lns01spushs	cgversionsbookmark�sbookprevnode�1spushbackbookmarks)�advisoryparams�data)�missingr�Abortr�scratchbranchparttyper�bundle2caps�_validaterevsetr
�
formatspecr�supportedoutgoingversions�discard�min�
_handlelfs�
makestream�
_bookmarksr�isremotebooksenabled�append�
bundlepart�upperr	�	iteritems)�repo�peer�outgoing�ui�bookmark�supportedversions�	cgversion�cg�params�	bookmarks�parts�r.�@/usr/lib/python3/dist-packages/hgext/infinitepush/bundleparts.py�getscratchbranchpartssB
��

��r0cCsJ|�|�st�td���|r!|�d|�}t|�dkr#t�td���dSdS)zAAbort if the revs to be pushed aren't valid for a scratch branch.snothing to pushs	heads(%r)rs2cannot push more than one head to a scratch branchN)�revsrrr�len)r#�revsetr'�headsr.r.r/rOs
��rcCs4zt�d�}|j�||�WdStyYdSw)z�Special case if lfs is enabled

    If lfs is enabled then we need to call prepush hook
    to make sure large files are uploaded to lfs
    slfsN)r�find�wrapper�uploadblobsfromrevs�KeyError)r#r�lfsmodr.r.r/r\s
�rc@s*eZdZdZdd�Zdd�Zd	dd�ZdS)
�
copiedpartz9a copy of unbundlepart content that can be consumed latercCsL|j|_|j|_|j|_|j|_|j|_|j|_|j|_t�|�	��|_
dS�N)�type�id�	mandatory�mandatoryparamsrr+�
mandatorykeysr�stringio�read�_io)�self�partr.r.r/�__init__mszcopiedpart.__init__cCsdSr;r.)rDr.r.r/�consumeyszcopiedpart.consumeNcCs|dur	|j��S|j�|�Sr;)rCrB)rD�sizer.r.r/rB|s
zcopiedpart.readr;)�__name__�
__module__�__qualname__�__doc__rFrGrBr.r.r.r/r:js
r:N)�
__future__r�mercurial.i18nr�mercurial.noder�	mercurialrrrrr	r
r�r
rrr0rr�objectr:r.r.r.r/�<module>s$
3


https://t.me/RX1948 - 2025