403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/mercurial/__pycache__/hg.cpython-39.opt-1.pyc
a

�+�b���
@s�ddlmZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
ddlmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ m!Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z*m+Z+m,Z,m-Z-m.Z/m0Z1ddl2m3Z4dd	l5m6Z6m7Z7m8Z8ej9Z9d
Z:dd�Z;d
d�Z<ee+e;eee'e(d�Z=dd�Z>dd�Z?dVdd�Z@gZAdWdd�ZBdXdd�Z3dYdd�ZCdd �ZDd!d"�ZEdZd#d$�ZFd%d&�ZGd'd(�ZHd[d)d*�ZId\d+d,�ZJd-d.�ZKd]d/d0�ZLd1d2�ZMd^d3d4�ZNd_d5d6�ZOd`d7d8�ZPdad9d:�ZQeQZRdbd;d<�ZSeSZTe jUe jVe jWe jXhZYdcd=d>�ZZddd?d@�ZdAdB�Z[dedCdD�Z\dfdEdF�Z]dgdGdH�Z^dIdJ�Z_dKdL�Z`dhdMdN�ZadidOdP�Z.dQdR�ZbgdS�ZcGdTdU�dUed�ZedS)j�)�absolute_importN�)�_)�hex�sha1nodeconstants�short)�getattr)�	bookmarks�
bundlerepo�cmdutil�destutil�	discovery�error�exchange�
extensions�graphmod�httppeer�	localrepo�lock�
logcmdutil�logexchange�merge�
mergestate�
narrowspec�phases�requirements�scmutil�sshpeer�statichttprepo�ui�	unionrepo�url�util�verify�vfs)�
repository)�hashutil�
stringutil�urlutil�	bookmarksc
Cs�t�t�|��}zt�|�}t�|j�}WnXtt	fyn}z(t
�td�|t
�|�f��WYd}~nd}~0ty�d}Yn0|r�tp�tS)Nsinvalid path %s: %sF)r"�
expandpathr(�urllocalpath�os�stat�S_ISREG�st_mode�	TypeError�
ValueErrorr�Abortrr'Zforcebytestr�OSErrorr
r)�path�st�isfile�e�r8�2/usr/lib64/python3.9/site-packages/mercurial/hg.py�_localFs
�
r:cs|��}|\}}|s:|s:�pd}�r.�d}nd}||fS�rHt���ng�|�d�s~|rht�td�����|���dfS|��� }|�di��	��Wd�n1s�0Y���fdd�}	|D]}
|	|
�s�t�
td�|
��q�|�r|	|��s��|���dfS)Nrs	branchmaps"remote branch lookup not supportedcsT|dkr$�st�td����j��}|�vrL��dd�t�|�D��dSdSdS)N�.sdirstate branch not accessiblecss|]}t|�VqdS)N)r)�.0�rr8r8r9�	<genexpr>y�z1addbranchrevs.<locals>.primary.<locals>.<genexpr>TF)rr2r�dirstate�branch�extend�reversed)rA�Z	branchmap�lrepo�revsr8r9�primaryss
zaddbranchrevs.<locals>.primarysunknown branch '%s')�peer�list�capablerr2r�append�commandexecutor�callcommand�result�RepoLookupError)rE�other�branchesrFrHZ
hashbranch�x�yr7rGrAr8rDr9�
addbranchrevs[s4




.

rT)�bundlesunion�fileshttpshttps�sshsstatic-httpcCsZt�|�}|jpd}t�|�p$td}z
||�WStyTt�|d�sL�|YS0dS)NrVsinstance)r(r!�scheme�schemes�getr0r"�safehasattr)r4�urX�thingr8r8r9�_peerlookup�s


r^cCs8t|t�r0zt|��|�WSty.YdS0|��S)z7return true if repo (or path pointing to repo) is localF)�
isinstance�bytesr^�islocal�AttributeError�local��repor8r8r9ra�s
raTcCs<tj|ddd�}|��r(t�|��d�Stj|||d�SdS)z0open path with open if local, url.open if remoteF)Z
parsequeryZ
parsefragmentsrb)�
sendacceptN)r(r!rar"Z	posixfileZ	localpath�open)rr4rfZpathurlr8r8r9�openpath�srhFc

Cst|�j|||||d�}t|d|�}|p*gD]}|||�q,|�dd�t�d���}t�|�D]l\}	}
|�dd|	�t|
dd�}|r^t�d	|	��}|||�Wd�n1s�0Y|�dd
|	|�q^Wd�n1s�0Y|�dd|�|���stD]}|||��q|S)�1return a repository object for the specified path��intents�
createoptsrs	extensions- executing reposetup hooks
z
all reposetups  - running reposetup for %s
Z	reposetupNzreposetup %rs  > reposetup for %s took %s
s> all reposetup took %s
)	r^�instancer�logr"Ztimedcmrrc�wirepeersetupfuncs)
rr4�create�
presetupfuncsrkrl�obj�fZallreposetupstats�name�module�hook�statsr8r8r9�_peerorrepo�s,
�(�$
rxr?cCsDt||||||d�}|��}|s:t�td�|p4|����|�d�S)ri)rqrkrlsrepository '%s' is not localsvisible)rxrcrr2rr!�filtered)rr4rprqrkrlrHrer8r8r9r%�s	��r%cCs t||�}t|||||d���S)z/return a repository peer for the specified pathrj)�remoteuirxrH)Zuiorrepo�optsr4rprkrlZruir8r8r9rH�s

