Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/pdist/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/pdist/rcvs.pyc

�
Afc@s�dZddlmZmZddlZddlZddlZddlZddlm	Z	dZ
defd��YZdZd	Z
d
efd��YZde	fd
��YZd�Zd�Zedkr�e�ndS(s$Remote CVS -- command line interfacei����(tCVStFileN(tCommandFrameWorkitMyFilecBskeZd�Zd�Zdd�Zgd�Zd�Zdd�Zd�Zd�Z	d	�Z
d
�ZRS(cCsl|js|j�n|js,|j�n|js||jsR|jsKdSdSqh|js_dS|j|jkrudSdSn�|js�|jr�|jr�dSdSqh|jr�dG|jGd	GHd
SdSn�|js�|j	r�dSdSn�|j	r	|j|jkrd
SdSn|j|j
kr8|j
|jkr1dSd
Sn0|j
|jkrNdS|j|jkrdd
SdSdS(sReturn a code indicating the update status of this file.

        The possible return values are:

        '=' -- everything's fine
        '0' -- file doesn't exist anywhere
        '?' -- exists locally only
        'A' -- new locally
        'R' -- deleted locally
        'U' -- changed remotely, no changes locally
               (includes new remotely or deleted remotely)
        'M' -- changed locally, no changes remotely
        'C' -- conflict: changed locally as well as remotely
               (includes cases where the file has been added
               or removed locally and remotely)
        'D' -- deleted remotely
        'N' -- new remotely
        'r' -- get rid of entry
        'c' -- create entry
        'u' -- update entry

        (and probably others :-)
        t0tNt?tctCtRtrswarning:swas losttUtAtDtut=tMN(tlseentgetlocaltrseent	getremoteteseentlsumtrsumtedeletedtfiletenewtesum(tself((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytaction0sT	
	
											cCs
|j�}|dkrdS|G|jGH|dkrA|j�n�|dkr\d|jGHn�|dkr�t|j�d|_n�|dkr�d|_nm|dkrd|_|j|_d|_d|_|j	|_
tj|j�d\|_
|_d
|_ndS(NRRRRs+%s: conflict resolution not yet implementedR
iR
RRii����t(RR(RR(RRtgettremoveRtrrevterevRRRRtoststattemtimetectimetextra(Rtcode((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytupdateys,

			"RcCsc|j�}|dkr)|j|�dS|dkrDd|jGHn|dkr_d|jGHndS(	NRRiR	s*%s: committing removes not yet implementedRs+%s: conflict resolution not yet implemented(RR(RtputR(RtmessageR(((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytcommit�s
cCsE|j�d}|j}x;|D]3\}}|dkrA|}q |d||}q W||jkr||j|jkr|dS|d}|j}|jj||f�}tj|�j	�}|j|kr�dSddl
}	|	j�}
|
j|�|
j
�d|||fGHtjd||
j|f�}|rAdd	GHndS(
NRs-rt ii����sdiff %s -r%s %ss
diff %s %s %sRiF(RR!RRRtproxyRtmd5tnewtdigestttempfiletNamedTemporaryFiletwritetflushR#tsystemtname(RtoptstflagstrevtotatfntdatatsumR2ttftsts((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytdiff�s.
		!
	

cCs|j�dkS(NR(R(R((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytcommitcheck�scCs�dG|jGdGHt|j�j�}|jsD|jj|j�n|jj|j||�}|rm|GHn|j|jj|j�|j	�dS(NsChecking ins...(
RtopentreadRR.tlockR*tsetentrytheadR(RR+R>tmessages((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyR*�s	cCsX|jj|j�}t|jd�}|j|�|j�|j|j|j�dS(Ntw(	R.RRRDR4tcloseRGR!R(RR>tf((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyR�s


cCs|jj|j|�GHdS(N(R.tlogR(Rt
otherflags((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRM�scCsXd|_|j|_d\|_|_d|_d|_d|_d|_d|_dS(NiRi(ii(	RRRR%R&R"RRR'(R((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytadd�s					cCsed|_||_tj|j�d\|_|_||_d|_d|_	d|_d|_
dS(Nii����iR(RRR#R$RR%R&R"RRR'(RR"R((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRG�s		"				(t__name__t
__module__RR)R,RBRCR*RRMRORG(((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyR.s	I		
			
s/usr/lib/sendmail -tsoTo: %s
Subject: CVS changes: %s

...Message from rcvs...

Committed files:
        %s

Log message:
        %s
tRCVScBsqeZeZd�Zd�Zdd�Zdd�Zd�Zd�Z	d�Z
d�Zd	�Zd
d�Z
RS(cCstj|�dS(N(Rt__init__(R((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRS�scCs+x$|j|d�D]}|j�qWdS(Ni(twhichentriesR)(Rtfileste((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyR)�sRcCs�|j|�}|sdSd}x#|D]}|j�s&d}q&q&W|sTdGHdS|sitd�}ng}x0|D](}|j|�rv|j|j�qvqvW|j||�dS(Niiscorrect above errors firstsOne-liner: (RTRCt	raw_inputR,tappendRtmailinfo(RRUR+tlisttokRVt	committed((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyR,�s"


cCs�d}t|tj|�tj|�|f}ddGH|GHddGHtd|�}tjtj|��dkr�tjtd�}|j	|�|j
�}|r�d	t|�GHq�d
GHndGHdS(
Nssjoerd@cwi.nl, jack@cwi.nlt-iFsOK to mail to %s? tytyetyesRJsSendmail exit status %ss
Mail sent.s
No mail sent.(R^R_R`(tMAILFORMtstringtjoinRWtlowertstripR#tpopentSENDMAILR4RKtstr(RRUR+ttowhomtmailtextR[tpRA((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRYs		
cCs(x!|j|�D]}|j�qWdS(N(RTtreport(RRURV((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRl!scCs+x$|j|�D]}|j|�qWdS(N(RTRB(RRUR8RV((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRB%scCsC|std�ng}x$|j|d�D]}|j�q+WdS(Ns!'cvs add' needs at least one filei(tRuntimeErrorRTRO(RRURZRV((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRO)s
cCs|std�ntd�dS(Ns 'cvs rm' needs at least one files'cvs rm' not yet imlemented(Rm(RRU((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytrm0scCsZd}x&|D]\}}|d||}q
Wx$|j|�D]}|j|�q?WdS(NRR-(RTRM(RRUR8R9R;R<RV((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRM5s
icCs�|rkg}xE|D]Q}|jj|�r;|j|}n|j|�}||j|<|j|�qWn�|jj�}xX|jj�D]G}|jj|�r�q�n|j|�}||j|<|j|�q�W|rJxltjtj	�D]U}|jj|�r�|j
|�r�|j|�}||j|<|j|�q�q�Wn|j�|jr�x/|D]$}|jdkrd|j|_qdqdWn|S(N(
tentriesthas_keyt	FileClassRXtvaluesR.t	listfilesR#tlistdirtcurdirtignoredtsorttNone(RRUt
localfilestooRZRRV((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRT<s8




	
(RPRQRRqRSR)R,RYRlRBRORnRMRT(((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRR�s							trcvscBs�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZdZ
eZe
Zd�Zd
ZeZeZd�ZdZeZeZd�Zd�ZeZd�ZdZRS(s	d:h:p:qvLsMusage: rcvs [-d directory] [-h host] [-p port] [-q] [-v] [subcommand arg ...]s<If no subcommand is given, the status of all files is listedcCs&tj|�d|_t�|_dS(sConstructor.N(RRSRxR.RRtcvs(R((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRSes
	cCs&|jr|jj�nd|_dS(N(R.t_closeRx(R((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRKks	cCs|j�tjtj�}x�|D]�}|tjks#|tjkrMq#n|dkr_q#ntjj|�swq#ntjj|�r�q#ndG|GdGHtj|�z3tjjd�r�|j	�j
�n
|j�Wdtjtj�dG|GdGHXq#WdS(NRs--- entering subdirectorys---s--- left subdirectory(RKR#RtRutpardirtpathtisdirtislinktchdirt	__class__truntrecurse(RtnamesR7((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyR�ps&



cCs
||_dS(N(R8(RR8((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytoptions�scCsEddl}|j|j�|_|jj|j�|jj�dS(Ni����(t	rcsclientt
openrcsclientR8R.R{tsetproxyt
getentries(RR�((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytready�scCs|jjg�dS(N(R{Rl(R((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytdefault�scCs|jj|�dS(N(R{Rl(RR8RU((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyt	do_report�scCs�t}x>|D]6\}}|dkr.d}n|dkr
d}q
q
W|jj|�|jj�|r|r|j�ndS(supdate [-l] [-R] [file] ...s-lis-RiN(t	DEF_LOCALR{R)t
putentriesR�(RR8RUtlocalR;R<((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyt	do_update�s	

s-lRcCsVd}x)|D]!\}}|dkr
|}q
q
W|jj||�|jj�dS(scommit [-m message] [file] ...Rs-mN(R{R,R�(RR8RUR+R;R<((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyt	do_commit�s
sm:cCs|jj||�dS(sdiff [difflags] [file] ...N(R{RB(RR8RU((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytdo_diff�sscbitwcefhnlr:sD:S:cCs0|sdGHdS|jj|�|jj�dS(sadd file ...s%'rcvs add' requires at least one fileN(R{ROR�(RR8RU((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytdo_add�s
cCs0|sdGHdS|jj|�|jj�dS(sremove file ...s('rcvs remove' requires at least one fileN(R{R R�(RR8RU((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyt	do_remove�s
cCs|jj||�dS(slog [rlog-options] [file] ...N(R{RM(RR8RU((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytdo_log�ssbhLNRtd:s:V:r:(RPRQtGlobalFlagstUsageMessagetPostUsageMessageRSRKR�R�R�R�R�R�tflags_updatetdo_uptflags_upR�tflags_committdo_comt	flags_comR�t
flags_difftdo_dift	flags_difR�R�tdo_rmR�t	flags_log(((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyRz]s6								
					cCs,ytj|�Wntjk
r'nXdS(N(R#tunlinkterror(R=((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyR �scCs)t�}z|j�Wd|j�XdS(N(RzR�RK(R
((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pytmain�s	t__main__(t__doc__tcvslibRRR/R#RbtsystcmdfwRR�RRgRaRRRzR R�RP(((s'/usr/lib64/python2.7/Demo/pdist/rcvs.pyt<module>s  �lp		

Hacked By AnonymousFox1.0, Coded By AnonymousFox