Your IP : 216.73.216.85


Current Path : /opt/alt/python27/lib/python2.7/site-packages/py/_path/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyc

�
%q�]c@sqdZddlZddlZddlZddlZddlZddlZddlZddlm	Z	dfd��YZ
dfd��YZdfd	��YZe�Z
d
Zejdkr�ed7Zned
Zgd�Zd�Zed�Zd�Zde	jfd��YZd�Zdefd��YZd�Zdjd�Zejekrtejej�nejdkZej dej!�Z"d�Z#e$d�Z%d�Z&de'fd��YZ(ej d �Z)d!e	jfd"��YZ*d#fd$��YZ+d%e+fd&��YZ,d'fd(��YZ-d)�Z.ej d*�d+�Z/gd,�Z0d-fd.��YZ1dS(/sm
svn-Command based Implementation of a Subversion WorkingCopy Path.

  SvnWCCommandPath  is the main class.

i����N(tcommontcachecBs eZiZiZiZiZRS((t__name__t
__module__tproplisttinfotentriestprop(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRst	RepoEntrycBseZd�Zd�ZRS(cCs||_||_||_dS(N(turltrevt	timestamp(tselfR	R
R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt__init__s		cCsd|j|j|jfS(Nsrepo: %s;%s  %s(R	R
R(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt__str__ s(RRR
R(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRs	t	RepoCachecBs;eZdZdZd�Zd�Zdd�Zd�ZRS(s� The Repocache manages discovered repository paths
    and their revisions.  If inside a timeout the cache
    will even return the revision of the root.
    icCs
g|_dS(N(trepos(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR
*scCs
g|_dS(N(R(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytclear-scCs�|dkrdS|dkr+tj�}nxX|jD]+}||jkr5||_||_Pq5q5Wt|||�}|jj|�dS(N(tNonettimeRR	RR
Rtappend(RR	R
Rtentry((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytput0s		cCsotj�}xV|jD]K}|j|j�r||j|jkrT|j|jfS|jdfSqW|dfS(Ni����(RRt
startswithR	RttimeoutR
(RR	tnowR((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytgetAsN(	RRt__doc__RR
RRRR(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR#s		s_ -/\=$.~+%twin32t:s@:cCsjy|dSWnWtk
retjjd�}|j�dj|jd�d �}|j|�|SXdS(Nissvn -q --versiont.i(t
IndexErrortpytprocesstcmdexectstriptjointsplitR(tvertv((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt_getsvnversionUs


cCs@t|�}tjjjdkr<t|�jdd�}n|S(NRt$s\$(tstrR tstdtsystplatformtreplace(ttext((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt_escape_helper_scCs@x9t|�D]+}|j�r%q
n||kr7q
ntSWtS(N(R*tisalnumtTruetFalse(R/t
allowed_charstc((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt_check_for_bad_charsescCsw|jdd�\}}|dkrs|jdd�\}}t|t�sZt|t�rstd|f��qsndS(Ns://itfilet/sbad char in %r(R%R6tALLOWED_CHARS_HOSTt
ALLOWED_CHARSt
ValueError(R	tprototurithostturipath((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt
checkbadcharsnstSvnPathBasecBs�eZdZdZd�Zeeddd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zdejfd��YZRS(s2 Base implementation for SvnPath implementations. R8cCs|jS(N(tstrpath(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt_geturlssurl of this svn-path.cCs|jS(s7 return a string representation (including rev-number) (RB(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�scCs
t|j�S(N(thashRB(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt__hash__�scKs:tj|j�}|jd|j�|_|jd|j�|_|jd�\}}}}d|kr�d|ks�d|kr�td|��q�nU|jd|�}|jd|�}|r�|j	d�r�d|}n|||d<|jd	|�|jd
|j
�|dr)d||_n
d||_|S(
s� create a modified version of this path. A 'rev' argument
            indicates a new revision.
            the following keyword arguments modify various path parts::

              http://host.com/repo/path/file.ext
              |-----------------------|          dirname
                                        |------| basename
                                        |--|     purebasename
                                            |--| ext
        R
tauths!dirname,basename,purebasename,exttbasenametpurebasenametextsinvalid specification %rRtdirnametseps%(dirname)s%(sep)s%(basename)ss%(dirname)s(tobjectt__new__t	__class__RR
RFt
_getbyspecR;t
setdefaultRRKRB(RtkwtobjRJRGRHRItpb((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytnew�s&


c	Cs#g}|jj|j�}x|jd�D]�}|j�}|dkri|j|jj|d ��q+|dkr�|j|d�q+|d}|jd�}|dkr�|d}}n|| ||}}|dkr�|j|�q+|dkr|j|�q+td	|��q+W|S(
s� get specified parts of the path.  'arg' is a string
            with comma separated path parts. The parts are returned
            in exactly the order of the specification.

            you may specify the following parts:

            http://host.com/repo/path/file.ext
            |-----------------------|          dirname
                                      |------| basename
                                      |--|     purebasename
                                          |--| ext
        t,RJi����RGRtRHRIsDon't know part %r(RBR%RKR#RR$trfindt	NameError(	RtspectrestpartstnameRGtiRHRI((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRO�s&
 
cCs:t|�t|�ko9|j|jkp9|j|jkS(s3 return true if path and rev attributes each match (R*R
(Rtother((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt__eq__�scCs||kS(N((RR^((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt__ne__�scGsp|s
|Stg|D]}|j|j�^q�}|jf|}|j|jj|�|j|j�}|S(s� return a new Path (with the same revision) which is composed
            of the self Path followed by 'args' path components.
        (ttupleR#RKRBRNR$R
RF(RtargstargR[tnewpath((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR$�s+'cCs|j|�}|S(s+ return the content of the given property. (t_propget(RR\tvalue((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytpropget�scCs|j�}|S(s list all property names. (t	_proplist(Rtcontent((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�scCs
|j�jS(s2 Return the size of the file content of the Path. (Rtsize(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRj�scCs
|j�jS(s0 Return the last modification time of the file. (Rtmtime(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRk�scCs
t|�S(N(R0(Rtcmd((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt_escape�stCheckerscBs,eZd�Zd�Zd�Zd�ZRS(cCs?y|jj�jdkSWntjjk
r:|j�SXdS(Ntdir(tpathRtkindR terrortErrort
_listdirworks(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRoscCs4y|jj�Wntjjk
r+tSXtSdS(N(RptlistdirR RrtENOENTR3R2(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRts
cCs9y|jj�jdkSWntjjk
r4tSXdS(NR7(RpRRqR RrRvR3(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR7#scCs6y|jj�SWntjjk
r1|j�SXdS(N(RpRR RrRvRt(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytexists)s(RRRoRtR7Rw(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRns			N(RRRRKRCtpropertyRR	RRERTROR_R`R$RgRRjRkRmRRn(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRA{s"				"	$								cCsW|jd�}|dkr.td|��n|| }tj|d�}tj|�S(NRi����scould not parse %ss%Y-%m-%dT%H:%M:%S(RWR;Rtstrptimetmktime(ttimestrR]t
parsedtime((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytparse_apr_time/s
tPropListDictcBs eZdZd�Zd�ZRS(sD a Dictionary which fetches values (InfoSvnCommand instances) lazilycCs6tj|g|D]}|df^q�||_dS(N(tdictR
RRp(RRptkeynamestx((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR
9s)cCsJtj||�}|dkrF|jj|�}tj|||�n|S(N(Rt__getitem__RRpRgt__setitem__(RtkeyRf((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�=s
(RRRR
R�(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR~7s	cCstjdkrdSdS(NRs	LC_ALL=C RV(R,R-(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt	fixlocaleDss* | \ / : < > ? 	 
   
t s^([a-z]\:\\)?[^:]+$cCs�t}|j}trD|jd�tj|�sDtd��qDnx?|D]7}|tjksl||krKtd|f��qKqKWdS(NRs path may not contain a colon (:)sillegal character %r in path(	t
ILLEGAL_CHARSRBt	ISWINDOWStremovet_reg_allow_disktmatchR;tstringt	printable(Rptillegaltsptchar((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt_check_pathOs	

cCsXt|�|j}|r>|jdkr>d||jf}n|rTd|f}n|S(Ni����s%s@%ss%s@HEAD(R�RBR
(RptaddatR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytpath_to_fspathZs
	cCs�t|t�}tjjj}tr�tj|�}|j	dd�}|j
d�r�d|j
d�j	dd�||t|j
d���f}q�||�}n||�}|jdkr�d||jf}n
d|f}d|fS(	Ns\R8is/%s%si����s%s@%ss%s@HEADs	file://%s(
R�R3R R+turllibtquoteR�R�R�R.tgrouptlenR
(RptfspathR�R�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt
url_from_pathcs&
tSvnAuthcBs/eZdZeed�Zd�Zd�ZRS(s/ container for auth information for Subversion cCs(||_||_||_||_dS(N(tusernametpasswordt
cache_authtinteractive(RR�R�R�R�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR
xs			cCs�|jjdd�}|jjdd�}g}|rM|jd|f�n|rj|jd|f�n|js�|jd�n|js�|jd�ndj|�S(Nt"s\"s--username="%s"s--password="%s"s--no-auth-caches--non-interactiveR�(R�R.R�RR�R�R$(Rtunametpasswdtret((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytmakecmdoptions~s		cCsd|jfS(Ns<SvnAuth username=%s ...>(R�(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�s(RRRR2R
R�R(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�vs	s\s*(\d+)\s*(\S+) (.*)tSvnWCCommandPathcBspeZdZejZd<d<d�Zed�d<d<d�Zed�d<d<d�Z	d�Z
d�Zeed<d<d�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd<d�Zd�Zd�Zd<d<d�Zded�Zdd�Zd�Zd�Zd�Zd�Zd�Zddd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#d#d#d$�Z%d<d%�Z&d&�Z'e(j)d'e(j*�Z+d(dd)�Z,d*�Z-d+�Z.d,�Z/d#d-�Z0d#d.�Z1d/�Z2d0�Z3dd1�Z4d<d<d2�Z5d3d4�Z6d5�Z7d6e8j9j:j;fd7��YZ;d<de<d8�Z=d9�Z>d:�Z?d;�Z@RS(=s� path implementation offering access/modification to svn working copies.
        It has methods similar to the functions in os.path and similar to the
        commands of the svn client.
    cCs�tj|�}t||�r=|j|kr1|S|j}ntt|�t�rhtd|f��nt	j
j|�|_||_|S(Nsbad char in wcpath %s(
RLRMt
isinstanceRNt	localpathR6R*R:R;R RptlocalRF(tclstwcpathRFR((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRM�s		cCs
t|j�S(N(R*R�(R�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt<lambda>�RVsstring pathcCs|jdd�jS(Ntusecachei(RR
(R�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��RVtrevisioncCs|jt|dd�kS(NR�(R�tgetattrR(RR^((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR_�scCsXt|dd�dkr3|j�}|j|_nt|jtjj�sQt	�|jS(Nt_url(
R�RRR	R�R�R tbuiltint_basestringtAssertionError(RR((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRC�s
surl of this WC itemcCs
t|�S(N(R0(RRl((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRm�scCs|jj|�S(s! pickle object into path location(R�tdump(RRR((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��scCs|j�}tjj|j�S(s* return current SvnPath for this WC-item. (RR RptsvnurlR	(RR((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��scCsd|jS(Ns	svnwc(%r)(RB(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt__repr__�scCs
t|j�S(N(R*R�(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�scCs |jdkrdS|jj�S(NRV(RFRR�(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt_makeauthoptions�scCs;|rt|�pg}|j|j��|j||�S(N(tlistRR�t_svn(RRlRb((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt_authsvn�scGs�d|g}g|D]}|j|�^q}|j|�|jd|j|j��t�dj|�}ycz;d}tjj|�}dtj|<t	j
j|�}Wd|r�|tj|<n
tj|=XWn�t	j
jjk
r�t
j�d}	|	jj�}
|
jd�dkr4t	jj|��n*|
jd	�dkr^t	jj|��n|
jd
�dks�|
jd�dks�|
jd�dks�|
jd
�dkr�t	jj|
��n�nX|S(Nssvn %ss"%s"R�tLC_MESSAGEStCis	not foundi����sE200009:sfile existssfile already existssw150002:scan't create directory(RmtextendRRBR�R$tostenvironRR R!R"RsR,texc_infoterrtlowertfindRrRvtEEXIST(RRlRbtltitemR�R�tholdtouttetstrerr((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��s8
"

cCs|jd|g�dS(s switch to given URL. tswitchN(R�(RR	((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��scCs�g}|dkr|j}n|dks6|dkrjtjjjdkr�t�dkr�|d7}q�n7t�dkr�|d|7}n|jdt|��|j|�|j	d|�dS(	s$ checkout from url to local wcpath. i����Rs1.3s@HEADs@%ds-rtcoN(
RR	R R+R,R-R(RR*R�(RR	R
Rb((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytcheckout�s
tHEADcCs6d|g}|s"|jd�n|jd|�dS(s= update working copy item to given revision. (None -> HEAD). s-rs--non-interactivetupN(RR�(RR
R�topts((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytupdatestwcCs|jj||�dS(s) write content into local filesystem wc. N(R�twrite(RRitmode((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�
scGs"|j|jj|�d|j�S(s0 return the directory Path of the current Path. RF(RNR�tdirpathRF(RRb((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�scCsN|j�}|jdd�r+|j�n|jdd�rJ|j�n|S(NRoi(R�tcheckt_ensuredirstmkdir(Rtparent((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�s

cOs�|j|�}|j�r>|jdt�r:|j�n|S|jdd�rZ|j�S|j�}|j�|jd�|j�|S(s� ensure that an args-joined path exists (by default as
            a file). if you specify a keyword argument 'directory=True'
            then the path is forced  to be a directory path.
        t	versionedRoiRV(R$R�R3taddRR�R�R�(RRbtkwargstpR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytensures




cGs.|r|j|�j�S|jd�|SdS(s1 create & return the directory joined with args. R�N(R$R�R�(RRb((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�/s
cCs|jd�dS(s add ourself to svn R�N(R�(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�7sicCsn|std��|jdt�s>tjj|�j�dSg}|rZ|jd�n|jd|�dS(s� remove a file or a directory tree. 'rec'ursive is
            ignored and considered always true (because of
            underlying svn semantics.
        s!svn cannot remove non-recursivelyR�Ns--forceR�(	R�R�R2R RpR�R�RR�(Rtrectforcetflags((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�;scCs*tjjdt|�t|�f�dS(s copy path to target.ssvn copy %s %sN(R R!R"R*(Rttarget((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytcopyJscCs*tjjdt|�t|�f�dS(s rename this path to target. ssvn move --force %s %sN(R R!R"R*(RR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytrenameNscCs.|jd�j�}|s*td��ndS(s( set a lock (exclusive) on the resource tlocks!unknown error in svn lock commandN(R�R#R;(RR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�RscCs;|jd�j�}|jd�r7t|d��ndS(s unset a previously set lock tunlockssvn:iN(R�R#Rt	Exception(RR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�YscCsy|j�WnnXdS(s$ remove any locks from the resource N(R�(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytcleanup`sicCs�|rtd��nd}|r*d}nd}|r?d}nd}y&d|||f}|j|�}WnTtjjjk
r�d|||f}|j|�}t|�j||�}nXt|�j||�}|S(s2 return (collective) Status object for this file. s1XXX cannot perform status() on external items yetRVs--non-recursives-us$status -v --xml --no-ignore %s %s %ssstatus -v --no-ignore %s %s %s(	R;R�R R!R"RstWCStatust
fromstringtXMLWCStatus(RtupdatesR�t	externalsRlR�t
rootstatus((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytstatushs(		cCs<g}|dk	r&|jd|�n|jd|�}|S(sj return a diff of the current path against revision rev (defaulting
            to the last one).
        s-r %dtdiffN(RRR�(RR
RbR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��s
cCs�|jd�}g}|j�}tjj|j�j�}x�tt||��D]n\}\}}t	j
|�}|s�td|f��n|j�\}	}
}|j
t|	�|
|f�qRW|S(s[ return a list of tuples of three elements:
            (revision, commiter, line)
        tblames:output line %r of svn blame does not match expected format(R�t
splitlinesR RpR�R	t	readlinest	enumeratetzipt	rex_blameR�R;tgroupsRtint(RR�tresultt
blamelinest	reallinesR]t	blamelinetlinetmR
R\t_((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��s" s.*Committed revision (\d+)\.$RVcCs�d|jdd�f}|s,|d7}n|j|�}ytj|=Wntk
r\nX|r�|jj|�}t|jd��SdS(s/ commit with support for non-recursive commits scommit -m "%s" --force-logR�s\"s -NiN(	R.R�RRtKeyErrort_rex_commitR�R�R�(RtmsgR�RlR�R�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytcommit�s

cGsctjjj�}z?|jd�}|j|�|jd|dt|�|�Wd|j�XdS(s* set property name to value on this path. Rftpropsets--fileN(	R RpR�tmkdtempR$R�R�R*R�(RR\RfRbtdR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�s
#cCs|jd|�}|d S(s! get property name on this path. Rgi����(R�(RR\RZ((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRg�scCs|jd|�}|d S(s$ delete property name on this path. tpropdeli����(R�(RR\RZ((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�scCst|r"|jd�}t||�S|jd�}|jd�}g|dD]}|j�^qK}t||�SdS(s� return a mapping of property names to property values.
If rec is True, then return a dictionary mapping sub-paths to such mappings.
sproplist -RRs
iN(R�tmake_recursive_propdictR%R#R~(RR�RZtlinesR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�s
#cCs+|r|jd�}n|jd�}|S(sK revert the local changes of this path. if rec is True, do so
recursively. s	revert -Rtrevert(R�(RR�R�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�scKs:|r|jj|�}n	|j}|j|d|j�S(s� create a modified version of this path. A 'rev' argument
            indicates a new revision.
            the following keyword arguments modify various path parts:

              http://host.com/repo/path/file.ext
              |-----------------------|          dirname
                                        |------| basename
                                        |--|     purebasename
                                            |--| ext
        RF(R�RTRNRF(RRQR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRT�s	cOs5|s
|S|jj||�}|j|d|j�S(s� return a new Path (with the same revision) which is composed
            of the self Path followed by 'args' path components.
        RF(R�R$RNRF(RRbR�R�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR$�scCs�|otjj|�}|s~y|jd�}Wn�tjjjk
r�tj	�d}|j
jd�dkr�tjj
||j
��n3|j
jd�dkr�tjj
||j
��n�nX|j�dks�|j�jd�dkrtjj
||��nt|�}tjjjdkrn|j|jkrntjj
|d	d
|j|jf��qnn|tj|<n|S(s9 return an Info structure with svn-provided information. Ris$Path is not a working copy directoryi����sis not under version controlRVsnot a versioned resourceRsnot a versioned resource:s	 %s != %s(RRRR�R R!R"RsR,R�R�R�RrRvR#R�tInfoSvnWCCommandR+R-RpR�(RR�RtoutputR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�s* cCs�t|t�r!tj|�}nd�}g}xa|jj|�D]M}|j|d|j�}||�rC|s�||�rC|j|�qCqCW|j	||�|S(s� return a sequence of Paths.

        listdir will return either a tuple or a list of paths
        depending on implementation choices.
        cSs
|jdkS(Ns.svn(RG(Rp((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytnotsvn$sRF(
R�R*Rt	FNMatcherR�RuRNRFRt	_sortlist(RtfiltsortRtpathsR�R�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRus	trcCst|j|�S(s, return an opened file with the given mode. (topenRB(RR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR/scCs|jj|�S(N(R�RO(RRY((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRO3sRncBseZd�Zd�ZRS(cCs||_|j|_dS(N(t	svnwcpathR�Rp(RRp((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR
7s	cCs�y|jj�}Wn�tjjtjjfk
r9tStjjj	k
r�t
j�d}|jj
d�dkr{tS|jj�j
d�dkr�tS�nXtSdS(Nisis not a working copyi����snot a versioned resource(RRR RrRvR�R3R!R"RsR,R�R�R�R�R2(RtsR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�:s(RRR
R�(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRn6s	cCs�|j�st�|dkr$dp'|}|dkr<dp?|}|dkrc|dkrcd}nd||f}|rdp�d}t�}|j�}|d||||jf}tj|dtjdtjd	t	�}	|	j
�\}
}tjj
|
tj��}
t�\}}
y|j|
�}Wn|
k
rLtd
��nXg}xEtd|jj�D].}|j|jkri|jt|��qiqiW|S(s� return a list of LogEntry instances for this path.
rev_start is the starting revision (defaulting to the first one).
rev_end is the last revision (defaulting to HEAD).
if verbose is True, then the LogEntry instances also know which files changed.
R�iRVs-r %s:%ss-vssvn log --xml %s %s %s "%s"tstdouttstderrtshellsno such revisionN(R�R�RR�R�RBt
subprocesstPopentPIPER2tcommunicateR R�t_totextR,tgetdefaultencodingt	importxmltparseStringR;tfiltert
firstChildt
childNodestnodeTypetELEMENT_NODERtLogEntry(Rt	rev_starttrev_endtverbosetrev_opttverbose_optt
locale_envtauth_optRltpopenRRtminidomt
ExpatErrorttreeR�tlogentry((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytlogIs6					
cCs
|j�jS(s2 Return the size of the file content of the Path. (RRj(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRjsscCs
|j�jS(s0 Return the last modification time of the file. (RRk(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRkwscCst|j|j|jf�S(N(RDRBRNRF(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyRE{sN(ARRRR�RKRRMRxRBR
R_RCR	RmR�R�R�RR�R�R�R�R�R2R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�tretcompiletDOTALLR�RRRgRRRRTR$RRuRROR RpR�RnR3R2RjRkRE(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��sh	
									!											&
		
		
					*		R�cBsYeZdZdddd�Zed�Zejd�Z	dddd�Z
ee
�Z
RS(tmodifiedtaddedtconflictt	unchangedtexternaltdeletedt
prop_modifiedtunknowntupdate_availablet
incompletetkindmismatchtignoredtlockedtreplacedcCsL||_||_||_||_x!|jD]}t||g�q.WdS(N(R�R
tmodrevtauthort	attrnamestsetattr(RR�R
RDRER\((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR
�s				cKszi}xN|jD]C}||ks,||rx$t||�D]}d||<q<WqqW|j�}|rv|j�n|S(Ni(RFR�tkeysR(RRRQRR\RpR�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pytallpath�s
s$\s+(\d+|-)\s+(\S+)\s+(.+?)\s{2,}(.*)c	Cs-t||||�}d}x|jd�D]�}|j�sCq+n|d |d}}	|\}
}}}
}}}}|
dkrO|jdd�d}|
dkr�|j|dd�}|jj|�q+|
dkr|j|jj|dd�d|j	�}|j
j|�q+|
d	kr+|j|dd�}|jj|�q+q+ntjj
|	�}|s|d
kr�|	j�}|j|dd�}|jj|�q+n|j�jd�dkr�t|	jd
�dj��}q+n|j�jd�dkrq+ntd|��n|j�\}}}}|j|dd�}|
dkr�|jdd�sutd��|jj|�n�|
dks�|
dkr�|jj|�n�|
dkr�|jj|�n�|
dkr�|jj|�n�|
dkr|jj|�nm|
dkr/|jj|�nN|
dkrN|jj|�n/|
j�sm|jj|�ntd|
��|dkr�|jj|�n|dks�|dkr�|j j|�n|d
kr�|jj|�n||kr+||_!||_"||_#|r+||_$q+q+q+q+W|S(s4 return a new WCStatus object from data 's'
        s
is?XIit?tabstXRFtIt*sagainst revision:i����Rsstatus on externalscould not parse line %rtMR7s3didn't expect a directory with changed content heretAt+tDR�t~t!tRsreceived flag %rtLtKN(%R�RR%R#R$R=RRNR�RFR:RAt_rex_statusR�R>R�R�R�R;R�R�R�R6R7R;R8R@R?RCR9tNotImplementedErrorR<RBR
RDREt
update_rev(tdatat
rootwcpathR
RDRER�RZR�R�tresttc0tc1tc2tc3tc4tc5tx6tc7tfnR�R�((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��s�			
(R6R7R8R9R:R;R<R=R>R?R@RARBRCN(RRRFRR
R2RIR3R4RXR�tstaticmethod(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�s	]R�cBs&eZdddd�Zee�ZRS(cCs<t||||�}d$}t�\}}y|j|�}	Wn3|k
rrtj�d}
tt|
���nX|	jd�}|r�|dj	d�|_
nx�|	jd�D]�}|j	d�}
|jd�d}|j	d	�}|d
kr|j|
dd�}|jj
|�q�n�|dkrk|j|jj|
dd�d
|j�}|jj
|�q�nn|dkr�|j|
dd�}|jj
|�q�n7|dkr�|j|
dd�}|jj
|�q�n|j	d�}|dks|dkrd}d}d}d}n�|dkr*n�|jd�d}|r�|j	d�}d}|jd�}|r�x%|djD]}||j7}q{Wnd}x.|jd�djD]}||j7}q�Wn|j|
dd�}|dks|jdd�std��idd6dd
6dd 6dd6j||�}t||�}|j
|�|j	d!�}|d%kr�|jj
|�n||kr�||_||_||_||_n|jd"�}|r|d}|j	d	�}|d&kr|jj
|�qn|jd#�}t |�r�|j!j
|�q�q�W|S('sL parse 'data' (XML string as outputted by svn st) into a status obj
        itagainsti����R�RRps	wc-statusiR�tunversionedRKR:RFRAR?R7tnonet0RJRVRCRREtdateR6R7s2did't expect a directory with changed content hereR9tnormalR=R8t
conflictedtpropssrepos-statusR�N(RjRm(R7R6("R�RRRR,R�R;R*tgetElementsByTagNametgetAttributeRZR$R=RRNR�RFR:RAR?R"t	nodeValueR�R�RR�R<R
RDRERlR>R�RB(R[R\R
RDRER�RZR.R/tdocR�turevelstentryelRptstatuselt
itemstatusR�Rltcommitelt
author_elsR5titemattrnametattrtpropsstatust
rstatuselst	rstatuseltritemstatustlockels((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��s�	
	!	

			
N(RRRR�Rg(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��siR	cBseZd�Zd�ZRS(cCs�i}xo|jd�D]^}|j�s.qn|jdd�\}}|j�jdd�}|j�}|||<qWy|d|_Wntk
r�td��nX|dd	kr�d
p�|d|_yt|d�|_	Wntk
r�d|_	nXtjj
|d�|_|jj�|_d
|krMt|d
�|_nd|kri|d|_nd|kr�t|d�|_|jd|_ndS(Ns
RiR�RVR	sNot a versioned resourcetnodekindt	directoryRoR�Rptlastchangedrevtlastchangedauthortlastchangeddatei@B(R%R#R�R.R	R�R;RqR�R
RR RpR�Rjtcreated_revtlast_authortparse_wcinfotimeRkR(RR
RR�R�Rf((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR
js4
#

cCs|j|jkS(N(t__dict__(RR^((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR_�s(RRR
R_(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR	is	)cCs\tjd|�}|s+td|��n|j�\}}tj|d�}tj|�S(s# Returns seconds since epoch, UTC. s&(\d+-\d+-\d+ \d+:\d+:\d+) ([+-]\d+) .*stimestring %r does not matchs%Y-%m-%d %H:%M:%S(R3R�R;R�RRytcalendarttimegm(R{R�ttimezoneR|((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��ssProperties on '(.*)':cCsg|jd�D]}|r|^q}i}x�|r|jd�}|j|�}|sntd|��n|j�d}|j|dd�}	g}
x?|r�|djd�r�|jd�j�}|
j|�q�W|
s�t	d��t
|	|
�||	<q1W|S(s5 Return a dictionary of path->PropListDict mappings. s
is could not parse propget-line: %rRKis  smust have found properties!(R%tpopR�R;R�R$RR#RR�R~(twcrootR
trexR�RtpdictR�R�RpR�t	propnamestpropname((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�s (	cCsA|r
|Sddlm}ddlm}|j||g�|S(Ni����(R.(R/(txml.domR.txml.parsers.expatR/R�(RR.R/((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR�sR%cBseZd�Zd�ZRS(cCs5t|jd��|_xtd|j�D]}|j|jkr+|jdkrd|j	j
|_q-|jdkr�|j	r�|j	j
|_q*d|_q-|jdkr�|j	j
}t
|�|_q-|jdkr-g|_xHtd|j�D]1}|j|jkr�|jjt|��q�q�Wq-q+q+WdS(NR�RERRVRlR(R�RqR
R RR"R#R$tnodeNameR!RrRERR}RltstrpathsRt	PathEntry(RR1tlpartR{tppart((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR
�s"		cCsd|j|j|jfS(Ns#<Logentry rev=%d author=%s date=%s>(R
RERl(R((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR��s(RRR
R�(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyR%�s	(2RR�R,RR3R�R Rtpy._pathRRRRtrepositoriesR:R-R9R(R0R6R@tPathBaseRAR}RR~R�R%R�RKR�R�R4RMR�R�R2R�R�RLR�R�R�R�R�R	R�RRR%(((s?/opt/alt/python27/lib/python2.7/site-packages/py/_path/svnwc.pyt<module>sN<		(	


			
�	
				��~l-