�rHcCs(t�|�j}|sdStj�tj�|��S)a9return default destination of clone if none is given

    >>> defaultdest(b'foo')
    'foo'
    >>> defaultdest(b'/foo/bar')
    'bar'
    >>> defaultdest(b'/')
    ''
    >>> defaultdest(b'')
    ''
    >>> defaultdest(b'http://example.org/')
    ''
    >>> defaultdest(b'http://example.org/foo/')
    'foo'
    r?)r(r!r4r,�basename�normpath)�sourcer4r8r8r9�defaultdest�srcCs^|j|jkrdSt�|d�r(|jr(|jS|j�|j�d}t�|�\}}t	|j
|�}||_|S)z}Returns repository object for source repository of a shared repo.

    If repo is not a shared repository, returns None.
    Nssrcrepor)�
sharedpathr4r"r[�srcrepor$�splitr(�parseurlr%r)rer~ZsrcurlrQr�r8r8r9�sharedreposource
sr�cCs�t|�st�td���|s$t|�}nt�||�d}t|t�rnt�||�\}}}t	||�}	t
|	|	|d�\}
}n|��}	d}t�}|r�|�
t�t	||d|	||d�d�}
t|	|
|d�t	||�}
t|
||d�|
S)	zcreate a shared repositorys!can only share local repositoriesrNT)s
sharedrepossharedrelativesshareditems�rprl)�defaultpath)�checkout)rarr2rrr(�get_clone_pathr_r`r%rTrc�set�add�sharedbookmarks�	postshare�_postshareupdate)rr~�dest�updater	r��relative�
origsourcerQr��revr�Zshareditemsr=r8r8r9�shares6



��
r�cCs�t�|j�}t�|j�}|�d�s&dSd}|�d�r>|�d�}|dd��B}|�d�}|�d�|�|�|�d�|�|�Wd�n1s�0YdS)z�copies the source repo config and prepend it in current repo .hg/hgrc
    on unshare. This is only done if the share was perfomed using share safe
    method where we share config of source in shares�hgrcNr?swbs## Config copied from shared source
�
)�vfsmodr$r�r4�exists�read�write)re�srcvfs�dstvfsZ
currentconfig�fpZsourceconfigr8r8r9�_prependsourcehgrcMs






r�c	Cs|����t|||j�}|p"t���ftj|jvr:t|�|j�	d�}t�
||d�|j�tj�|j�tj
�t�|�Wd�n1s�0YWd�n1s�0Yt|j|jdd�}|d}|j}t|�D]}|�|���q�t�|�|S)aconvert a shared repository to a normal one

    Copy the store data to the repo and remove the sharedpath data.

    Returns a new repository object representing the unshared repository.

    The passed repository object is not usable after this function is
    called.
    s
sharedpaths.oldNF)rpr;)r�	copystorer4r"ZnullcontextmanagerrZSHARESAFE_REQUIREMENTr�r$�join�rename�discardZSHARED_REQUIREMENTZRELATIVE_SHARED_REQUIREMENTrZwritereporequirementsr%�baseui�root�substate�sorted�sub�unsharerZpoisonrepository)rre�destlockZ	sharefileZnewrepo�cZsubs�sr8r8r9r�cs"
F
r�cCst|p|j�dd�}|r2d}|j�dt�||��tj|jvrp|���t	�
|�Wd�n1sf0YdS)aACalled after a new shared repo is created.

    The new repo only has a requirements file and pointer to the source.
    This function configures additional shared data.

    Extensions can wrap this function and write additional entries to
    destrepo/.hg/shared to indicate additional pieces of data to be shared.
    �paths�defaults[paths]
default = %s
r�N)r�configr$r�r"�tonativeeolrZNARROW_REQUIREMENT�wlockr�copytoworkingcopy)Z
sourcerepo�destrepor��default�templater8r8r9r��s	
r�c	Csz|sdS|j�td��|dur$|}|ddfD]<}|dur<q.z|�|�}WqlWq.tjyhYq.Yq.0q.t||�dS)z�Maybe perform a working directory update after a shared repo is created.

    ``update`` can be a boolean or a revision to update to.
    Nsupdating working directory
Tr��tip)r�statusr�lookuprrO�_update)rer�r��test�uprevr8r8r9r��s

r�cCsTd}�z2d}|rtd�ntd�}|j|td�d���}d}|��}t�|j�}	t�|�}
|j��D]�}|rt|�d�rtq`t	j
�|�}|r�|
�|�s�|
�
|�|	�|�r`|�d�r�t	j
�|d	�}
t�|
|
�}t�|	�|�|
�|�||�\}}||7}q`|�r|�d
|�n|�d|�Wd�n1�s*0Y|WSt|��Yn0dS)zGcopy files from store of srcrepo in destpath

    returns destlock
    Nslinkingscopyingsfiles)Zunitr�
