ok

Mini Shell

Direktori : /lib64/python2.7/Demo/pdist/
Upload File :
Current File : //lib64/python2.7/Demo/pdist/rrcs.pyc

�
Afc@s�dZddlZddlZddlZddlZddlZddlZddlmZd�Z	d�Z
d�Zd�Zd�Z
d	�Zd
�Zd�Zd�Zd
�Zdd�Zd�Zd�Zide
fd6de
fd6defd6defd6defd6defd6defd6defd6de
fd6defd6defd6Zedkr�e	�ndS( s$Remote RCS -- command line interfacei����N(t
openrcsclientc
Csntjt_y�tjtjdd�\}}|s=d}n|d|d}}tj|�sptjd�nt|\}}tj||�\}}WnZtjk
r�}|GHdGHdGHdGHd	GHd
GHdGHdGHd
GHdGHdGHtjd�nXt	|�}|s|j
�}nxP|D]H}	y||||	�Wqttjfk
re}d|	|fGHqXqWdS(Nis	h:p:d:qvLtheadisunknown commands2usage: rrcs [options] command [options] [file] ...swhere command can be:s+      ci|put      # checkin the given filess      co|get      # checkouts%      info        # print header infos1      head        # print revision of head branchs*      list        # list filename if valids"      log         # print full logs/      diff        # diff rcs file and work files7if no files are given, all remote rcs files are assumedis%s: %s(
tsyststderrtstdouttgetopttargvtcommandsthas_keyterrortexitRt	listfilestIOErrortos(
toptstresttcmdtcoptsettfunctcoptstfilestmsgtxtfn((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pytmain
s>	
cCs�t|�}|j�}|j�|j|�}|r[t||||�r[d|GHdSdG|GdGHt|�}|j|||�}|r�|GHndS(Ns %s: unchanged since last checkinsChecking ins...(topentreadtclosetisvalidtsamet
asklogmessagetput(RRRtftdatatnewtmessagetmessages((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pytcheckin/s
	
cCs9|j|�}t|d�}|j|�|j�dS(Ntw(tgetRtwriteR(RRRR!R ((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pytcheckout=s
cCs|j|�dS(N(tlock(RRR((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pyR*CscCs|j|�dS(N(tunlock(RRR((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pyR+FscCsT|j|�}|j�}|j�x|D]}|dG||GHq,WddGHdS(Nt:t=iF(tinfotkeystsort(RRRtdictR/tkey((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pyR.Is

cCs|j|�}|G|GHdS(N(R(RRRR((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pyRQscCs|j|�r|GHndS(N(R(RRR((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pytlistUscCsTd}x&|D]\}}|d||}q
W|d}|j||�}|GHdS(Ntt i(tlog(RRRtflagstotaR$((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pyR6Ys
c	Cs�t|||�rdSd}x&|D]\}}|d||}q#W|d}|j|�}tj�}|j|�|j�d||j|�|fGHtjd||j	|f�}|r�ddGHndS(NR4R5isdiff %s -r%s %ss
diff %s %s %sR-iF(
RR'ttempfiletNamedTemporaryFileR(tflushRR
tsystemtname(	RRRR7R8R9R!ttftsts((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pytdiffas


cCs_|dkr1t|�}|j�}|j�ntj|�j�}|j|�}||kS(N(tNoneRRRtmd5R"tdigesttsum(RRRR!R tlsumtrsum((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pyRqs
cCs�|r
dGndGdGH|r$dGHnd}xQtjjd�tjj�tjj�}|sl|dkrpPn||}q-W|S(Nsenter description,senter log message,s)terminate with single '.' or end of file:s"NOTE: This is NOT the log message!R4s>> s.
(RRR(R<tstdintreadline(R"R#tline((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pyRzs
cCs,ytj|�Wntjk
r'nXdS(N(R
tunlinkR	(R((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pytremove�sR4tciRtcoR'R.RR3R*R+sbhLRtd:l:r:s:w:V:R6tcRAt__main__(t__doc__RR
RtstringRCR:t	rcsclientRRR%R)R*R+R.RR3R6RARBRRRLRt__name__(((s'/usr/lib64/python2.7/Demo/pdist/rrcs.pyt<module>sD	"												











Zerion Mini Shell 1.0