6hJL%SSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ r J r J r SSK J r SSKJrJrJrJrJr SSKJrJr \R.(a SSKJr SSKJr \R6r\R.(a\S$S j5r\S%S j5rS r"S S5rS&S'SjjrS(SjrS)Sjr "SS\!5r"S*S+Sjjr#"SS\!5r$Sr%S \&S'"SS5r'"SS5r("SS5r)"SS 5r*"S!S"\+5r,S,S#jr-g)-) annotationsN)AnyAnyStrOptional)_)encodingerrorphasespycompatutil)dateutilprocutil)overload)uibytescgNds 6/usr/lib/python3/dist-packages/hgext/convert/common.py _encodeornoner2 cgrrrs rrr6rrc,UcgURS5$)Nlatin1)encoders rrr;sy 88H rcR\rSrSrS SjrSrSr\S Sj5r\S Sj5r Sr g) _shlexpy3proxyAcXlgr_l)selfls r__init___shlexpy3proxy.__init__Bsrc(SUR5$)Nc38# UHn[U5v M g7fr)r).0vs r *_shlexpy3proxy.__iter__..Fs2'Q a  'sr#r%s r__iter___shlexpy3proxy.__iter__Es2$''22rcH[URR55$r)rr$ get_tokenr/s rr3_shlexpy3proxy.get_tokenHsTWW..011rcURRb*[R"URR5$g)Ns )r$infiler strtolocalr/s rr6_shlexpy3proxy.infileKs, 77>> %&&tww~~6 6rc.URR$r)r$linenor/s rr:_shlexpy3proxy.linenoQsww~~rr#N)r&z shlex.shlexreturnNone)r<r)r<int) __name__ __module__ __qualname____firstlineno__r'r0r3propertyr6r:__static_attributes__rrrr r As932 rr cUc [USS9nO*Ub[R"S5eURS5nUb[R "U5OSn[ R "XSS9nUb+SUlU=RURS5- slUb$U=RURS5- sl [U5$)Nr)rs/shlexer only accepts data or filepath, not bothT)r6posix) openr ProgrammingErrordecoder strfromlocalshlexwhitespace_split whitespace wordcharsr )datafilepathrNrMr6r&s rshlexerrQVs  |Hx0  ((B {{8$080DX " "8 ,$F Dt4A! ))(33  y''11 ! rcHSSjn[R"U5nU"U5$)Nc[R"U5n[R"U5Vs/sHo"R 5SPM nnSR U5$s snf)Nrr)base64 encodebytesr iterbytestr splitlinesjoin)slinesr&s r encodeargencodeargs..encodeargosP""1%,4,@,@,GH,Gq",GHxxIsA)rYrr<r)pickledumps)argsr[rYs r encodeargsr`ns!  TA Q<rcZ[R"U5n[R"U5$r)rT decodebytesr]loads)rYs r decodeargsrdxs 1A <<?rc\rSrSrSrg) MissingTool}rNr?r@rArBrDrrrrfrf}rrfcU=(d Un[R"U5(dSU(a[RnO[nU"[ S5U-U=(a [ S5U-=(d S-5eg)Nscannot find required "%s" tools (try installing the %s package)r)rfindexer Abortrfr)exenameabortdebnameexcs r checktoolrrso ;3D   C ++CC!56=Oq!DEOVSVXY Y !rc\rSrSrSrg)NoReporNrhrrrrtrtrirrtsSKIPSKIPREVc\\rSrSrSSSSS\R SS4SSjjrSrg)commitNTc U=(d SUlU=(d SUlX0lX@lU =(d /UlXPlX`lU=(d 0UlXlXl Xl Xl g)Nsunknowns0 0) authordatedescparents optparentsbranchrevextrasortkeysaverevphasectx) r%r{r|r}r~rrrrrrrrs rr'commit.__init__sZ*  NF   $* [b    r) r{rrr|r}rrr~rrrr) r{rr|rr}rrOptional[bytes]rr>r<r=)r?r@rArBr draftr'rDrrrrxrxsd#' \\     rrxc\rSrSrSrSSSjjrSSSjjrSSjrSSjrSr S r S r S r S r S rSrSrSSSjjrSrSSjrS SjrS SjrSrSrSS!SjjrSrg)"converter_sourcezConversion source interfaceNcBXlX0lX@lX lSUlg)zeInitialize conversion source (or raise NoRepo("message") exception if path is not a valid repository)utf-8N)rpathrevsrepotyper)r%rrrrs rr'converter_source.__init__s     rc[R"SU5(d#[R"[ S5X!4-5eg)zkfails if revstr is not a 40 byte hex. mercurial and git both uses such format for their revision numbering s[0-9a-fA-F]{40,40}$s.%s entry %s is not a valid revision identifierN)rematchr rlrr%revstrmapnames rcheckhexformatconverter_source.checkhexformats@ xx/88++CD#$ 9rcgrrr/s rbeforeconverter_source.before rcgrrr/s rafterconverter_source.afterrrcg)zReturns true if the given targetfile belongs to the source repo. This is useful when only a subdirectory of the target belongs to the source repo.Tr)r%targetfilenames rtargetfilebelongstosource*converter_source.targetfilebelongstosource rcg)z*set the map of already-converted revisionsNr)r%revmaps r setrevmapconverter_source.setrevmaprc[e)z(Return a list of this repository's headsNotImplementedErrorr/s rgetheadsconverter_source.getheads!!rc[e)zReturn a pair (data, mode) where data is the file content as a string and mode one of '', 'x' or 'l'. rev is the identifier returned by a previous call to getchanges(). Data is None if file is missing/deleted in rev. r)r%rnrs rgetfileconverter_source.getfiles "!rc[e)aReturns a tuple of (files, copies, cleanp2). files is a sorted list of (filename, id) tuples for all files changed between version and its first parent returned by getcommit(). If full, all files in that revision is returned. id is the source revision id of the file. copies is a dictionary of dest: source cleanp2 is the set of files filenames that are clean against p2. (Files that are clean against p1 are already not in files (unless full). This makes it possible to handle p2 clean files similarly.) r)r%versionfulls r getchangesconverter_source.getchangess "!rc[e)z$Return the commit object for versionr)r%rs r getcommitconverter_source.getcommitrrcg)zGReturn the number of commits in this source. If unknown, return None. Nrr/s r numcommitsconverter_source.numcommitsrrc[e)zTReturn the tags as a dictionary of name: revision Tag names must be UTF-8 strings. rr/s rgettagsconverter_source.gettags s "!rcU(dUR=(d Sn[U[5(aURS5$UR [ R "U55RS5$![ak UR S5RS5s$![a: UR [ R "U5S5RS5ss$f=ff=f)Nrzutf-8zlatin-1replace)r isinstancestrrrIr sysstr UnicodeError)r%rYrs rrecodeconverter_source.recodes}}0H a  88G$ $ 88HOOH56==gF F  xx *11':: xx 99ELL  s03A88 C-B%"C-%?C)$C-(C))C-c[e)aReturn the files changed by rev compared to parent[i]. i is an index selecting one of the parents of rev. The return value should be the list of files that are different in rev and this parent. If rev has no parents, i is None. This function is only needed to support --filemap r)r%ris rgetchangedfiles converter_source.getchangedfiles s "!rcg)z5Notify the source that a revision has been converted.Nr)r%rsinkrevs r convertedconverter_source.converted-rrcg)zReturn true if this source has a meaningful, native revision order. For instance, Mercurial revisions are store sequentially while there is no such global ordering with Darcs. Frr/s rhasnativeorderconverter_source.hasnativeorder0s rcg)z7Return true if this source has ability to close branch.Frr/s rhasnativecloseconverter_source.hasnativeclose7srcg)zIf rev is a meaningful revision reference in source, return the referenced identifier in the same format used by getcommit(). return None otherwise. Nrr%rs r lookuprevconverter_source.lookuprev;rrc0$)z`Return the bookmarks as a dictionary of name: revision Bookmark names are to be UTF-8 strings. rr/s r getbookmarksconverter_source.getbookmarksBs  rcg)z|revstr is a string that describes a revision in the given source control system. Return true if revstr has correct format. Trrs rcheckrevformatconverter_source.checkrevformatIrr)rrrrr)NN)ruimod.uirrrrr<r=)s splicemap)rrrrr<r=r<r=r)rYrrrr<r)r<bool)rrr<r)r?r@rArB__doc__r'rrrrrrrrrrrrrrrrrrrrDrrrrrs% !%  ! !! !  !"/;  &+     9""" "" "Drrcl\rSrSrSrSSjrSrSrSrSr Sr S r SS jr SS jr S rS rSrSrg)converter_sinkiQz"Conversion sink (target) interfacec6XlX0l/UlX lg)zInitialize conversion sink (or raise NoRepo("message") exception if path is not a valid repository) created is a list of paths to remove if a fatal error occurs laterN)rrcreatedr)r%rrrs rr'converter_sink.__init__Ts    rc[e)zyPath to a file that will contain lines source_rev_id sink_rev_id mapping equivalent revision identifiers for each system.rr/s r revmapfileconverter_sink.revmapfile_ "!rcg)zrPath to a file that will contain lines srcauthor=dstauthor mapping equivalent authors identifiers for each system.Nrr/s r authorfileconverter_sink.authorfileesrc [e)a,Create a revision with all changed files listed in 'files' and having listed parents. 'commit' is a commit object containing at a minimum the author, date, and message for this changeset. 'files' is a list of (path, version) tuples, 'copies' is a dictionary mapping destinations to sources, 'source' is the source repository, and 'revmap' is a mapfile of source revisions to converted revisions. Only getfile() and lookuprev() should be called on 'source'. 'full' means that 'files' is complete and all other files should be removed. 'cleanp2' is a set of the filenames that are unchanged from p2 (only in the common merge case where there two parents). Note that the sink repository is not told to update itself to a particular revision (or even what that revision would be) before it receives the file data. r) r%filescopiesr~rxsourcerrcleanp2s r putcommitconverter_sink.putcommitks &"!rc[e)zPut tags into sink. tags: {tagname: sink_rev_id, ...} where tagname is an UTF-8 string. Return a pair (tag_revision, tag_parent_revision), or (None, None) if nothing was changed. r)r%tagss rputtagsconverter_sink.puttagss "!rcg)zSet the current branch name. Called before the first putcommit on the branch. branch: branch name for subsequent commits pbranches: (converted parent revision, parent branch) tuplesNr)r%r pbranchess r setbranchconverter_sink.setbranchrrcg)aTell the destination that we're using a filemap Some converter_sources (svn in particular) can claim that a file was changed in a revision, even if there was no change. This method tells the destination that we're using a filemap and that it should filter empty revisions. Nr)r%actives rsetfilemapmodeconverter_sink.setfilemapmoderrcgrrr/s rrconverter_sink.beforerrcgrrr/s rrconverter_sink.afterrrcg)zmPut bookmarks into sink. bookmarks: {bookmarkname: sink_rev_id, ...} where bookmarkname is an UTF-8 string. Nr)r% bookmarkss r putbookmarksconverter_sink.putbookmarksrrc[e)zHReturn False if a rev mentioned in a filemap is known to not be present.rrs rhascommitfrommapconverter_sink.hascommitfrommaps "!rc[e)zThis method is for the special needs for splicemap handling and not for general use. Returns True if the sink contains rev, aborts on some special cases.rrs rhascommitforsplicemap$converter_sink.hascommitforsplicemaprr)rrrrN)rrrrrrr<r=r)r?r@rArBrr'rrrrrrrrr rrrDrrrrrQsB, !"  "*"H     " "rrc\rSrSrSSjrSSjrSSjrSSjrSSjrSSjr SSjr SS jr SS jr SS jr SSS jjrSS jrSSjr\S5rSSjrSSjrSrg) commandlineicXlX lgr)rcommand)r%rrs rr'commandline.__init__s  rcgrrr/s rpreruncommandline.prerunrrcgrrr/s rpostruncommandline.postrunrrc[R"U5nURU/[U5-nUR 5HupV[ U5S:XaUR SU-5 O$UR SURSS5-5 [ U5S:XaUR SU-5 MsUS==SU-- ss'M UVs/sHn[R"U5PM nnURR(d)US[R"[R5/- nS R!U5nU$![a GMf=fs snf) N-s--_r=s2> )r byteskwargsrlistitemslenappendr TypeErrorr shellquoter debugflagbytestrosdevnullrX)r%cmdr_kwargscmdlinekr,args r_cmdlinecommandline._cmdlines%%f-<<%T 2LLNDA1v{tax(uqyyt'<<= q6Q;NN37+BK4!8+K#8??w8&&s+w?ww  x// ;< .popens=  $$W-"++! AHr)_dorun)r%r1r_r2rDs r_runcommandline._runs" {{57777rcLUR"[RU/UQ70UD6$r)rFrpopen2r%r1r_r2s r_run2commandline._run2!{{8??CA$A&AArcLUR"[RU/UQ70UD6$r)rFrpopen3rKs r_run3commandline._run3rNrcUR"U/UQ70UD6nURRSU4-5 UR5 U"U5UR 5 $!UR 5 f=f)Ns running: %s )r6rdebugrr)r%openfuncr1r_r2r3s rrFcommandline._doruns[--5d5f5  &'34  G$ LLNDLLNs AA1cUR"U/UQ70UD6nUR5SnURRU5 XTR4$)Nr)rG communicaterrT returncoder%r1r_r2rCoutputs rruncommandline.runsG IIc +D +F +#  f||##rcUR"U/UQ70UD6nURR5nUR5 URR SR U55 XTR4$Nr)rGr= readlineswaitrrTrXrYrZs rrunlinescommandline.runliness[ IIc +D +F +##%   chhv&'||##rc.U(aU(aLURR[S5UR-5 URRU5 [R "U5n[ R"SURU4-5eg)Ns %s error: s%s %s)rwarnrrr explainexitr rl)r%statusr[msgs r checkexitcommandline.checkexitsh  Q~.=> V$&&v.C++h$,,)<<= = rcXUR"U/UQ70UD6upEURXT5 U$r)r\rir%r1r_r2r[rgs rrun0commandline.run0s-#777 v& rcxUR"U/UQ70UD6upEURUSRU55 U$r_)rbrirXrls r runlines0commandline.runlines0s8s  ""8rrcV^\rSrSrSU4SjjrSU4SjjrSU4SjjrSSjrSrU=r $) mapfilei4cv>[TU]5 XlX lSUl/UlUR 5 gr)superr'rrfporder_read)r%rr __class__s rr'mapfile.__init__5s/    rcF>UR(dg[URS5n[U5Hsup#UR 5SR 5nU(dM/UR SS5upEX@;aURRU5 [TU]9XE5 Mu UR5 g![a gf=f![a2 [R"[S5URUS-4-5ef=f!UR5 f=f)Nrbrr%r s/syntax error in %s(%d): key/value pair expected)rrGFileNotFoundError enumeraterWrstriprsplitrwr rlrrr*r __setitem__close)r%rrlinekeyvaluers rr mapfile._read=syy  dii&B $R=(+224!%T1!5JC ?JJ%%c*#C/) HHJ)!   "++LM99a!e,- HHJs4B?:D'C;3D? C  C URc[URS5UlURR[R"SX4-55 URR5 [TU]=X5 g![aQn[R "[ S5UR[R"UR54-5eSnAff=f)Nabscould not open map file %r: %ss%s %s )rrGrOSErrorr rlrrr7strerrorwriter tonativeeolflushrr)r%rrerrrs rrmapfile.__setitem__Xs 77? tyy$/  d&&zSL'@AB   C' kk78yy("5"5cll"CDE sB C#A CC#cjUR(a"URR5 SUlggr)rrr/s rr mapfile.closees" 77 GGMMODG r)rrrr)rrrrr<r=r) r?r@rArBr'rrrrD __classcell__)rs@rrr4s6 (rrc.[R"U5$r)r makedate)ts rmakedatetimestamprks   Q r)rrr<r)rr=r<r=)NNNN)rPrrNrrMr)r_rr<r)rYrr<r)NTN) rmrrnrrorrprr<r=)rfloatr<zdateutil.hgdate). __future__rrTr/r]rrKr>typingrrrmercurial.i18nr mercurialrr r r r mercurial.utilsr r TYPE_CHECKINGrruimodrrr rQr`rd Exceptionrfrrrtrv__annotations__rxrrrdictrrrrrrsy#     ""        ,  $!%"&  0  ) ^b Y  Y% Y59 YKZ Y  Y Y <[[|]"]"@@8@8F4d4n r