phaserootssdataslockslinked %d files
scopied %d files
)rZmakeprogressZ
publishingr�r$r��storeZcopylist�endswithr,r4�dirnamer��mkdirr�rr"Z	copyfiles�debug�release)rr�Zdestpathr�ZhardlinkZtopicZprogressZnumZ
srcpublishingr�r�rsZdstbaseZlockfile�nr8r8r9r��s<



�
.r�c
Cs�d}
|rt|�d�s t�td���g}|D]F}|���*}
|�|
�dd|i����Wd�q(1sd0Yq(|}
tj	�
|�}zt�|d�Wn2t
y�}
z|
jtjkr��WYd}
~
n
d}
~
00t�|�}tj	�|�}t�|d|��\tj	�|��r|�td�|�n*|�td�|�t||||d	|d|	d
�Wd�n1�sN0Yt|��rtt�t�|��}n|}t||d�}t|||dd|d�}tj|||
d
�t||�|t |||�fS)aPerform a clone using a shared repo.

    The store for the repository will be located at <sharepath>/.hg. The
    specified revisions will be cloned or pulled from "source". A shared repo
    will be created at "dest" and a working copy will be created if "update" is
    True.
    N�lookup�Xsrc repository does not support revision lookup and so doesn't support clone by revision�keyFs%s.locks-(sharing from existing pooled repository %s)
s((sharing from new pooled repository %s)
T)r��pullrFr��stream)r4)r�r�r	r�)�heads)!rJrr2rrLrKrMrNr,r4r�r"Zmakedirr3�errno�EEXISTr�r$r|rr�r��clonera�abspathr(r+r%r�rr�r�rH)r�peeropts�	sharepathr~�srcpeerr�r�r�r�r�rF�
remoterevsr=r7ZpooldirZpoolvfsr|r�Z	sharerepor�r8r8r9�clonewithshare�sx
��	
���$

