Edit File: treesync.pyc
� ��7ec�����������@���s����d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�Z�d�Z�d�a�d�a�d�a �d����Z �d����Z�d����Z�d�Z �d����Z�d����Z�d ����Z�d�d�d�d���Z�d�d���Z�e�d�k�r��e ����n��d�S(���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����Nt���askt���yest���noc����������C���s)��t��j��t�j�d�d���\�}��}�x��|��D]��\�}�}�|�d�k�rG�d�}�n��|�d�k�r\�d�}�n��|�d�k�rq�|�a�n��|�d�k�r��|�a�n��|�d �k�r��|�a�n��|�d �k�r��|�}�n��|�d�k�r&�|�}�a�a�a�q&�q&�Wy�|�\�}�}�Wn0�t�k �rd�Gt�j�d �p d�Gd�Gd�GHd��SXt�|�|���d��S(���Ni���s���nym:s:d:f:a:s���-yR���s���-nR���s���-ss���-ms���-ds���-fs���-as ���usage: pythoni����s���treesync.pys5���[-n] [-y] [-m y|n|a] [-s y|n|a] [-d y|n|a] [-f n|y|a]s���slavedir masterdir(���t���getoptt���syst���argvt���write_slavet���write_mastert���create_directoriest ���ValueErrort���process(���t���optst���argst���ot���at���default_answert���create_filest���slavet���master(����(����s.���/usr/lib64/python2.7/Tools/scripts/treesync.pyt���main#���s0���� c���������C���sY��t��j�j�|�d���}�t��j�j�|���s9�d�G|�GHd�GHd��Sd�d�GHd�G|��GHd�G|�GHt��j�j�|����s��t�d�|��d �t��s��d�G|�GHd �G|��GHd��Sd�G|��GHy�t��j�|����Wn(�t��j�k �r��}�d�G|��Gd �G|�GHd��SXd�G|��GHn��d��}�g��}�t��j �|���}�x��|�D]��}�t��j�j�|�|���}�t��j�j�|��|���}�|�d�k�rJ|�}�qt��j�j�|���rt��j�j �|���r|�j�|�|�f���qqW|�r1t��j�j�|�d���} �x��t�| ���j ����D]s�} �| �j�d���}�|�d�d�k�r�|�d�r�|�d�}�t��j�j�|��|���}�t��j�j�|�|���} �t�|�| ���q�q�Wn��x!�|�D]�\�}�} �t�|�| ���q8Wd��S(���Nt���CVSs���skipping master subdirectorys���-- not under CVSt���-i(���s���slave R���s���create slave directory %s?t���answers���-- no corresponding slaves���creating slave directorys���can't make slave directoryt���:s���made slave directoryt���Entriest���/i����t����i���(���t���ost���patht���joint���isdirt���okayR���t���mkdirt���errort���Nonet���listdirt���islinkt���appendt���opent ���readlinest���splitt���compareR ���(���R���R���t���cvsdirt���msgt���subdirst���namest���namet ���masternamet ���slavenamet���entriest���et���wordst���st���m(����(����s.���/usr/lib64/python2.7/Tools/scripts/treesync.pyR ���?���sT���� % c���������C���s���y�t��|��d���}�Wn�t�k �r,�d��}�n�Xy�t��|�d���}�Wn�t�k �rY�d��}�n�X|�s��|�ss�d�G|�GHd��Sd�G|��GHt�|�|��d�t��d��S|�s��d�G|�GHd��S|�r��|�r��t�|�|���r��d��Sn��t�|���}�t�|���}�|�|�k�r)|�j����|�j����d�G|�GHd�G|��GHt�|�|��d�t��d��Sd �G|�|�Gd �GH|�j �d���t �|���}�|�j����|�j����|�r�d�GHt�|��|�d�d�t��n�d �GHt�|��|�d�d�t��d��S(���Nt���rt���rbs���Neither master nor slave existss���Creating missing slaveR���s���Not updating missing masters���Master s���is newer than slaves���Slave iss���seconds newer than masteri����s#���***UPDATING MASTER (BINARY COPY)***s���***UPDATING MASTER***(���R&���t���IOErrorR"���t���copyR���t ���identicalt���mtimet���closeR���t���seekt ���funnycharsR���(���R���R���t���sft���mft���sftt���mftt���fun(����(����s.���/usr/lib64/python2.7/Tools/scripts/treesync.pyR)���m���sP���� i���i���c���������C���sC���x<�|��j��t���}�|�j��t���}�|�|�k�r1�d�S|�s�Pq�q�Wd�S(���Ni����i���(���t���readt���BUFSIZE(���R?���R@���t���sdt���md(����(����s.���/usr/lib64/python2.7/Tools/scripts/treesync.pyR:�������s������c���������C���s ���t��j�|��j������}�|�t�j�S(���N(���R���t���fstatt���filenot���statt���ST_MTIME(���t���ft���st(����(����s.���/usr/lib64/python2.7/Tools/scripts/treesync.pyR;�������s����c���������C���s@���x9�|��j��t���}�|�s�Pn��d�|�k�s4�d�|�k�r�d�Sq�Wd�S(���Ns��� s����i���i����(���RD���RE���(���RL���t���buf(����(����s.���/usr/lib64/python2.7/Tools/scripts/treesync.pyR>�������s������R7���t���wbc���������C���s����d�G|��GHd�G|�GHt��d�|���s%�d��St�|��|���}�t�|�|���}�x*�|�j�t���}�|�s_�Pn��|�j�|���qF�W|�j����|�j����d��S(���Nt���copyings��� tos���okay to copy? (���R���R&���RD���RE���t���writeR<���(���t���srct���dstt���rmodet���wmodeR���RL���t���gRN���(����(����s.���/usr/lib64/python2.7/Tools/scripts/treesync.pyR9�������s���� � c���������C���s����|�j�����j����}�|�s)�|�d�d�k�rY�t�|����}�|�j�����j����}�|�sY�t�}�qY�n��|�d� d�k�rm�d�S|�d� d�k�r��d�Sd�GHt�|����S(���Ni����t���nyi���t���yt���ns���Yes or No please -- try again:(���t���stript���lowert ���raw_inputR���R���(���t���promptR���(����(����s.���/usr/lib64/python2.7/Tools/scripts/treesync.pyR�������s����t���__main__i�@��(���t���__doc__R���R���RJ���R���R���R���R���R���R���R���R ���R)���RE���R:���R;���R>���R9���R���t���__name__(����(����(����s.���/usr/lib64/python2.7/Tools/scripts/treesync.pyt���<module>���s"���0 . .