-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/hgext/convert/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/hgext/convert/p4.pyc

ó
Ì\,Tc@s}ddlmZddlmZddlmZmZmZmZddl	Z	ddl
Z
d„Zdefd„ƒYZdS(iÿÿÿÿ(tutil(t_(tcommittconverter_sourcet	checktooltNoRepoNccsGy/x(tr-tj|ƒ}|s%Pn|VqWWntk
rBnXdS(s,Yield the dictionary objects generated by p4N(tTruetmarshaltloadtEOFError(tftd((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pytloaditers	

t	p4_sourcecBs\eZd	d„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„ZRS(
cCsÿtt|ƒj||d|ƒd|krT|jdƒrTttdƒ|ƒ‚ntddtƒi|_i|_	i|_
i|_i|_i|_
i|_d|_i|_tjdƒ|_tjd	ƒ|_tjd
ƒ|_|j||ƒdS(Ntrevt/s//s%%s does not look like a P4 repositorytp4taborttlatin_1sE([a-z]+)?(text|binary|symlink|apple|resource|unicode|utf\d+)(\+\w+)?$sA\$(Id|Header|Date|DateTime|Change|File|Revision|Author):[^$\n]*\$s\$(Id|Header):[^$
]*\$(tsuperR
t__init__t
startswithRRRtFalset	p4changestheadst	changesettfilesttagst
lastbranchtparenttencodingt	depotnametretcompiletre_typetre_keywordstre_keywords_oldt_parse(tselftuitpathR((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pyRs&									cCskdtj|ƒ}tj|ddƒ}x<t|ƒD].}|jddƒ}|r5t|j|<q5q5WdS(sRead changes affecting the pathsp4 -G changes -s submitted %stmodetrbtchangeN(Rt
shellquotetpopenRtgettNoneRR(R&R(tcmdtstdoutRtc((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pyt_parse_view6scCsL|jtdƒƒd|krn|j|ƒ|jdƒr^|jdƒr^id|d 6}qKidd6}nÝdtj|ƒ}tjtj	|dd	ƒƒ}i}x£|D]›}|jd
ƒr¬||j
ƒ\}}|j|ƒ|jdƒr|jdƒr|d }|d }n|d}||jdƒd
}|||<q¬q¬W|jj
ƒ|_|jjdtƒ|j
ƒ}	|	jdtdtƒ|jjddddƒ}
g|jD]P}|
sÜt|ƒt|
ƒkr·|jst|ƒt|jƒkr·|^q·|_|jtdƒƒd'}x|jD]ü}
d|
}tj	|dd	ƒ}tj|ƒ}|j|jddƒƒ}|j
dd
ƒd}d|dt|ƒd
d!f}|jtj|dƒdƒ|rè|g}ng}t|dƒdf}td|j|dƒdtj|d ƒd!|d|d"dd#i|
d$6ƒ}g}d}x¯d%||krd&||kr|d%|}d'}x9|	D]1}|j|ƒr›|||t|ƒ}Pq›q›W|r|j||d&|fƒ||j|<n|d
7}q`W||j|
<||j|
<|
}q3W|rH|g|_ nd'S((s4Prepare list of P4 filenames and revisions to importsreading p4 views
Rs//s/...tiýÿÿÿsp4 -G client -o %sR)R*tViews...iitkeytreversetconvertsp4.startrevtdefaultiscollecting p4 changelists
sp4 -G describe -s %stdescs
s%s %sR+iÿÿÿÿiPttimetauthortusertdates%Y-%m-%d %H:%M:%S %1%2tparentstbranchtextraRsdepotFile%dsrev%dN(!tstatusRR3RtendswithRR,RRR-tsplittfindRtkeystsorttinttlenRR'tconfigRR/trecodeR.treprtellipsisRtdatestrtappendRRRR(R&R'R(tviewsR0t
clientspectclienttsviewtcviewt	viewordertstartrevtxtlastidR+R1RR:t	shortdescttR?R>R2Rtitoldnametfilenametv((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pyR%?s~





4
!#



cCs|jS(N(R(R&((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pytgetheads“sc
Csìdtjd|j||fƒ}tj|ddƒ}d}d}d}x3t|ƒD]%}|d}	|jdƒ}
|	dkr™t|d	|
ƒ‚qX|	d
krX|jj	|dƒ}|r}d}|j
dƒpÙd|j
d
ƒpëd}d|krd}n|j
dƒdkr"d}nd|kr:|j}qUd|krU|j}qUq}qX|	dksp|	dkrX||
7}qXqXW|dkrŸtddƒ‚n|rº|j
d|ƒ}n|dkrâ|jdƒrâ|d }n||fS(Nsp4 -G print %ss%s#%sR)R*R4tcodetdataterrortgenerictstatttypeiiRWitsymlinktltkotkttexttbinaryisbad stats$\1$s
iÿÿÿÿ(RR,RR-R/RR.tIOErrorR"tmatchtgroupR$R#tsubRC(
R&tnameRR0R1R)tcontentstkeywordsRR`Ratp4typetflags((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pytgetfile–sB!
(		
cCs|j|ifS(N(R(R&R((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pyt
getchangesÁscCs|j|S(N(R(R&R((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pyt	getcommitÄscCs|jS(N(R(R&((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pytgettagsÇscCs(tg|j|D]}|d^qƒS(Ni(tsortedR(R&RR[RW((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pytgetchangedfilesÊsN(t__name__t
__module__R/RR3R%R_RuRvRwRxRz(((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pyR
s			T		+			(
t	mercurialRtmercurial.i18nRtcommonRRRRRR RR
(((s4/usr/lib/python2.7/dist-packages/hgext/convert/p4.pyt<module>s"	

Copyright © 2017 || Recoded By Mr.Bumblebee