KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : andertr9 ( 1047)
PHP Version : 8.2.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/hgext/convert/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/hgext/convert/cvsps.pyo
�
Hq�Qc@s�ddlZddlZddlZddlmZddlmZddlmZddlmZde	fd��YZ
defd��YZd	�Z
ed
eed�Zde	fd
��YZdeed�Zd�ZdS(i����N(tutil(t_(thooktlogentrycBs eZdZd�Zd�ZRS(s�Class logentry has the following attributes:
        .author    - author name as CVS knows it
        .branch    - name of branch this revision is on
        .branches  - revision tuple of branches starting at this revision
        .comment   - commit message
        .commitid  - CVS commitid or None
        .date      - the commit date as a (time, tz) tuple
        .dead      - true if file revision is dead
        .file      - Name of file
        .lines     - a tuple (+lines, -lines) or None
        .parent    - Previous revision of this entry
        .rcs       - name of file as returned from CVS
        .revision  - revision number as tuple
        .tags      - list of tags on the file
        .synthetic - is this a synthetic "file ... added on ..." revision?
        .mergepoint - the branch that has been merged from (if present in
                      rlog output) or None
        .branchpoints - the branches that start at the current entry or empty
    cKst|_|jj|�dS(N(tFalset	synthetict__dict__tupdate(tselftentries((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt__init__$s	cs?�fd�t�j�D�}dt��jdj|�fS(Nc3s&|]}d|�j|fVqdS(s%s=%rN(R(t.0tk(R(s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pys	<genexpr>)ss%s(%s)s, (tsortedRttypet__name__tjoin(Rtitems((Rs9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt__repr__(s(Rt
__module__t__doc__R
R(((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyRs	tlogerrorcBseZRS((RR(((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR,scCs_|jd�}|djd�}d}|dkr=|}n|d|djd|�}|S(sUReturn the repository path from a CVS path.

    >>> getrepopath('/foo/bar')
    '/foo/bar'
    >>> getrepopath('c:/foo/bar')
    '/foo/bar'
    >>> getrepopath(':pserver:10/foo/bar')
    '/foo/bar'
    >>> getrepopath(':pserver:10c:/foo/bar')
    '/foo/bar'
    >>> getrepopath(':pserver:/foo/bar')
    '/foo/bar'
    >>> getrepopath(':pserver:c:/foo/bar')
    '/foo/bar'
    >>> getrepopath(':pserver:truc@foo.bar:/foo/bar')
    '/foo/bar'
    >>> getrepopath(':pserver:truc@foo.bar:c:/foo/bar')
    '/foo/bar'
    >>> getrepopath('user@server/path/to/repository')
    '/path/to/repository'
    t:i����t@it/(tsplittfind(tcvspathtpartst
atpositiontstarttrepopath((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pytgetrepopath/s	tc8s�i��fd�}|jtd��g}tjd�}tjd�}tjd�}	tjd�}
tjd�}tjd�}tjd	�}
tjd
�}tjd�}tjd�}tjd
�}tjd�}tjd�}d}|dYkr�yFttjjdd��j	�j
�}|}|dkrHd}nWn#tk
rnttd���nX|r�|j
tj�r�|tj7}ny+ttjjdd��j	�j
�}Wq�tk
r�q�Xn|s�tjjdd�}ng}dY}|r�tjjd�}tjj|�s>tj|�n|jd�|dg}g|D]'}|r^djtjd|��^q^}tjj|djg|D]}|r�|^q���}n|dkr�y�|jtd�|�tjt|��}xa|D]Y}tj|d�o@tj|d�o@tj|d �s|jtd!��g}PqqW|jtd"�t|��Wn*tk
r�}|jtd#�|�nX|r�|d$j}tj|d%�}q�nd&d'g}|rS|jd(|�tj t!|��}|j
d)�s.|d)7}n|rJ|tj |�}qS|}n|jd*d+g|�|r�|jd,|�n|j|�i}i}d-}t"} g|D]}!tj#|!�^q�}|jtd.�d/j|��|j$d0|||f�tj%d/j|��}"|"j&�}#x+
t'rV|#}$|$dkrHPn|"j&�}#|$j
d1�rp|$d$ }$n|d-kr�|j(|$�}%|%rC|%j)d2�}&i}|r7tj |&d3 �}'|'j*|�r�|'t|�}'n|'j*d)�r�|'d2}'n|'j*d4�r|'d5}'n|'j+d6d)�}'d7}q,nd2}q,n|j(|$�}%|%rpt|%j)d2���n|	j(|$�}%|%r�t|%j)d7���n|
j(|$�r�t|$��q�n|d2kr�|j(|$�}%tj |%j)d2��}'d7}n�|d7kr'|j(|$�r�i}d8}q�n�|d8krW|
j(|$�}%|%r$g|%j)d7�jd�D]}(t,|(�^qa})t|)�}*|*d8kr�|*d7d-kr�|)d3d-kr�|)d3 |)d$})nt-|)�})|)|kr�g||)<n||)j|%j)d2��|%j)d7�||%j)d2�<q�|j(|$�r<d9}q�|j(|$�r�d-}q�n�|d:kr~|j(|$�r�d9}q�n]|d9kr	|j(|$�}%t.d;||&�d<||'�d=t-g|%j)d2�jd�D]}(t,|(�^q��d>gd?dYddYd dYdt/��}d5}n�|d5krX|j(|$�}%|%j)d2�}+|+d7d)krb	d@|+}+nt|+j��d8kr�	|+dA}+ntj0|+dBdCdDg�|_||%j)d7��|_1|%j)d8�j2�dEk|_3|%j)d9�rJ
|%j)d5�r)
t,|%j)d9��t,|%j)d5��f|_4q�
t,|%j)d9��d-f|_4n9|%j)d5�rz
d-t,|%j)d5��f|_4n	dY|_4|%j)dF�r�
|%j)dG�|_5n|%j)dH�rF|%j)dI�jd�},t|,�d7kr�
dJ|_6qFdj|,d3 dK|,d3g�},g|D]}-||-|,kr|-^q}.|.d-|_6ng|_7dF}n�|dFkr<|j(|$�}/|/r�g|/j)d2�jdL�D]:}(t-g|(j
�jd�D]}0t,|0�^q��^q�|_8dG}q�|j(|$�r|j(|#�rd9}t'} q�|j(|$�r)d-}t'} q�|j7j|$�n�|dGkr�|j(|$�r�|#}1|1j
d1�ry|1d$ }1n|j(|1�r�d9}t'} q�|j7j|$�q�|j(|$�r�d-}t'} q�|j7j|$�n| rU
|j3rU
|j9d$d2krU
t|j7�d2krU
|j(|j7d-�rU
|j$dM|j:|j7d-f�t'|_;n| r,t"} t<g|j|j9g�D]}(||(�^qz
�|_=|d1j|j7��|_7t|j9�}*|*d8kr|*d7d-kr|j|j9d$ dYg�d-|_>n	dY|_>t/�}2x�|j?�D]�\}3}4t-g|4jd�D]}5t,|5�^qB�}6t|6�d7kruq#n|6d3d-kr�|6d$d7d-kr�|6d3 |j9kr�|2j@|3�q�q#|6dZkr#|6|j8kr�|2j@|3�q�q#q#W|2|_A|j|�t|�dNd-krS|jtjBdOt|�|jCfdP�d1�qSq,q,W|jDdQdR��i}7xq|D]i}|j9d$ }3|7j|j:|3fdY�}|dYkr�|j9d3 }n||_E|j9|7|j:|3f<qwW|r~|ru|jDdQdS��|r8|d$j|d-jkr8ttdT���n||}|jtdU�|�tjF|t|dV��q~|}n|jtdW�t|��tGjG|dYdXt'd*|�|S([sCollect the CVS rlogcs�j||�S(s#return a shared version of a string(t
setdefault(ts(t_scache(s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pytscache\sscollecting CVS rlog
sRCS file: (.+)$scvs \[r?log aborted\]: (.+)$scvs (r?log|server): (.+)
$s>(Cannot access.+CVSROOT)|(can't create temporary directory.+)$sWorking file: (.+)$ssymbolic names:s	(.+): ([\d.]+)$s----------------------------$sN=============================================================================$s(revision ([\d.]+)(\s+locked by:\s+.+;)?$s�date:\s+(.+);\s+author:\s+(.+);\s+state:\s+(.+?);(\s+lines:\s+(\+\d+)?\s+(-\d+)?;)?(\s+commitid:\s+([^;]+);)?(.*mergepoint:\s+([^;]+);)?sbranches: (.+);$s+file [^/]+ was (initially )?added on branchR!tCVSt
Repositoryt.snot a CVS sandboxtRoottCVSROOTs~/.hg.cvspsRtcachet-s\w+Rsreading cvs log cache %s
tbranchpointstcommitidt
mergepointsignoring old cache
scache has %d log entries
serror reading cache: %r
i����s%Y/%m/%d %H:%M:%S %1%2tcvss-qs-d%sRtlogtrlogs-d>%sisrunning %s
t sprefix=%r directory=%r root=%r
s
ii����sAttic/is/Attic/iiiitrcstfiletrevisiontbranchestparentt19s UTCs%y/%m/%d %H:%M:%Ss%Y/%m/%d %H:%M:%Ss%Y-%m-%d %H:%M:%Stdeadiii	i
tHEADt0t;s#found synthetic revision in %s: %r
ids%d %siPtkeycSs|j|jfS(N(R4R6(tx((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt<lambda>�scSs|jS(N(tdate(R?((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR@�ss>log cache overlaps with new log entries, re-run without cache.swriting cvs log cache %s
tws%d log entries
tcvslogN(iii(HtstatusRtretcompiletNonetopentostpathRtreadtstriptIOErrorRtendswithtseptenvirontgett
expandusertexiststmkdirRtfindalltnotetpickletloadRtsafehasattrtlent	ExceptionRAtdatestrtappendtnormpathR Rt
shellquotetdebugtpopentreadlinetTruetmatchtgroupt
startswithtreplacetintttupleRtsett	parsedatetauthortlowerR:tlinesR.R/tcommentR7R6R4RR
ttagstbrancht	iteritemstaddR-tellipsisR5tsortR8tdumpR(8tuit	directorytrootR2R+R%R1tre_00tre_01tre_02tre_03tre_10tre_20tre_30tre_31tre_32tre_50tre_60tre_70t
file_added_retprefixtoldlogRAtcachedirt	cachefileR#tetcmdtpRpt	branchmaptstatetstoretargtpfptpeektlineRdR4tfilenameR?trevtrevntdtmyrevtbR7tmtytcpeekR-RqR6titrevpartstversions((R$s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt	createlogVs'

+
4.
!

	
" 	


	1,
		1	

0!!	!)		Y			
					7&		.$	
:

	 
	t	changesetcBs eZdZd�Zd�ZRS(s�Class changeset has the following attributes:
        .id        - integer identifying this changeset (list index)
        .author    - author name as CVS knows it
        .branch    - name of branch this changeset is on, or None
        .comment   - commit message
        .commitid  - CVS commitid or None
        .date      - the commit date as a (time,tz) tuple
        .entries   - list of logentry objects in this changeset
        .parents   - list of one or two parent changesets
        .tags      - list of tags on this changeset
        .synthetic - from synthetic revision "file ... added on branch ..."
        .mergepoint- the branch that has been merged from or None
        .branchpoints- the branches that start at the current entry or empty
    cKst|_|jj|�dS(N(RRRR(RR	((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR
�s	cs?�fd�t�j�D�}dt��jdj|�fS(Nc3s&|]}d|�j|fVqdS(s%s=%rN(R(RR(R(s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pys	<genexpr>�ss%s(%s)s, (R
RRRR(RR((Rs9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR�s(RRRR
R(((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR��s	i<cs|jtd��i�x?|D]7}|jr t|j�j|j���|j<q q W|jd�fd��g}t�}d!�x�t	|�D]�\}}�o�|j
�j
ko�|jd!k	r�|j�jkp�|jd!ks��jd!ko�|j�jko�|j�jko�|j
�j
ko��jd�jd|jd|jdko��jd�jd|kno�|j|ksWtd|jd|jd|j
d	|jd
gd|jd|j
d
|j��|j��t�}t|�ddkrWdt|�t|j�dd!f}	|jtj|	d�d�qWn�jj|�|j|j�|j�_q�Wx6|D].�t�j�dko��jdj�_q�Wd�}
x|D]��jj|
�q�Wd�}|j|�i�x@|D]8�x/�jD]$}x|jD]}��|<q-WqWq
Wx]|D]U�t�}
x!�jD]}|
j|j�qiWt��fd�|
D���_qPW|d!kr�d}n|r�tj|�}n|d!kr�d}n|rtj|�}ni}i}t|�}d}xD||krg||�x'�jD]}|||j|jf<qDWd!}�j
|kr�|�j
}nIxFt |�D]8}�j
||j
kr�|d!k	r�Pq�q�n|}q�Wg�_!|d!k	rC||}x-|jr |j!r|j!d}q�d!}Pq�W|d!k	rC�j!j|�qCn�jr��jdkrgd!�_n�j!j||�j�n|rK|j"�j�}|rK|j#d�}|dkr�d!}ny|||}Wn1t$k
r|j%td�|�jf�nX||krH�j
|krH|jrH�j!j|�qHqKn|rM|j"�j�}|rM|j&�r�|j#d�}|dkr�d!}q�nd!}||krJ�j
|krJtd�jd|d	�jdd�j
d
gdgd|||�g�}|j'|d|�|d||<|d7}|d7}q$qJqMn||�j
<|d7}q$Wd}x7|t|�kr�||jr�||=qq|d7}qqWx't	|�D]\}�|d�_(q�W|jtd�t|��t)j)|d!dt*d |�|S("sConvert log into changesets.screating changesets
R>cs7�j|j�|j|j|j|j|j|jfS(N(RQR.RoRlRqRAR-(R?(tmindate(s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR@siiRoRlRqRAR	R/R-R.ids%d %si����iPs
cSs�|jjd�}|jjd�}t|�}t|�}t||�}x�t|�D]x}|d|kr~||kr~dS|d|kr�||kr�d
S||||kr�dS||||krXd
SqXWdS(sMimic cvsps sorting orderRii����i(R5RRZtmintrange(tltrtnltnrtnR�((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt
entitycompareHs	cSs�t|j�t|j�}|r&|Si}x!|jD]}|j||j<q6Wi}x!|jD]}|j||j<q`Wd}x9|jD].}|j|jd�|jkr�d}Pq�q�Wx9|jD].}|j|jd�|jkr�d}Pq�q�W|S(Niii����(tsumRAR	R6R4RQRGR8(R�R�R�tleR�RE((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pytcscmp_s&c3s%|]}�|�kr|VqdS(N((Rttag(tct
globaltags(s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pys	<genexpr>�ss{{mergetobranch ([-\w]+)}}s{{mergefrombranch ([-\w]+)}}R;sBwarning: CVS commit message references non-existent branch %r:
%s
s&convert-repo: CVS merge from branch %sRptparentsis%d changeset entries
t
cvschangesetst
changesetsN(+RDRR.R�RARQRuRjRGt	enumerateR-RoRlRqR5R�R/R]RZtreprRRtR	RsRRpRR
RERFR4R6txrangeR�tsearchRetKeyErrortwarntgroupstinserttidRRc(RwR1tfuzzt	mergefromtmergetoR�R�tfilesR�ttR�R�R�RpR�R7R�tfR�t	candidateR�tcc((R�R�R�s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pytcreatechangeset�s

	,	!$
	&#
	,	
	


	&		

	
			
%





cOs!|drd}n|dr&d}nd	}|d}yc|r|g}xP|D])}|t||d|dd|�7}qLWnt|d|dd|�}Wn%tk
r�}|jd|�d	SXt|||d
�}~t|�}	i}
i}x(|D] }|dry|j|
krf|jrf|jdjrf||jdjd
j|jdjf||j<n|j|
|j<n|dr�|jp�d|dkr�q�n|	s�|jd�|jd|j�|jdt	j
|jd��|jd|j�|jd|jpd�|jdddgt|j
�d
kdj|j
�pQdf�|jr�|jddjt|j���n|dr
|jr
t|j�d
kr�|jddjg|jD]}
t|
j�^q���q
|jd|jdj�n|dr�|j}g}x>|rc||\}}|jd |pNd||
|f�q&W|r�|jd!dj|��q�n|jd"�|jd#|j�|jd$�x�|jD]�}|j}|j|d%�r�|t|d%�}n|jd&|d'jg|jD]}t|�^q�p5d(d'jg|jD]}t|�^qE�dd)g|jf�q�W|jd*�n|r�|	r�|dt|j�ks�|d|j
kr�t}	q�nt|�d
kr�|	r�|d
t|j�ks|d
|j
krPqq�q�Wd	S(+s�Read CVS rlog for current directory or named path in
    repository, and convert the log to changesets based on matching
    commit log entries and dates.
    t	new_cachetwritetupdate_cacheRt	revisionsRyR+s%r
NR�t	ancestorsiiR7R;s---------------------
s
PatchSet %d 
s	Date: %s
s%Y/%m/%d %H:%M:%S %1%2sAuthor: %s
sBranch: %s
sTag%s: %s 
R!R#t,s(none)sBranchpoints: %s 
s, R�sParents: %s
sParent: %d
s%s:%d:%dsAncestors: %s
sLog:
s%s

s
Members: 
R�s	%s:%s->%s%s 
R(tINITIALs(DEAD)s
(RGR�RR�R�RZRqR�R�RR\RARlRpRR-R
tstrR]RoR	R5RfR8R6R:R(RwtargstoptsR+R�R1R�R�R�toffR7R�tcsR�R�R�R�R�tfnR?((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt
debugcvspss�
	
	

* 

(#
%			3
		( 

		1((RIREtcPickleRWt	mercurialRtmercurial.i18nRRtobjectRR[RR RGRcR�R�R�R�(((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt<module>s	'���

Anon7 - 2021