Your IP : 216.73.216.213
�
e f5 � @ 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 d � Z
d d � Z d
d � Z d Z
d d � Z d d � Z d d � Z d d d d d � Z d d � Z d d d � Z e d k r� e
� n d S)a� 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
� NZask�yes�noc C sO t j t j d d � d � \ } } x� | D]� \ } } | d k rM d } n | d k rb d } n | d k rw | 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 | \ } } WnP t k
r=t d t j d
pd d d �t d d d �t d � d SYn Xt | | � d S)N� znym:s:d:f:a:z-yr z-nr z-sz-mz-dz-fz-az
usage: pythonr ztreesync.py�end� z5[-n] [-y] [-m y|n|a] [-s y|n|a] [-d y|n|a] [-f n|y|a]zslavedir masterdir) �getopt�sys�argv�write_slave�write_master�create_directories�
ValueError�print�process)Zopts�args�o�a�default_answer�create_files�slave�master� r �;/opt/alt/python34/lib64/python3.4/Tools/scripts/treesync.py�main# s0 %
r c C s� t j j | d � } t j j | � sB t d | � t d � d St d d � t d | � t d | � t j j | � st d | d t �s� t d | � t d
| � d St d | � y t j | � Wn<