�
��&
�
r�cCsL|j�|�}tj�||�}tj�|�rHtj�|�s<t�|�t�||�dS)z8copy a cache from srcrepo to destcachedir (if it exists)N)Zcachevfsr�r,r4r�r�r"�copyfile)r�Zdstcachedir�fnameZsrcfnameZdstfnamer8r8r9�
_copycachePs
r�c
2Cs�
t|t�r0t�|||�}
|
\}}}t|||�}n |��}d|p@gf}|��}}d}}}}d}�	z�t||||�\}}|dur�t|�}|r�|�t	d�|�nt�||�d}t�
|�}t�
|�}|s�t�t	d���t
j|dd�}|���r*|���st�t	d�|��n|���r*t�t	d�|��i}d	}|
du�rJt�|
�d}|du�rbt�|�d}|�r�|�rz|
�szd
h}
d|d<|�r�d|d<|�d
��r�d|d<t�d��r�|�t	d��n|�t	d��|	�p�i}	|	�d�}|	�d�}|�rht|��rhd}|dk�r�zp|���$}|�dddi���}Wd�n1�s@0Y|tjk�rjtj� |t!|��}n|�t	d��Wn$tj"�y�|�t	d��Yn0n:|dk�r�tj� |t!t#�$|��%���}nt�&t	d�|��|�r�|�t	d��d}|�rht'||||||||||d�
Wt(|||�|du�r8t)�*|d�|du�rJ|�+�|�rf|�,�du�rf|�+�S|�,�}|} t|��r�t-�.t�
|��} t|��r�tj�/|��r�tj�0tj� |d��}!|!}n|}d	}"|�r�|�1��r�t|��r�t2�3|��s�|�o�|}"|�rd	}"|"�r:z|j4d	d�}Wntj5�y8d	}"Yn0|"�r�|j6ddd d!�t�
|�}#t7�8|||�}$t7j9||#|$d"�t7�:||#�}%|%�;�}|%�4�}d#d$l<m=}&|&�>||%�t|||�}t?�@|�|�,�_At?�@|�|�,�_B|%jC|�,�_C|j6d%d |jDjEd&��n<zt|�p|||d|d'�}WnLtF�yd}'z2|'jGtGjHk�rNd}t�&t	d�|���WYd}'~'n
d}'~'00|�r�|�d��s�t�&t	d(���g}(|D]J})|���*}|(�I|�dd|)i����Wd�n1�s�0Y�q�|(}|d}nd}|�,�}*|*�r�|�rj|*�;��P|*�4��&|*�J|
|�t�K|*�Wd�n1�s@0YWd�n1�s`0Yt�| �}+t|+�},|*jL�Md)d*|,d �|�s�|�r�d	}nd}d+di}-|*jL�N|-d ��(tOjP|*||||
||d,�Wd�n1�s�0YnB|�r*|�rt�&t	d-���tOjQ||||jR�S�d.�nt�&t	d/���d}|�,�}%|%�	r�tTjUd0}.t�| �}+d|+_Vt|+�},|%j�Wd1t-�X|.|,��|%jL�Md)d*|,d �|�Yd2d3��r�tZ�[|%|�|�	r||du�r�|���$}|�dd|i���}Wd�n1�s�0Yd}/d}0|du�r~t\|�d4k�r.||%v�r.|}/nPt]�^|%|��rNt]�_|%|��`�}/n0|du�r~z|%�a|�}/Wntj"�y|Yn0|/du�	r0zb|%jb�r�|%�a|%jb�}/|%jb}n|%jRd5}/d5}|%|/�c�}1|1d*k�r�t	d6|�}0nt	d7�||1f}0WnDtd�	y.z|%�ed*�}/Wn tj"�	y(|%�ad8�}/Yn0Yn0|0�	sN|%|/�c�}1t	d9�|1}0|%jL�|0�tf|%|/�||%jRv�	r|tg�h|%|�|du�	r�t(|�|du�	r�t(|�|%�4��|%jitjjkd:�Wd�n1�	s�0YWt(|||�|du�	r�t)�*|d�|du�
r|�+�|�
r~|�,�du�
r~|�+�nRt(|||�|du�
rNt)�*|d�|du�
r`|�+�|�
r||�,�du�
r||�+�0||fS);a�Make a copy of an existing repository.

    Create a copy of an existing repository in a new directory.  The
    source and destination are URLs, as passed to the repository
    function.  Returns a pair of repository peers, the source and
    newly created destination.

    The location of the source is added to the new repository's
    .hg/hgrc file, as the default to be used for future pulls and
    pushes.

    If an exception is raised, the partly cloned/updated destination
    repository will be deleted.

    Arguments:

    source: repository object or URL

    dest: URL of destination repository to create (defaults to base
    name of source repository)

    pull: always pull from source repository, even in local case or if the
    server prefers streaming

    stream: stream raw data uncompressed from repository (fast over
    LAN, slow over WAN)

    revs: revision to clone up to (implies pull=True)

    update: update working directory after clone completes, if
    destination is local repository (True means update to default rev,
    anything else is treated as a revision)

    branch: branches to clone

    shareopts: dict of options to control auto sharing behavior. The "pool" key
    activates auto sharing mode and defines the directory for stores. The
    "mode" key determines how to construct the directory name of the shared
    repository. "identity" means the name is derived from the node of the first
    changeset in the repository. "remote" means the name is derived from the
    remote's path/URL. Defaults to "identity."

    storeincludepats and storeexcludepats: sets of file patterns to include and
    exclude in the repository copy, respectively. If not defined, all files
    will be included (a "full" clone). Otherwise a "narrow" clone containing
    only the requested files will be performed. If ``storeincludepats`` is not
    defined but ``storeexcludepats`` is, ``storeincludepats`` is assumed to be
    ``path:.``. If both are empty sets, no files will be cloned.
    Nsdestination directory: %s
rs#empty destination path is not validT)r*sdestination '%s' already existssdestination '%s' is not emptyFspath:.snarrowfilessshallowfilestores	lfs-serveslfsse(remote is using large file support (lfs), but it is explicitly disabled in the local configuration)
sT(remote is using large file support (lfs); lfs will be enabled for this repository)
spoolsmodesidentityr�r��0s7(not using pooled storage: remote appears to be empty)
sA(not using pooled storage: unable to resolve identity of remote)
sremotesunknown share naming mode: %ss1(pooled storage not supported for narrow clones)
)r�r�r�r�s.hg)�waitspreoutgoingsclone)�throwr~)rr)�streamclone�outgoing)r~�noder�r�r�r�)�uisquietbookmarkmove)r�ZstreamclonerequestedZincludepatsZexcludepats�depths2narrow clone not available for remote destinations)rFr	s)clone from remote to remote not supportedsclonedr�sexperimentalsremotenames��@supdating to bookmark %s
s%updating to bookmark %s on branch %s
r�supdating to branch %s
)Zcaches)lr_r`r(r�rHr!rTrr�rr+rZ
InputErrorr�r$�lexists�isdir�listdirrZvalidatepatternsrJrZ
disabled_helprZrarLrMrNr�nullidr,r4r�rrOr&Zsha1�digestr2r�r��shutil�rmtree�closercr"r�r��realpathZcancopyrZ	hassecretrZ	LockErrorrvrZclone_requirementsZcreaterepositoryZmakelocalrepositoryr��r�Z
local_copy�weakref�refZ_lockrefZ	_wlockrefr@Z
nodeconstantsZnullhexr3r�r�rKZ
setnarrowpatsr�r�	setconfigZconfigoverriderr��push�
_bookmarks�keys�uimodZsamplehgrcs�passwdr�r�Z
configboolrZpullremotenames�lenrZisrevsymbolZ	revsymbolr�r��_activebookmarkrA�KeyErrorZ	branchtipr�r	�activateZupdatecaches�
repositorymodZCACHES_POST_CLONE)2rr�r~r�r�rFr�r�rAZ	shareoptsZstoreincludepatsZstoreexcludepatsr��srcr�rQr�Zsrclockr�Z	destwlockZcleandirZdestpeerr�ZdestvfsrlZnarrowZ	sharepoolZ
sharenamemoder�r7Zrootnoder�r�Zhgdir�copyZdestrootpathZ	dest_reqsr�r��instr�r�rcr\Z
defaulturlZ	overridesr�r�r�Zbnr8r8r9r�Zs~A






�

�



����




��(����
�
���

���


����

�
�
�

���	
���(
J
�(	����



��(




�



0


�


r�cCs8|r|��rdS|j�td�|j|j|j|jf�dS)NsI%d files updated, %d files merged, %d files removed, %d files unresolved
)Zisemptyrr�rZupdatedcountZmergedcountZremovedcount�unresolvedcount)rerw�
quietemptyr8r8r9�
_showstats/s����r�cCs(|j�dd�tj||d|ddg|d�S)z�Update the working directory to node.

    When overwrite is set, changes are clobbered, merged else

    returns stats (see pydoc mercurial.merge.applyupdates)sBprefer merge.update() or merge.clean_update() over hg.updaterepo()s5.7Fsworking copysdestination)Zbranchmerge�force�labels�updatecheck)rZ
deprecwarn�mergemodr�)rer�Z	overwriter�r8r8r9�
updaterepo@s��r�cCs>tj|||d�}t|||�|jr4|j�td��|jdkS)z$update the working directory to node�r�s1use 'hg resolve' to retry unresolved file merges
r)r�r�r�r�rr�r)rer�r�r�rwr8r8r9r�Ts
r�cCs"t�||�}|rt|||�dS)zAforcibly switch the working directory to node, clobbering changesF)r��clean_updater�)rer�Z
show_statsr�rwr8r8r9�cleanasrcCs�|dur"|�dd�}|tvr"tj}|tvr:td|tf��|�����d}d}|durrtj||d�}|\}}}d}|r�t||�}	n,|tj	kr�t
j|dd�tj}t
|||d	�}	|	�s4|�r4||d
��kr�nft�||g|d
����r|�|jd�}
|�td�|
�n*|�|jd
�}
|�td�|
�t�|�n|||jv�rx||jk�rj|�|d�}
|�td�|
�t�||�n8|�r�|j�r�|�|jd
�}
|�td�|
�t�|�|�r�t�||�Wd�n1�s�0Y|	S)aUpdate the working directory with extra care for non-file components

    This takes care of non-file components below:

    :bookmark: might be advanced or (in)activated

    This takes arguments below:

    :checkout: to which revision the working directory is updated
    :brev: a name, which might be a bookmark to be activated after updating
    :clean: whether changes in the working directory can be discarded
    :updatecheck: how to deal with a dirty working directory

    Valid values for updatecheck are the UPDATECHECK_* constants
    defined in the merge module. Passing `None` will result in using the
    configured default.

     * ABORT: abort if the working directory is dirty
     * NONE: don't check (merge working directory changes into destination)
     * LINEAR: check that update is linear before merging working directory
               changes into destination
     * NO_CONFLICT: check that the update does not result in file merges

    This returns whether conflict is detected at updating or not.
    Nscommandssupdate.checkz,Invalid updatecheck value %r (can accept %r)F)rT)rrr;sbookmarks.activesupdating bookmark %s
