//usr/lib64/lib64//python2.7/Demo//ó
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 d d l Z d d l Z d d d „ ƒ YZ d e j e f d „ ƒ YZ
d e
e j f d „ ƒ YZ d „ Z
d
„ Z e d k rÍ e ƒ n d S(
s RCS Proxy.
Provide a simplified interface on RCS files, locally or remotely.
The functionality is geared towards implementing some sort of
remote CVS like utility. It is modeled after the similar module
FSProxy.
The module defines two classes:
RCSProxyLocal -- used for local access
RCSProxyServer -- used on the server side of remote access
The corresponding client class, RCSProxyClient, is defined in module
rcsclient.
The remote classes are instantiated with an IP address and an optional
verbosity flag.
iÿÿÿÿNt
DirSupportc B se e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d
d „ Z d „ Z
d „ Z d „ Z RS( c C s
g | _ d S( N( t _dirstack( t self( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyt __init__! s c C s | j ƒ d S( N( t _close( R ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyt __del__$ s c C s x | j r | j ƒ q Wd S( N( R t back( R ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR ' s c C s
t j ƒ S( N( t ost getcwd( R ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyt pwd+ s c C s- t j ƒ } t j | ƒ | j j | ƒ d S( N( R R t chdirR t append( R t namet save( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyt cd. s
c C s@ | j s t j d ‚ n | j d } t j | ƒ | j d =d S( Ns empty directory stackiÿÿÿÿ( R R t errorR
( R t dir( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR 3 s
c C s7 t j t j ƒ } t t j j | ƒ } | j | | ƒ S( N( R t listdirt curdirt filtert patht isdirt _filter( R t patt files( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyt listsubdirs: s c C s t j j | ƒ S( N( R R R ( R R ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR ? s c C s t j | d ƒ d S( Niÿ ( R t mkdir( R R ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR B s c C s t j | ƒ d S( N( R t rmdir( R R ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR E s N(
t __name__t
__module__R R R R R R t NoneR R R R ( ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR s t
RCSProxyLocalc B sh e Z d „ Z d „ Z d d „ Z d d „ Z d „ Z d „ Z d d „ Z d d „ Z
d d „ Z RS(
c C s! t j j | ƒ t j | ƒ d S( N( t rcslibt RCSR R ( R ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR K s c C s! t j | ƒ t j j | ƒ d S( N( R R R R! ( R ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR O s
c C s | j | j | ƒ S( N( t _listt sum( R t list( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyt sumlistS s c C s | j | j | ƒ S( N( t _dictR# ( R R$ ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyt sumdictV s c C sd | j | ƒ } d } t j ƒ } x) | j | ƒ } | s= Pn | j | ƒ q$ | j | ƒ | j ƒ S( Ni i i ( t _opent md5t newt readt updatet
_closepipet digest( R t name_revt ft
BUFFERSIZER# t buffer( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR# Y s
c C s, | j | ƒ } | j ƒ } | j | ƒ | S( N( R( R+ R- ( R R/ R0 t data( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyt gete s
c C s\ | j | ƒ \ } } t | d ƒ } | j | ƒ | j ƒ | j | | ƒ | j | ƒ d S( Nt w( t _unmanglet opent writet closet checkint _remove( R R/ R3 t messageR t revR0 ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyt putk s
c C sƒ | d k r | j ƒ } n g } x[ | D]S } y | j | | | ƒ f ƒ Wq( t j t f k
rz | j | d f ƒ q( Xq( W| S( s¡ INTERNAL: apply FUNCTION to all files in LIST.
Return a list of the results.
The list defaults to all files in the directory if None.
N( R t listfilesR R R t IOError( R t functionR$ t resR ( ( s+ /usr/lib64/python2.7/Demo/pdist/RCSProxy.pyR" s s
c C sg | d k r | j ƒ } n i } x? | D]7 } y | | ƒ | |