6h2SSKJr SSKrSSKrSSKJr SSKJrJr SSK J r J r J r SSK Jr SrS r"S S \R"5rg) ) annotationsN)_)errorutil)dateutilprocutil stringutil)commonc#v# [R"U5nU(dgUv M$![a gf=f7f)z,Yield the dictionary objects generated by p4N)marshalloadEOFError)fds 2/usr/lib/python3/dist-packages/hgext/convert/p4.pyloaditerrs=  QAG     s 9)9) 6969cF/SQnUHup#URX#5nM U$)a9Perforce escapes special characters @, #, *, or % with %40, %23, %2A, or %25 respectively >>> decodefilename(b'portable-net45%252Bnetcore45%252Bwp8%252BMonoAndroid') 'portable-net45%2Bnetcore45%2Bwp8%2BMonoAndroid' >>> decodefilename(b'//Depot/Directory/%2525/%2523/%23%40.%2A') '//Depot/Directory/%25/%23/#@.*' ))s%2A*)s%23#)s%40@)s%25%)replace)filename replacementskvs rdecodefilenamer's,L ##A) OcJ^\rSrSrSU4SjjrSrSrSr\RS5r \RS5r \RS5r \RS 5r \RS 5r\RS 5rS rS rSrSSjrSrSrSrSrSrU=r$) p4_source;cH>SSKJn [TU] XX4S9 SU;a8UR S5(d"[ R "[S5U-5e[ R"SSS 9 0Ul URRS S UR5Ul [R"S 5Ul[R"S 5Ul[R"S5UlU(a/['U5S:a[(R*"[S55egg)Nr )convcmd)revs///s%%s does not look like a P4 repositoryp4F)abortconverts p4.encodingsE([a-z]+)?(text|binary|symlink|apple|resource|unicode|utf\d+)(\+\w+)?$sA\$(Id|Header|Date|DateTime|Change|File|Revision|Author):[^$\n]*\$s\$(Id|Header):[^$\n]*\$s8p4 source does not support specifying multiple revisions)r$super__init__ startswithr NoRepor checktoolrevmapuiconfig orig_encodingencodingrecompilere_type re_keywordsre_keywords_oldlenrAbort)selfr2repotypepathr%r$ __class__s rr-p4_source.__init__<s t7 4< 6 6--:;dB  e,  (=(=  zz   ::   "zz*EF CIM++* "4rcXlg)a_Sets the parsed revmap dictionary. Revmap stores mappings from a source revision to a target revision. It is set in convertcmd.convert and provided by the user as a file on the commandline. Revisions in the map are considered beeing present in the repository and ignored during _parse(). This allows for incremental imports if a revmap is provided. N)r1)r=r1s r setrevmapp4_source.setrevmap_s  rcS[R"U5-n[R"USS9n0n[U5H"nUR SS5nU(dMSXF'M$ U$)zRead changes affecting the pathsp4 -G changes -s submitted %srbmodechangeNT)r shellquotepopenrget)r=r?cmdstdout p4changesrcs r _parse_viewp4_source._parse_viewls_.1D1DT1JJ%0 &!Ai&Aq# "rc L 0n0n0n0n0n0n/n UR[S55 SU;aYURURU55 UR S5(aUR S5(aUSSS0n OSS0n OS[ R"U5-n [R"[ R"U S S 95n 0n U Hn U R S 5(dMXR5upURURU55 UR S 5(a UR S 5(a USSnUSSnUS SnXRS5S-SnXU'M [UR5[S9n[U R5[ SS9nUR"R%SS5nUR[S55 SnUGHnU(a[U5[U5:aM%UR&(a'[U5[UR&S5:aM]UUR(;aUnMqU(aU/nO/nUR+U5nUR-UU5nUR.R1S5n[!U5S:aUSR3S5nOSnSUR4U4-nUR[6R8"US5S-5 /n0n/nSnSU-U;aSU-U;aUSU-nSnUHTn UR;5R U R;55(dM7[=U U U[!U 5S-5n O U(aLUR?UUSU-45 UUU'URASU-5S:XaUR?U5 UUU'US- nSU-U;a SU-U;aMUHnUUnS[ R"U5-n![ R"U!S S 9n"Sn#[CU"5HnSn$SnS U-U;a`US U-U:XaDUSU-S:Xa8Sn%S!UU%4-U;a+US"UU%4-S#:Xa US!UU%4-n$OU%S- n%S!UU%4-U;aM+US- nS U-U;aM`U$(dMyU$U;dMUU$n# O U#(aU#UU'MURE[S$5UU4-5 M UUU'UUU'UUU'UnGM U(a[!U5S:aU/n UUUU US%.$)&z4Prepare list of P4 filenames and revisions to importsreading p4 views r&r's/...Nrsp4 -G client -o %srFrGsViews...r )keyT)rVreverser*s p4.startrevscollecting p4 changelists rs s **empty changelist description**s%s %sP s depotFile%dsrev%dsaction%dsmove/addsp4 -G filelog %sschange%ds file%d,%dshow%d,%ds moved froms*cannot find source for copied file: %s@%s ) changesetfilescopiesheads depotname)#statusrupdaterQr.endswithrrJr rrKsplitfindsortedkeysintr;r2r3r%r1_fetch_revision_construct_commitdesc splitlinesrstriprevr ellipsislowerrappendrLrwarn)&r=r2r?rO changeset files_map copies_map localname depotnameheadsviewsrM clientspecclientsviewcview vieworderstartrevlastidchangeparentsrrPdescarr shortdesctfilescopies copiedfilesioldnamerrflcmdflstdoutcopiedfilename copiedoldnamejs& r_parsep4_source._parsewsU       !)*+ 4<   T--d3 4u%%$--*@*@crC( '(*=*=d*CCC hnnSu&EFJE$$$W--#-#5#;#;#=LE$$T%5%5e%<=~~f--%..2H2H %cr  %cr !!"IE!**T"2Q"6"89E#(%L%9>>+5 5::>*n= !234FCK#h-7yyS[3tyy|+<<$!($$V,A&&q'2Aff''-G7|a#AJ--g6 ? AEE9--A IIj))!R058 9EFKA!A%!+A!0CNQ./"A}}11!'')<<#1%(WSVX=N2N#O#LL(AhlO!<=*1Ih'uu[1_-<#**84)1Ig&Q"A%!+A!0C (#H-+h.A.A'.JJ#>>%e<!%!(+A$(MA&?q0kAo.&8 !+/ 2k A !A#/1aQ">#$[Aq6%9#:m#K45laV6K4LM$) !Q $01aQ"> Q'?q0%}))C)2=)A',*"'5F8$GGHI#V,-?(H!"If  %If !'Jv Fm p c)nq(HE$!#   rcNURURUR5$N)rr2r?r=s r _parse_oncep4_source._parse_once s{{477DII..rc URS$)Nr\rrs rrp4_source.copies s **rc URS$)Nr[rrs rrp4_source.files))rc URS$)NrZrrs rrqp4_source.changeset --rc URS$)Nr]rrs rrvp4_source.headsrrc URS$)Nr^rrs rrup4_source.depotnamerrcUR$r)rvrs rgetheadsp4_source.getheads!s zzrcS[R"SURUU4-5-nSn[R"USS9nSn/nSn[ U5GHn U Sn U R S5n U S:XaU(d[ U SU 5n OUeU S :XaU R S 5n U S ;a g URRU S 5n U (a{SnU RS5=(d SU RS5=(d S-nSU;aSnU RS5S:XaSnSU;a URnO0SU;a URnOU S:XdU S:XaURU 5 SnGM U(dOGMOUcg SRU5nU(aURSU5nUS:XaURS5(aUSSnXv4$)Nsp4 -G print %ss%s#%srFrGscodesdataserrorsgenericsstatsaction)spurgesdeletes move/delete)NNstyperr xrUssymlinklskokstextsbinarys$\1$rY)rrJrurKrrLIOErrorr8matchgroupr:r9rojoinsubra)r=namerlrM lasterrorrNrHcontentskeywordsrcodedataactionp4typeflagss rgetfilep4_source.getfile$s("5"5 t,c2 2#   ^^Ce4FDHHf%zuuW~8#%$+AjM4$@ 'W_UU9-F!FF)!\\//' ;F"!'a!7C"LLO2s! 5=#'D!<<?j8#'D E>'+';';H!U]'+'7'7HW_ (9OOD) I&L]` <88H% ||Hh7H 4>#& & KK $$S)A))!T): :kk B Cc I  rc0$rrs rgettagsp4_source.gettagss rcb[URUVs/sHo3SPM sn5$s snf)Nr)rdr)r=rlrxs rgetchangedfilesp4_source.getchangedfiless)TZZ_5_t_5665s,)r5r9r:r8r1r)__name__ __module__ __qualname____firstlineno__r-rCrQrr propertycacherrrrqrvrurrrrhrgrrr__static_attributes__ __classcell__)r@s@rr!r!;s!F  P d // ++ ** .. ** ..@D8  ($ 77rr!) __future__rr r6mercurial.i18nr mercurialrrmercurial.utilsrrr r+r rrconverter_sourcer!rrrrsE#    (Y7''Y7r