r)s(leaving bookmark %s)
s(activating bookmark %s)
)r��_VALID_UPDATECHECKSr��UPDATECHECK_LINEARr1r�rZ
destupdate�_clean�UPDATECHECK_ABORTrZ
bailifchanged�UPDATECHECK_NONEr�r�r	r�Zlabelr�r�rZ
deactivater�r�Zstatusotherdests)rrer�Zbrevrr�ZmovemarkfromZwarndestZupdata�ret�br8r8r9�
updatetotallyusZ��


,r
cCsX|��}tj|||d�}t||�|jr:|j�td��n|rN|j�td��|jdkS)zWBranch merge with node, resolving changes. Return true if any
    unresolved conflicts.)r�r�sRuse 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
s'(branch merge, don't forget to commit)
r)rer�rr�r�rr�r)�ctxr�Zremindr�rerwr8r8r9r�s
��rcCsdtj�|�}|��r |j��}n|d��}|j�td�|dd��t	�
||�}t||�dS)Nr;s(aborting the merge, updating back to %s
�)�
mergestatemodrr�ZactiveZlocalctxrrr�rr�rr�)rre�msr�rwr8r8r9�
abortmerge�src
s�t�|||g�}t|�}t|�dkrBtd�}	|	t|�;}	t�|	��|d}
t�|
j|�	d��\}}|dur�t�
|�}|��r�t|�}n>t�
|�}|�
�r�tjj}
ntj}
|
d|j|f�|_t|�}t|||���j}z�|�td�t�|��t|�||�	d��\}}|�r �fd	d
�|D�}t�||�||�	d�|�	d��\�}}|�sh|�td
��|�W|�S|�d�tj|�||d�}|�||�|��W|�n|�0|�dS)z�
    Helper for incoming / gincoming.
    displaychlist gets called with
        (remoterepo, incomingchangesetlist, displayer) parameters,
    and is supposed to contain only code that can't be unified.
    rs<for now, incoming supports only a single source, %d providedr�branchN�%s/%s�comparing with %s
