Server IP : 162.213.251.212 / Your IP : 3.15.194.249 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/proc/self/root/lib64/python2.7/Tools/scripts/ |
Upload File : |
� �fc@s�dZddlZddlZddlZddlZdZdZdadada d�Z d�Zd�ZdZ d�Zd�Zd �Zdddd�Zdd�Zedkr�e �ndS(s�Script to synchronize two source trees. Invoke with two arguments: python treesync.py slave master The assumption is that "master" contains CVS administration while slave doesn't. All files in the slave tree that have a CVS/Entries entry in the master tree are synchronized. This means: If the files differ: if the slave file is newer: normalize the slave file if the files still differ: copy the slave to the master else (the master is newer): copy the master to the slave normalizing the slave means replacing CRLF with LF when the master doesn't use CRLF i����NtasktyestnocCs)tjtjdd�\}}x�|D]�\}}|dkrGd}n|dkr\d}n|dkrq|an|dkr�|an|d kr�|an|d kr�|}n|dkr&|}aaaq&q&Wy|\}}Wn0tk rdGtjd p dGdGdGHdSXt||�dS(Nisnym:s:d:f:a:s-yRs-nRs-ss-ms-ds-fs-as usage: pythonistreesync.pys5[-n] [-y] [-m y|n|a] [-s y|n|a] [-d y|n|a] [-f n|y|a]sslavedir masterdir(tgetopttsystargvtwrite_slavetwrite_mastertcreate_directoriest ValueErrortprocess(toptstargstotatdefault_answertcreate_filestslavetmaster((s./usr/lib64/python2.7/Tools/scripts/treesync.pytmain#s0 cCsYtjj|d�}tjj|�s9dG|GHdGHdSddGHdG|GHdG|GHtjj|�s�td|d t�s�dG|GHd G|GHdSdG|GHytj|�Wn(tjk r�}dG|Gd G|GHdSXdG|GHnd}g}tj |�}x�|D]�}tjj||�}tjj||�}|dkrJ|}qtjj|�rtjj |�r|j||f�qqW|r1tjj|d�} x�t| �j �D]s} | jd�}|ddkr�|dr�|d}tjj||�}tjj||�} t|| �q�q�Wnx!|D]\}} t|| �q8WdS(NtCVSsskipping master subdirectorys-- not under CVSt-i(sslave Rscreate slave directory %s?tanswers-- no corresponding slavescreating slave directoryscan't make slave directoryt:smade slave directorytEntriest/iti(tostpathtjointisdirtokayRtmkdirterrortNonetlistdirtislinktappendtopent readlinestsplittcompareR (RRtcvsdirtmsgtsubdirstnamestnamet masternamet slavenametentriestetwordststm((s./usr/lib64/python2.7/Tools/scripts/treesync.pyR ?sT % cCs�yt|d�}Wntk r,d}nXyt|d�}Wntk rYd}nX|s�|ssdG|GHdSdG|GHt||dt�dS|s�dG|GHdS|r�|r�t||�r�dSnt|�}t|�}||kr)|j�|j�dG|GHdG|GHt||dt�dSd G||Gd GH|j d�t |�}|j�|j�|r�dGHt||ddt�nd GHt||ddt�dS(NtrtrbsNeither master nor slave existssCreating missing slaveRsNot updating missing mastersMaster sis newer than slavesSlave issseconds newer than masteris#***UPDATING MASTER (BINARY COPY)***s***UPDATING MASTER***(R&tIOErrorR"tcopyRt identicaltmtimetcloseRtseekt funnycharsR(RRtsftmftsfttmfttfun((s./usr/lib64/python2.7/Tools/scripts/treesync.pyR)msP iicCsCx<|jt�}|jt�}||kr1dS|sPqqWdS(Nii(treadtBUFSIZE(R?R@tsdtmd((s./usr/lib64/python2.7/Tools/scripts/treesync.pyR:�scCs tj|j��}|tjS(N(RtfstattfilenotstattST_MTIME(tftst((s./usr/lib64/python2.7/Tools/scripts/treesync.pyR;�scCs@x9|jt�}|sPnd|ks4d|krdSqWdS(Ns sii(RDRE(RLtbuf((s./usr/lib64/python2.7/Tools/scripts/treesync.pyR>�sR7twbcCs�dG|GHdG|GHtd|�s%dSt||�}t||�}x*|jt�}|s_Pn|j|�qFW|j�|j�dS(Ntcopyings tosokay to copy? (RR&RDREtwriteR<(tsrctdsttrmodetwmodeRRLtgRN((s./usr/lib64/python2.7/Tools/scripts/treesync.pyR9�s cCs�|j�j�}|s)|ddkrYt|�}|j�j�}|sYt}qYn|d dkrmdS|d dkr�dSdGHt|�S(NitnyitytnsYes or No please -- try again:(tstriptlowert raw_inputRR(tpromptR((s./usr/lib64/python2.7/Tools/scripts/treesync.pyR�st__main__i@(t__doc__RRRJRRRRRRRR R)RER:R;R>R9Rt__name__(((s./usr/lib64/python2.7/Tools/scripts/treesync.pyt<module>s"0 . .