korsygfhrfggfhfgfffgffg6655665dtggggggzangaiide
Elehhjhjjkjkfpf6df56fd65ffff
/
usr
/
lib64
/
python2.7
/
Demo
/
pdist
/
Upload FileeE
HOME
� V �Qc�����������@���s����d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�e�e�d���s]�d�e�_�n��d�d�d�������YZ�d�d�d�������YZ �d �d �Z �d����Z�d����Z�i��Z �d ����Z�d����Z�d����Z�d����Z�e�d�k�r��e����n��d�S(���s!���Utilities for CVS administration.i����Nt���timezonei����t���Filec�����������B���s\���e��Z�d��Z�d �d���Z�d����Z�d����Z�d����Z�d �d���Z�d����Z �d����Z �d����Z�RS( ���s���Represent a file's status. Instance variables: file -- the filename (no slashes), None if uninitialized lseen -- true if the data for the local file is up to date eseen -- true if the data from the CVS/Entries entry is up to date (this implies that the entry must be written back) rseen -- true if the data for the remote file is up to date proxy -- RCSProxy instance used to contact the server, or None Note that lseen and rseen don't necessary mean that a local or remote file *exists* -- they indicate that we've checked it. However, eseen means that this instance corresponds to an entry in the CVS/Entries file. If lseen is true: lsum -- checksum of the local file, None if no local file lctime -- ctime of the local file, None if no local file lmtime -- mtime of the local file, None if no local file If eseen is true: erev -- revision, None if this is a no revision (not '0') enew -- true if this is an uncommitted added file edeleted -- true if this is an uncommitted removed file ectime -- ctime of last local file corresponding to erev emtime -- mtime of last local file corresponding to erev extra -- 5th string from CVS/Entries file If rseen is true: rrev -- revision of head, None if non-existent rsum -- checksum of that revision, Non if non-existent If eseen and rseen are both true: esum -- checksum of revision erev, None if no revision Note c���������C���sK���|�r�d�|�k�r�t��d���n��|�|��_�d�|��_�|��_�|��_�d��|��_�d��S(���Nt���/s���no slash allowed in filei����(���t ���ValueErrort���filet���lseent���eseent���rseent���Nonet���proxy(���t���selfR���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���__init__9���s ���� c���������C���s���t��|��j�|�j���S(���N(���t���cmpR���(���R ���t���other(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���__cmp__@���s����c���������C���s����y&�t��j�|��j���d�\�|��_�|��_�Wn+�t��j�k �rS�d��|��_�|��_�|��_�n(�Xt�j �t �|��j���j������j����|��_�d�|��_ �d��S(���Ni����i���(���t���ost���statR���t���lmtimet���lctimet���errorR���t���lsumt���md5t���newt���opent���readt���digestR���(���R ���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���getlocalC���s����&'c���������C���s)��t��j�|�d���}�|��j�r:�|�d�|��j�k�r:�t�d���n��|�d�|��_�|�d�|��_�d�|��_�d�|��_�d��|��_�|��_ �|��j�d� d�k�r��d�|��_�|��j�d�|��_�n��|��j�d�k�r��d��|��_�d�|��_�n0�|�d�}�t �|�d � ��|��_�t �|�d ���|��_ �|�d�|��_�|��j�r|��j ����n��d�|��_�d��S(���NR���i���s���file name mismatchi���i����t���-t���0i���i���i���i���(���t���stringt���splitfieldsR���R���t���erevt���edeletedt���enewR���t���ectimet���emtimet���unctimet���extraR���t���getesumR���(���R ���t���linet���wordst���dates(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���getentryL���s*���� c���������C���s����|�r�|�|��_��n��y�|��j��j�|��j���|��_�Wn#�t�j�t�f�k �rS�d��|��_�n�X|��j�rx�|��j��j�|��j���|��_ �n �d��|��_ �|��j �r��|��j����n��d�|��_�d��S(���Ni���( ���R ���t���headR���t���rrevR���R���t���IOErrorR���t���sumt���rsumR���R&���R���(���R ���R ���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt ���getremoted���s���� c���������C���sa���|��j��|��j�k�r!�|��j�|��_�n<�|��j��rT�|��j�|��j��f�}�|��j�j�|���|��_�n �d��|��_�d��S(���N(���R���R,���R/���t���esumR���R ���R.���R���(���R ���t���name(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyR&���s���s���� c���������C���s����|��j��s �d�S|��j�p�d�}�|��j�r2�d�|�}�n��|��j�rK�d�|��j�}�n �t�|��j���d�t�|��j���}�d�|��j�|�|�|��j�f�S(���s����Return a line suitable for inclusion in CVS/Entries. The returned line is terminated by a newline. If no entry should be written for this file, return "". t����R���R���s���Initial t��� s���/%s/%s/%s/%s/ ( ���R���R���R ���R!���R���t���gmctimeR"���R#���R%���(���R ���t���revR)���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���putentry|���s���� c���������C���s����d�d�GHt��|��d���}�|�d���|��j�rU�|�d�t���|�d�t���|�d�t���n��|��j�r��|�d���|�d ���|�d ���|�d�t���|�d�t���n��|��j�r��|�d ���|�d�t���|��j�r��|�d�t���q��n��d��S(���NR���i2���c���������S���sD���y�|�t��|�|������}�Wn�t�k �r2�d�}�n�Xd�|��G|�GHd��S(���Nt���?s���%-15s:(���t���getattrt���AttributeError(���t���keyt���reprR ���t���value(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���r����s ���� R���R���R���R���R���R!���R ���R"���R#���R,���R/���R1���(���R<���R���t���hexifyR5���R���R���(���R ���R>���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���report����s$���� N(���t���__name__t ���__module__t���__doc__R���R���R���R���R*���R0���R&���R7���R@���(����(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyR������s���+ t���CVSc�����������B���s����e��Z�d��Z�e�Z�d�d�d�d�d�d�d�d�g�Z�d ����Z�d ����Z�d����Z�d����Z �d ����Z �d�d���Z�d����Z �d����Z�d����Z�d����Z�d����Z�d�d���Z�d����Z�d����Z�RS(���s���Represent the contents of a CVS admin file (and more). Class variables: FileClass -- the class to be instantiated for entries (this should be derived from class File above) IgnoreList -- shell patterns for local files to be ignored Instance variables: entries -- a dictionary containing File instances keyed by their file name proxy -- an RCSProxy instance, or None s���.*s���@*s���,*s���*~s���*.os���*.as���*.sos���*.pycc���������C���s���i��|��_��d��|��_�d��S(���N(���t���entriesR���R ���(���R ���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyR�������s���� c���������C���sC���|�|��j��k�r�d��S|�|��_��x �|��j�j����D]�}�d�|�_�q,�Wd��S(���Ni����(���R ���RE���t���valuesR���(���R ���R ���t���e(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���setproxy����s ���� c���������C���sk���i��|��_��|��j�d���}�xB�|�j����}�|�s1�Pn��|��j����}�|�j�|���|�|��j��|�j�<q�|�j����d�S(���s ���Read the contents of CVS/Entriest���EntriesN(���RE���t���cvsopent���readlinet ���FileClassR*���R���t���close(���R ���t���fR'���RG���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt ���getentries����s���� � c���������C���sJ���|��j��d�d���}�x'�|��j����D]�}�|�j�|�j������q�W|�j����d�S(���s���Write CVS/Entries backRI���t���wN(���RJ���RF���t���writeR7���RM���(���R ���RN���RG���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt ���putentries����s����c���������C���s����|��j��j����}�t�j�t�j���}�x?�|�D]7�}�|�|�k�r@�q(�n��|��j�|���s(�|�j�|���q(�q(�W|�j����xW�|�D]O�}�y�|��j��|�}�Wn+�t�k �r��|��j �|���}�|��j��|�<n�X|�j ����qt�Wd��S(���N(���RE���t���keysR���t���listdirt���curdirt���ignoredt���appendt���sortt���KeyErrorRL���R���(���R ���t���listt���addlistR2���R���RG���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt ���getlocalfiles����s���� c���������C���s����|�r�|�|��_��n��|��j��s'�t�d���n��|��j��j����}�x]�|�D]U�}�y�|��j�|�}�Wn+�t�k �r��|��j�|���}�|��j�|�<n�X|�j�|��j����q=�Wd��S(���Ns���no RCS proxy(���R ���t���RuntimeErrort ���listfilesRE���RY���RL���R0���(���R ���R ���R[���R���RG���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���getremotefiles����s���� c���������C���s.���x�|��j�����D]�}�|�j����q �Wd�d�GHd��S(���NR���i2���(���RF���R@���(���R ���RG���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyR@�������s����c���������C���s���|��j��j����}�|�j����|�S(���N(���RE���RS���RX���(���R ���RS���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyRS�����s���� c���������C���s���|��d���}�t��|�|��j������S(���Nc���������S���s���|�j��|��S(���N(���RE���(���R;���R ���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyR=��� ��s����(���t���mapRS���(���R ���R=���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyRF�����s����c���������C���s���|��d���}�t��|�|��j������S(���Nc���������S���s���|��|�j��|��f�S(���N(���RE���(���R;���R ���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���item��s����(���R`���RS���(���R ���Ra���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���items ��s����c���������C���s%���t��j�j�d�|���}�t��j�j�|���S(���NRD���(���R���t���patht���joint���exists(���R ���R���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt ���cvsexists��s����R>���c���������C���s>���t��j�j�d�|���}�d�|�k�r1�|��j�|���n��t�|�|���S(���NRD���R>���(���R���Rc���Rd���t���backupR���(���R ���R���t���mode(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyRJ�����s����c���������C���s[���t��j�j�|���rW�|�d�}�y�t��j�|���Wn�t��j�k �rC�n�Xt��j�|�|���n��d��S(���Nt���~(���R���Rc���t���isfilet���unlinkR���t���rename(���R ���R���t���bfile(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyRg�����s���� ��c���������C���sD���t��j�j�|���r�t�Sx'�|��j�D]�}�t�j�|�|���r �t�Sq �Wt�S(���N(���R���Rc���t���isdirt���Truet ���IgnoreListt���fnmatcht���False(���R ���R���t���pat(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyRV���#��s������N(���RA���RB���RC���R���RL���Rp���R���RH���RO���RR���R\���R���R_���R@���RS���RF���Rb���Rf���RJ���Rg���RV���(����(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyRD�������s"��� s���%02xi���c���������C���s'���|��d�k�r�d�St�t�t�t�|������S(���sD���Return a hex representation of a 16-byte string (e.g. an MD5 digest)R���N(���R���t ���hexify_formatt���tupleR`���t���ord(���R.���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyR?���-��s����c���������C���sd���|��d�k�r�d�Sd�}�xG�t�d�t�|����d���D]-�}�|�t�t�j�|��|�|�d�!d�����}�q/�W|�S(���s*���Return the original from a hexified stringR���R3���i����i���i���N(���R���t���ranget���lent���chrR���t���atoi(���t���hexsumR.���t���i(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���unhexify3��s����+c���������C���s��|��d�k�r�d��St�sn�d�d�d�d�d�d�d�d �d �d�d�d �g�}�d�}�x%�|�D]�}�|�d�}�|�t�|�<qM�Wn��t�j�|����}�t�j�|�d���}�t�|�d�}�t�j�|�d���}�t�t�j�t�j�|�d�d�����\�}�} �} �| �t�j�} �t�j �|�|�|�|�| �| �d�d�d�f ���S(���NR���t���Jant���Febt���Mart���Aprt���Mayt���Junt���Jult���Augt���Sept���Octt���Novt���Deci����i���i���i���i���t���:( ���R���t���unctime_monthmapR���t���splitRz���R`���R���t���timeR����t���mktime(���t���datet���monthsR|���t���mR(���t���yeart���montht���dayt���hht���mmt���ss(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyR$���>��s ����� + c���������C���s&���|��d��k�r�d�St�j�t�j�|������S(���NR���(���R���R����t���asctimet���gmtime(���t���t(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyR5���O��s�����c����������C���s����t��t�j������}��t�j�|����}�t�j�|���}�d�G|��G|�GHd�Gt�j�GHd�Gt�j�|����GHt�|���}�d�G|�GHt�j�|���}�d�G|�GHt�j�|���GHd��S(���Nt���GMTR����t���locals ���unctime()s���->(���t���intR����R����R����R����t���ctimeR$���(���t���nowR����t���att���ut���gu(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���test_unctimeS��s���� c����������C���sP���t�����}��|��j����|��j����d�d��l�}�|�j����}�|��j�|���|��j����d��S(���Ni����(���RD���RO���R\���t ���rcsclientt ���openrcsclientR_���R@���(���t���xR����R ���(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���test`��s���� t���__main__(����(����(���RC���R���R���R����R���Rq���t���hasattrR����R���RD���Rt���R?���R}���R����R$���R5���R����R����RA���(����(����(����s)���/usr/lib64/python2.7/Demo/pdist/cvslib.pyt���<module>���s&����~