�revcsg|]}��|��qSr8)r��r<r��rPr8r9�
<listcomp>r?z_incoming.<locals>.<listcomp>rU�forcesno changes found
sincoming��buffered)r(Zget_pull_pathsrIr�rrr2r�ZrawlocrZr!�isabsr`rar,r4r}�	posixpathrHr�r��hidepasswordrTr
Zgetremotechanges�pagerr�changesetdisplayer)Z
displaychlist�subreporecurserrer~r{r�subpathZsrcs�msgr4rQ�pr}Z	cleanupfnrFr��chlist�	displayerr8rr9�	_incoming�sT




�
�
�
r%c	s6����fdd�}��fdd�}t||����|d�S)NcsHd}��d�rD�d}t|j�D]"}|�|�}t||������}q |S�Nrssubrepos)rZr�r�r��min�incoming)rrr r��r{rer~rr8r9r+s

z incoming.<locals>.subreporecursecs�t���}��d�r|��d}|D]`}|dur<||kr<q��fdd�|j�|�D�}��d�rnt|�dkrnq$|d7}|�||�q$dS)N�newest_firstrcsg|]}|�jkr|�qSr8�r��r<r"rdr8r9r<sz-incoming.<locals>.display.<locals>.<listcomp>�	no_merges�r)r�getlimitrZ�reverse�	changelog�parentsr��show)rPr#r$�limit�countr�r2)r{rer8r9�display4s



