MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/3/root/proc/3/cwd/usr/lib/python2.4/Tools/scripts/treesync.pyo
mò
‚=5Dc@sÂdZdkZdkZdkZdkZdZdZdadada	d„Z
d„Zd„Zdd	Z
d
„Zd„Zd„Zd
ddd„Zdd„Zedjoe
ƒ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

NtasktyestnocCs=titiddƒ\}}xÁ|D]¹\}}|djo
d}n|djo
d}n|djo
|an|djo
|a	n|d	jo
|a
n|d
jo
|}n|djo|}a
aa	q&q&Wy|\}}Wn6tj
o*dGtid
pdGdGdGHdSnXt||ƒdS(Nisnym: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(tgetopttsystargvtoptstargstotatdefault_answertwrite_slavetwrite_mastertcreate_directoriestcreate_filestslavetmastert
ValueErrortprocess(R	RRRRR
RR((t,/usr/lib/python2.4/Tools/scripts/treesync.pytmain#s6












	cCsttii|dƒ}tii|ƒpdG|GHdGHdSnddGHdG|GHdG|GHtii|ƒpˆtd|d	tƒpdG|GHd
G|GHdSndG|GHyti	|ƒWn-ti
j
o}dG|Gd
G|GHdSqôXdG|GHnd}g}ti|ƒ}x|D]…}tii||ƒ}tii||ƒ}|djo
|}qtii|ƒo+tii|ƒo|i||fƒqqW|o¦tii|dƒ}
xŽt|
ƒiƒD]v}
|
idƒ}	|	ddjoP|	doE|	d}tii||ƒ}tii||ƒ}t||ƒqÎqÎWnx!|D]\}}t||ƒqSWdS(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(tostpathtjoinRtcvsdirtisdirRtokayR
tmkdirterrortmsgtNonetsubdirstlistdirtnamestnamet
masternamet	slavenametislinktappendtentriestopent	readlinestetsplittwordststmtcompareR(RRR)R5R&R*R+R4R(R3R.R$RR1((RR?sZ				

				


'
cCsÌyt|dƒ}Wntj
o
d}nXyt|dƒ}Wntj
o
d}nX|p<|pdG|GHdSndG|GHt||dtƒdSn|pdG|GHdSn|o#|ot	||ƒodSqãnt
|ƒ}t
|ƒ}||joA|i
ƒ|i
ƒdG|GHdG|GHt||dtƒdSnd	G||Gd
GH|idƒt|ƒ}|i
ƒ|i
ƒ|odGHt||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/RtsftIOErrorR%RtmftcopyRt	identicaltmtimetsfttmfttcloseRtseekt
funnycharstfunR(RRR;R?R@RDR9((RR6msP			


		


iicCsKxD|itƒ}|itƒ}||jodSn|pPqqWdS(Nii(R9treadtBUFSIZEtsdR;tmd(R9R;RHRG((RR=s

cCs ti|iƒƒ}|tiS(N(RtfstattftfilenotsttstattST_MTIME(RJRL((RR>¥scCsIxB|itƒ}|pPnd|jp
d|jodSqqWdS(Nis
ti(RJRERFtbuf(RJRP((RRC©s
R8twbcCsdG|GHdG|GHtd|ƒpdSnt||ƒ}t||ƒ}x-|i	t
ƒ}|pPn|i|ƒqKW|i
ƒ|i
ƒdS(Ntcopyings     tosokay to copy? i(tsrctdstR!RR/trmodeRJtwmodetgRERFRPtwriteRA(RSRTRURVRRWRJRP((RR<°s		
cCsŸ|iƒiƒ}|p|ddjo3t|ƒ}|iƒiƒ}|p
t}q^n|d djodSn|d djodSndGHt|ƒS(NitnyitytnsYes or No please -- try again:(Rtstriptlowert	raw_inputtpromptR
R!(R_R((RR!¾st__main__(t__doc__RRRMRR
RR
RRRRR6RFR=R>RCR<R!t__name__(R=RMRFR<RCRR!R6R
RRR>RRR((Rt?s"$		.	.