�zincoming.<locals>.display�r )r%)rrer~r{r rr6r8r)r9r(*s
	�r(cs�t�}g}t��||�D�]F}|jp(|j}|dur�t�|�}|��rNt|�}n>t�|�}	|	��rjt	j
j}
ntj}
|
d|	j
|f�|	_
t|	�}|j
|�d�p�gf}|�td�t�|��t��||�d��\}}
|r�fdd�t��|�D�}t�||�}zNtj�|||�d�d�}|j}|�|�|�s<t��j�|j�|�|�Wq|���Yq0qt |�}�j!}|j"|j#d	�||fS)
Nrrrrcsg|]}�|���qSr8)r�rrdr8r9r_r?z_outgoing.<locals>.<listcomp>r)r�)�key)$r�r(Zget_push_pathsZpushloc�locr!rr`rar,r4r}rrArZr�rrrTrZrevrangerHr
Zfindcommonoutgoing�missingr�rZnochangesfoundrZexcludedrKr�rIr1�sortr�)rre�destsr{r �out�othersr4r�r"r}rQrFr�rP�outgoing�oZ
outgoing_revs�clr8rdr9�	_outgoingIsH



�

rBcCsHd}|�d�rD|d}t|j�D]"}|�|�}t||�|||��}q |Sr&)rZr�r�r�r'r?)rrer<r{rrr r�r8r8r9�_outgoing_recurseus

rCc
#s�t�|�}|�d�}|�d�r&|��|durF|sF|D]
}|Vq6dSd}�j}|D]P}|durl||krlq��fdd�|�|�D�}	|r�t|	�dkr�qT|d7}|VqTdS)	z5apply revision filtering/ordering option for outgoingr-r*Nrcsg|]}|�jkr|�qSr8r+r,rdr8r9r�r?z$_outgoing_filter.<locals>.<listcomp>r.r)rr/rZr0r1r2r�)
rerFr{r4Z	no_mergesr=r5rAr�r2r8rdr9�_outgoing_filters$


rDc	Cs8|�d�rt�g|�t|||||d�\}}d}z�|r�d}|�d�r�t�|||�}|�d�tj|||dd�}	t�||||	tj	�n@|�d�t�|||�}	t
|||�D]}
|	�||
�q�|	��|D]*}t
�|||||�t|t||||��}q�|W|D]}|��q�S]}|���qn|D]}|���q"0dS)Nsgraphr7rrr�Tr)rZrZcheckunsupportedgraphflagsrBZ	graphrevsrrZdisplaygraphrZ
asciiedgesrDr3r�rZ
outgoinghooksr'rC)rrer<r{r r@r>rZrevdagr$r�Zothr8r8r9r?�s@


��

��r?cCs�tj||d�}|�dt�|j|��d��}|r�|j�t	d��|D]�}||}zf|j
D]Z}z|j|dd���pp|}WqVtj
y�}z |j�d||f�WYd}~qVd}~00qVWqBty�|j�t	d	�t|����YqB0qB|S)
z&verify the consistency of a repository)�levelsfilelog(%s)s.hgsubstateschecking subrepo links
F)Zallowcreates%d: %s
Ns&.hgsubstate is corrupt in revision %s
)�	verifymodr#rFr"Zpathtor��getcwdrr�rr�r�rZ	RepoError�warn�	Exceptionrr�)rerErrFr�rr r7r8r8r9r#�s,�
�0
��r#c	Cs�t�|d�r|j��}|j}n|��}dD].}|�|�pB|�d|�}|r*|�d||d�q*|�dd�}|rz|�dd|d�dD](}|�|�D]\}}|�|||d�q�q~|�dd	�}|r�|�dd	t�	|�d�|S)
z*build a remote ui from ui or repo and optssbaseui)rWs	remotecmdr�scopiedrUsmainreporoot)sauthshostfingerprintsshostsecuritys
http_proxyswebscacerts)
r"r[r�r�rrZr�r�Zconfigitemsr*)	r�r{�dstr@�vr=Zsectr8�valr8r8r9rz�s$
rz))�spaths
00changelog.i)rMr�)rMsobsstore)spathr)c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�cachedlocalrepoz6Holds a localrepository that can be cached and reused.cCs"||_|��\|_|_|j|_dS)z�Create a new cached repo from an existing repo.

        We assume the passed in repo was recently created. If the
        repo has changed between when it was created and when it was
        turned into a cache, it may not refresh properly.
        N)�_repo�
_repostate�_state�mtimeZ
filtername�_filtername)�selfrer8r8r9�__init__szcachedlocalrepo.__init__cCsj|��\}}||jkr |jdfSt|jj|j���}|jrJ|�|j�|_n
|��|_||_||_	|jdfS)aRefresh (if necessary) and return a repository.

        If the cached instance is out of date, it will be recreated
        automatically and returned.

        Returns a tuple of the repo and a boolean indicating whether a new
        repo instance was created.
        FT)
rPrQrOr%r�r!rSry�
unfilteredrR)rT�staterRrer8r8r9�fetchs


zcachedlocalrepo.fetchc	Cs�g}d}tD]t\}}t|j|�}tj�||�}zt�|�}WntyXt�|�}Yn0|�|tj	|j
f�t||tj	�}qt|�|fS)N���)
�foirrOr,r4r�r-r3rK�ST_MTIME�st_size�max�tuple)rTrWZmaxmtime�attrr��prefixr"r5r8r8r9rP-szcachedlocalrepo._repostatecCsJt|jj|jj�}|jr&|�|j�}n|��}t|�}|j|_|j	|_	|S)z�Obtain a copy of this class instance.

        A new localrepository instance is obtained. The new instance should be
        completely independent of the original.
        )
r%rOr�ZorigrootrSryrVrNrQrR)rTrer�r8r8r9r�<szcachedlocalrepo.copyN)�__name__�
__module__�__qualname__�__doc__rUrXrPr�r8r8r8r9rNs
rN)T)FNNN)r?FNNN)FNN)NTTNF)N)N)FNTF)
NFNTFNNNNN)F)N)FN)TF)FN)FTN)FN)N)N)N)N)fZ
__future__rr�r,rr�r-r�Zi18nrr�rrrZpycompatrr�r	r
rrr
rrrrrrrrrrr�rr
rrrrrrrr�r r!r"r#rFr$r�Z
interfacesr%r�Zutilsr&r'r(r�r�r:rTrYr^rarhrorxrHrr�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrZUPDATECHECK_NO_CONFLICTrr
rr%r(rBrCrDr?rzrZ�objectrNr8r8r8r9�<module>	s�x-�


�
�

�
00

/�
m�
X





�
R�
�
?

,

!
"!

Youez - 2016 - github.com/yon3zu
LinuXploit