^cddlZddlZddlZddlZddlZddlmZddlmZm Z m Z ddl m Z ddl mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z'm(Z(m)Z)m*Z*m+Z,m-Z.ddl/m0Z1ddl2m3Z3m4Z4m5Z5ej6Z6d Z7d Z8d Z9ee(e8eee$e%d Z:d Z;dZ d4dZ? d5dZ0d6dZ@dZAdZB d7dZCdZDdZEd8dZFd8dZGdZH d9dZIdZJ d:d ZKd;d!ZLd8d"ZMdd&Zd'ZX dz1addbranchrevs..primary..vs(DD1ADDDDDDTF)rr2rdirstatebranchextendreversed)rE branchmaplreporevss r9primaryzaddbranchrevs..primaryps T>> Hk!$E"F"FGGG^**,,F Y   KKDD61B(C(CDDD D D D45rCsunknown branch '%s') peerlistcapablerr2rappendcommandexecutor callcommandresultRepoLookupError) rIotherbranchesrJrL hashbranchxyr8rKrErHs ` ` @r9 addbranchrevsrYXs ::< reposetup for %s took %s s> all reposetup took %s ) reinstancerlogr"timedcmrrkwirepeersetupfuncs) rr5create presetupfuncsryrzobjfallreposetupstatsnamemodulehookstatss r9 _peerorrepors d   $ $ D&'j %  C dB  B  b "c FF<9::: o & & *;&1"55  LD& FF>> defaultdest(b'foo') 'foo' >>> defaultdest(b'/foo/bar') 'bar' >>> defaultdest(b'/') '' >>> defaultdest(b'') '' >>> defaultdest(b'http://example.org/') '' >>> defaultdest(b'http://example.org/foo/') 'foo' rC)r(r!r5r-basenamenormpath)sourcer5s r9 defaultdestrsI ;v   #D s 7  BG,,T22 3 33rCc |j|jkrdStj|dr|jr|jS|j|jd}tj|\}}t|j |}||_|S)z}Returns repository object for source repository of a shared repo. If repo is not a shared repository, returns None. Nssrcrepor) sharedpathr5r"rbsrcrepor$splitr(parseurlr%r)rlrsrcurlrUrs r9sharedreposourcers  $)##t j))dl|X^^DO , ,Q /F'//FH&))GDL NrCc ~t|s!tjtd|st |}nt j||d}t|tr?t j||\}}}t||} t| | |d\} } n| } d} t} |r| tt||d| || d} t| | |t||} t!| || | S) zcreate a shared repositorys!can only share local repositoriesrNT)s sharedrepossharedrelatives shareditemsrrz) defaultpath)checkout)rirr2rrr(get_clone_pathrgrhr%rYrksetaddsharedbookmarks postshare_postshareupdate)rrdestupdater rrelative origsourcerUrrevr shareditemsrAs r9sharersR 6??Ck!@AABBB 36""%b$//2&%  '.'=b&'I'I$ FHR((%gw$GG XX,,..%%K)(((  "''    Agqk22222tAQ2222 HrCc tj|j}tj|j}|dsdSd}|dr|d}|dd5}|d}|d|||d||ddddS#1swxYwYdS)zcopies the source repo config and prepend it in current repo .hg/hgrc on unshare. This is only done if the share was perfomed using share safe method where we share config of source in shareshgrcNrCswbs## Config copied from shared source  )vfsmodr$rr5existsreadwrite)rlsrcvfsdstvfs currentconfigfp sourceconfigs r9_prependsourcehgrcrJs3Z ( (F Z " "F == ! !M }}W- G,,    2{{7++  8999                      sA*C99C=C=c4|5t|||j}|ptj5t j|jvrt||j d}tj ||dz|j t j |j t j tj|dddn #1swxYwYdddn #1swxYwYt!|j|jd}|d}|j}t)|D])}||*t/j||S)aconvert a shared repository to a normal one Copy the store data to the repo and remove the sharedpath data. Returns a new repository object representing the unshared repository. The passed repository object is not usable after this function is called. s sharedpaths.oldNF)rr=)r copystorer5r"nullcontextmanagerrSHARESAFE_REQUIREMENTrr$joinrenamediscardSHARED_REQUIREMENTRELATIVE_SHARED_REQUIREMENTrwritereporequirementsr%baseuirootsubstatesortedsubunsharerpoisonrepository)rrldestlock sharefilenewrepocsubsss r9rr`s 00 Rty11  2022 0 01T5FFF#4((( m44I K 9w#6 7 7 7   % %l&E F F F   % %l&N O O O  )$ / / / 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 000000000000000.di>>>G  A :D D\\ a t$$$ Ns6,DB1C>2 D>D DD DDDcT|p|jdd}|r2d}|jdt j||zt j|jvrC|5tj |ddddS#1swxYwYdSdS)aACalled after a new shared repo is created. The new repo only has a requirements file and pointer to the source. This function configures additional shared data. Extensions can wrap this function and write additional entries to destrepo/.hg/shared to indicate additional pieces of data to be shared. pathsdefaults[paths] default = %s rN) rconfigr$rr" tonativeeolrNARROW_REQUIREMENTwlockrcopytoworkingcopy) sourcerepodestrepordefaulttemplates r9rrsGZ]11(JGGGJ- 7D$4X5G$H$HIII&**AAA ^^   3 3  ( 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3BAs9BB"Bc|sdS|jtd|dur|}|ddfD]1}| ||}n#tj$rY.wxYwt ||dS)zMaybe perform a working directory update after a shared repo is created. ``update`` can be a boolean or a revision to update to. Nsupdating working directory Trtip)rstatusrlookuprrS_update)rlrrtestuprevs r9rrs GNN1455666 T:v. <  KK%%E E$    H  D%sAA&%A&c(d} d}|rtdntd}||td5}d}|}tj|j} tj|} |jD] } |r| drtj | } | r*| | s| | | | r| dr5tj | d } tj| | }t!j| | | | ||\}}||z } |r|d |zn|d |zdddn #1swxYwY|S#t'|xYw) zGcopy files from store of srcrepo in destpath returns destlock Nslinkingscopyingsfiles)unitr phaserootssdataslockslinked %d files scopied %d files )r makeprogress publishingrr$rstorecopylistendswithr-r5dirnamermkdirrrr" copyfilesdebugrelease)rrdestpathrhardlinktopicprogressnum srcpublishingrrrdstbaselockfilens r9rrs5 H!)<* q}} __U8_ 5 5 5C#..00MZ 233FZ))F]++--   QZZ %>%>'//!,,*6==#9#9*LL)))==## zz'**?#%7<<#A#A#'9VX#>#>"&. A A(##KHa1HC 5-34444-34441 5 5 5 5 5 5 5 5 5 5 5 5 5 5 52 s1AG? FG2& G?2G66G?9G6:G??Hc d} |r|ds!tjtdg} |D]k} |5} | | dd| idddn #1swxYwYl| } tj |} tj |dn#t$rYnwxYwtj|}tj |}t#j|d|z5tj |r&|td|zn<|td|zt)||||d |d| dddn #1swxYwYt+|r'tjt/j|}n|}t3|| }t5|||dd| }t7j||| t;|||t=|||fS)aPerform a clone using a shared repo. The store for the repository will be located at /.hg. The specified revisions will be cloned or pulled from "source". A shared repo will be created at "dest" and a working copy will be created if "update" is True. NlookupXsrc repository does not support revision lookup and so doesn't support clone by revisionkeyFs%s.locks-(sharing from existing pooled repository %s) s((sharing from new pooled repository %s) T)rpullrJrstream)r5)rrr r)heads)rNrr2rrPrOrQrRr-r5rr"makedirFileExistsErrorrr$rrrrcloneriabspathr(r,r%rrrrrL)rpeeropts sharepathrsrcpeerrrrrrrJ remoterevsrAr8pooldirpoolvfsrr sharerepors r9clonewithsharer s4& D y)) +1    A((** a!!MM!"A fhh                gooi((G  We$$$$      j!!Gw **H 7J1 2 2 7>>) $ $  IICDDxO     II>??(J        0vl7#7#?#?@@  2I...I   H M(G40000Xv&&& DXt,, ,,s7>BB# &B# C## C0/C0>BG  GGcL|j|}tj||}tj|rJtj|stj|t j||dSdS)z8copy a cache from srcrepo to destcachedir (if it exists)N)cachevfsrr-r5rrr"copyfile)r dstcachedirfnamesrcfnamedstfnames r9 _copycacherLs$$U++Hw||K//H w~~h*w~~k** " H[ ! ! ! h)))))**rCc t|tr.tj|||} | \}}}t |||}n0|}d|pgf}|x}}dx}x}x}}d} t ||||\}}|7t|}|r%|td|zntj||d}tj |}tj |}|s!tj tdtj|d}|rp|s$tj td|z|r$tj td|zi}d }| t%j| d}| t%j| d}|r | r| sd h} d|d <| rd|d <|d r_d|d<dt+jvr#|tdn"|td| pi} | d}| d}|r.t1|rd}|dkr |5}|dddi}dddn #1swxYwY|t8jkr.t<j |tC|}n"|tdn#tj"$r%|tdYnwxYw|dkrRt<j |tCtGj$|%}n$tj&td|z|r$|tdd}|rtO|||||||||| tQ||||tSj*|d||+|r)|,|+SSS|,}|} t1|r&t[j.tj |} t1|rat<j/|r@t<j0t<j |d}!|!}n|}d }"|r=|1r)t1|rtej3|s| o| }"|rd }"|"r/ |4d }n#tj5$rd }"YnwxYw|"r[|6ddd !tj |}#toj8|||}$toj9||#|$"toj:||#}%|%;}|%4}d#d$l||%t |||}tj@||,_Atj@||,_B|%jC|,_C|6d%d |jDjE&n t |p|||d|'}n4#t$r'd}tj&td|zwxYw|r|ds!tj&td(g}'|D]k}(|5}|'G|dd|(idddn #1swxYwYl|'}|d}nd}|,})|)r |r|);5|)45|)H| | t%jI|)dddn #1swxYwYdddn #1swxYwYtj| }*t|*}+|)jJKd)d*|+d |s|rd }nd}d+di},|)jJL|,d 5tjN|)|||| | | ,dddn #1swxYwYnv|rS|r!tj&td-tjO||||jPQ.n!tj&td/d}|,}%|%rVtjSd0}-tj| }*d|*_Tt|*}+|%jUd1t[jV|-|+z|%jJKd)d*|+d |Wd2d3rtjY|%||r1|durV|5}|dd|i}dddn #1swxYwYd}.d}/|t|d4kr||%vr|}.nmtj\|%|r(tj]|%|^}.n0|dur, |%_|}.n#tj"$rYnwxYw|. |%j`r"|%_|%j`}.|%j`}n|%jPd5}.d5}|%|.a}0|0d*krtd6|z}/ntd7||0fz}/nQ#t$rD |%cd*}.n*#tj"$r|%_d8}.YnwxYwYnwxYw|/s,|%|.a}0td9|0z}/|%jJ|/t|%|.||%jPvrtjf|%||tQ||tQ||%45|%gtji:dddn #1swxYwYtQ||||tSj*|d||+|r(|,|+no#tQ||||tSj*|d||+|r)|,|+wwwxYw||fS);aMake a copy of an existing repository. Create a copy of an existing repository in a new directory. The source and destination are URLs, as passed to the repository function. Returns a pair of repository peers, the source and newly created destination. The location of the source is added to the new repository's .hg/hgrc file, as the default to be used for future pulls and pushes. If an exception is raised, the partly cloned/updated destination repository will be deleted. Arguments: source: repository object or URL dest: URL of destination repository to create (defaults to base name of source repository) pull: always pull from source repository, even in local case or if the server prefers streaming stream: stream raw data uncompressed from repository (fast over LAN, slow over WAN) revs: revision to clone up to (implies pull=True) update: update working directory after clone completes, if destination is local repository (True means update to default rev, anything else is treated as a revision) branch: branches to clone shareopts: dict of options to control auto sharing behavior. The "pool" key activates auto sharing mode and defines the directory for stores. The "mode" key determines how to construct the directory name of the shared repository. "identity" means the name is derived from the node of the first changeset in the repository. "remote" means the name is derived from the remote's path/URL. Defaults to "identity." storeincludepats and storeexcludepats: sets of file patterns to include and exclude in the repository copy, respectively. If not defined, all files will be included (a "full" clone). Otherwise a "narrow" clone containing only the requested files will be performed. If ``storeincludepats`` is not defined but ``storeexcludepats`` is, ``storeincludepats`` is assumed to be ``path:.``. If both are empty sets, no files will be cloned. Nsdestination directory: %s rs#empty destination path is not validT)r+sdestination '%s' already existssdestination '%s' is not emptyFspath:.s narrowfilessshallowfilestores lfs-serveslfsse(remote is using large file support (lfs), but it is explicitly disabled in the local configuration) sT(remote is using large file support (lfs); lfs will be enabled for this repository) spoolsmodesidentityrr0s7(not using pooled storage: remote appears to be empty) sA(not using pooled storage: unable to resolve identity of remote) sremotesunknown share naming mode: %ss1(pooled storage not supported for narrow clones) )rrrrs.hg)waits preoutgoingsclone)throwr)rr) streamcloneoutgoing)rnoderrrr)uisquietbookmarkmove)rstreamclonerequested includepats excludepatsdepths2narrow clone not available for remote destinations)rJr s)clone from remote to remote not supportedsclonedrs experimentals remotenames@supdating to bookmark %s s%updating to bookmark %s on branch %s rsupdating to branch %s )caches)jrgrhr(rrLr!rYrrrr,r InputErrorrr$lexistsisdirlistdirrvalidatepatternsrNrdisabledr`rirPrQrRrnullidr-r5rrrSr&sha1digestr2r rshutilrmtreecloserkr"rrrealpathcancopyr hassecretr LockErrorrrclone_requirementscreaterepositorymakelocalrepositoryrr local_copyweakrefref_lockref _wlockrefrD nodeconstantsnullhexrrO setnarrowpatsrr setconfigconfigoverriderrpush _bookmarkskeysuimod samplehgrcspasswdrr configboolrpullremotenameslenr isrevsymbol revsymbolrr_activebookmarkrEKeyError branchtiprr activate updatecaches repositorymodCACHES_POST_CLONE)1rrrrrrJrrrE shareoptsstoreincludepatsstoreexcludepatsr!srcrrUrsrclockr destwlockcleandirdestpeerrdestvfsrznarrow sharepool sharenamemoderr8rootnoderrhgdircopy destrootpath dest_reqsrrr rrkrc defaulturl overridesrrrbns1 r9rrVsB&%  ,$R88'*$ FHr8V,,++--&,B'%kkmm+ V044G4h4XHB&w4HHh <v&&D D !:;;dBCCC)"d33A6D#D))%f-- N"1%K#L#LMM M*Td333 ??   ==?? &899D@"" &677$>   '  '(8 9 9 9F  '  '(8 9 9 9F  . /(8 /$-; )-J~ &  3.2J* + ??< ( ( "&Jv ,.... M =O MM'** ! g.. < < I ++  0022#a#$==% &$$ !&(( !############### #4#;;;$&GLLCMM$J$J  !A ,IIG)++GLLs8=#8#8#?#?#A#ABB k677-G  ! KLL!  %!!   ~ 9---   M(D ) ) )   MMOOO  ((0 NN     0o--// :   El7#7 #C#CDDG 4== w~~d## ((dF)C)CDD   )!! )  )$W--  ) 8(DD  D    ",,E,22?     |  LLtHL E E E"/55L!4RWMMI  &&     !4RFFH ((I}}H % % % % % %  " "7H 5 5 5GXt44H)0 H(=(=HNN   %)0Y)?)?HNN   &)1(9HNN   % LLH73H3P      PMr) # P P Pk!$F"G"G$"NOOO P y11+9   C 0022a"))MM )$*C!" %fhh "7NN$$E. <<< <<++,<>NOOO"4U;;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<K(("1XX ""8ZXNNN&&!&!%:DA X,,YAA  M"-3$4$4#                +3 %05577 kBCC>>## J N(3H G$$AAHqJ L  w(8J9N(O(O P P P K ! !(J H M M M}}_n== ?+Hg>>>5 9%% 0022#a#$==% &$$ !&(( !###############' 8}}**x8/C/C ( ,Xx@@% ' 1(H E E J J L L!--%(0(?(?#(#8%%% $%=<#3*$,OOH4L$M$ME%-%=FF$,$7$=E%)F%e_3355++%&'Cf'L%M%MFF!""K L L!' &-F$<<<<$,$6$6z$B$BEE$4<<<$,OOF$;$;EEE<< @!%//11B9::R?F ""6***%(((X000&x888#!!!$!!!  N N%%]-L%MMM N N N N N N N N N N N N N N N 9---   M(D ) ) )   MMOOO  ((0 NN    9---   M(D ) ) )   MMOOO  ((0 NN     0 H s?Iw>N (+L N L##N &L#'A#N w> 1N?<w>>N??B?w>)Dw>,Xw>Xw>XE!w>9^w>1_Aw>>a  w> a$ $w>'a$ (>w>&d ;+c2& d 2c6 6d 9c6 :d = w> d  w>d A+w><f$ w>$f((w>+f(,E"w>+m9 w>m  w> m  A$w>2ow>ow>ow> A?q w> r.+rr.$r(%r.'r((r.+w>-r..B/w>!v > w> vw>vw>>A,y*c|r|rdS|jtd|j|j|j|jfzdS)NsI%d files updated, %d files merged, %d files removed, %d files unresolved )isemptyrrr updatedcount mergedcount removedcountunresolvedcount)rlr quietemptys r9 _showstatsrp'svemmooGNN  7         !       rCcp|jddtj||d|ddg|S)zUpdate the working directory to node. When overwrite is set, changes are clobbered, merged else returns stats (see pydoc mercurial.merge.applyupdates)sBprefer merge.update() or merge.clean_update() over hg.updaterepo()s5.7Fs working copys destination) branchmergeforcelabels updatecheck)r deprecwarnmergemodr)rlr overwriterus r9 updaterepory8sW  GM    0    rCctj|||}t||||jr'|jt d|jdkS)z$update the working directory to noderus1use 'hg resolve' to retry unresolved file merges r)rwrrprnrrr)rlrrorurs r9rrLsc ODJK @ @ @EtUJ''' Q qNOOPPP  1 $$rCcztj||}|jdksJ|rt|||dS)zAforcibly switch the working directory to node, clobbering changesrF)rw clean_updaternrp)rlr show_statsrors r9cleanrYsI  !$t* - -E  A % % % %,4 +++ 5rCc||+|dd}|tvr tj}|tvrt d|dtd|5d}d}|t j||}|\}}}d }|rt||} nD|tj kr"tj |d tj }t||| } | s|r||d krntj||g|d rB||jd } |t)d| zn||jd} |t)d| ztj|n||jvr\||jkr;||d } |t)d| ztj||n]|r[|jr@||jd} |t)d| ztj||rt j||dddn #1swxYwY| S)aUpdate the working directory with extra care for non-file components This takes care of non-file components below: :bookmark: might be advanced or (in)activated This takes arguments below: :checkout: to which revision the working directory is updated :brev: a name, which might be a bookmark to be activated after updating :clean: whether changes in the working directory can be discarded :updatecheck: how to deal with a dirty working directory Valid values for updatecheck are the UPDATECHECK_* constants defined in the merge module. Passing `None` will result in using the configured default. * ABORT: abort if the working directory is dirty * NONE: don't check (merge working directory changes into destination) * LINEAR: check that update is linear before merging working directory changes into destination * NO_CONFLICT: check that the update does not result in file merges This returns whether conflict is detected at updating or not. Nscommandss update.checkzInvalid updatecheck value z (can accept )F)rT)rr{r=sbookmarks.activesupdating bookmark %s r)s(leaving bookmark %s) s(activating bookmark %s) )r_VALID_UPDATECHECKSrwUPDATECHECK_LINEARr1rr destupdate_cleanUPDATECHECK_ABORTr bailifchangedUPDATECHECK_NONErrr rlabelrNrr deactivaterDrQstatusotherdests) rrlrbrevrru movemarkfromwarndestupdataretbs r9 updatetotallyrms4ii _== 1 1 1"5K---j{{/// 1    '0'0   (U;;;F+1 (HlDH  Cx((CCh888%d%8888&7 $kBBBC '| 'tDz0000!$T 8I8IJJ +HHT13FGG !566:;;;;HHT1<@@ !677!;<<<$T**** T_ $ $t+++HHT#677 !9::Q>???  tT * * * *  '# =HHT1<@@ !677!;<<<   & & &  0  %b$ / / /O'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0R Js&H?J11J58J5c>|}tj|||}t|||jr(|jtdn)|r'|jtd|jdkS)zWBranch merge with node, resolving changes. Return true if any unresolved conflicts.)rsrtsRuse 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon s'(branch merge, don't forget to commit) r)rlrwrrprnrrr)ctxrsremindrtrlrs r9rrs 88::D N3eF ; ; ;EtU G  6      G qDEEFFF  1 $$rCctj|}|r|j}n|d}|jtd|ddztj ||}|j dksJt||dS)Nr=s(aborting the merge, updating back to %s r) mergestatemodrractivelocalctxrrrrrwr}rnrp)rrlmsrrs r9 abortmergers  ! & &t , ,B yy{{ {  Dz~~GNN1ABBT#2#YNOOO  !$t* - -E  A % % % %tUrCc tj|||g}t|}t|dkr5t d} | t|z} t j| |d} tj| j| d\}} |tj |}| rt|}notj |} | rtjj} n t"j} | d| j|fz| _t| }t%|||j} |t dtj|zt-|| | d\}}|rfd |D}t/j|||| d | d \}}|s6|t d ||S|d t5j|||}|||||n#|wxYw|dS)z Helper for incoming / gincoming. displaychlist gets called with (remoterepo, incomingchangesetlist, displayer) parameters, and is supposed to contain only code that can't be unified. rs<for now, incoming supports only a single source, %d providedrbranchN%s/%scomparing with %s revc:g|]}|S)r)r@rrTs r9 z_incoming..s%666#ELL%%666rCrZforcesno changes found sincomingbuffered)r(get_pull_pathsrMrKrrr2rrawlocr`r!isabsrhrir-r5r posixpathrLr0r hidepasswordrYr getremotechangespagerrchangesetdisplayer) displaychlistsubreporecurserrlrrrsubpathsrcsmsgr5rUpr cleanupfnrJrchlist displayerrTs @r9 _incomingrs  !$VH 5 5D ::D 4yyA~~OPP s4yyk# 7D' TXXi5H5HIIFH+g&& ==?? 7^^FF F##Ayy{{ .7+$-Xh!&')::;;AF1XXF tV $ $E I !*++g.B6.J.JJKKK&tUHdhhv>N>NOOh  76666666D#-#> eT488I#6#68J8J$ $  vy $ IIa-.. / / /!>##   1 th     eVY/// N 1s*CJ-AJ-- J9c Rfd}fd}t|||S)Nc d}drYd}t|jD]<}||}t ||}=|SNrssubrepos)r`rrrminincoming)rrrrrrlrrs r9rz incoming..subreporecurse#su 88K  ?t*C!#,// ? ?ggg&&#s||B==>> rCctj}dr|d}|D]|}| ||krdSfd|j|D}drt |dkr\|dz }|||}dS)N newest_firstrc*g|]}|jk |Srr+r@rrls r9rz-incoming..display..4s,dk9I9I9I9I9IrC no_mergesr)rgetlimitr`reverse changelogparentsrKshow) rTrrlimitcountrrrrls r9displayzincoming..display,s#D)) 88O $ $  NN    % %A Ue^^ ?22155Gxx %% #g,,!*;*; QJE NN58 $ $ $ $ % %rCr)r)rrlrrrrrs```` r9rr"st%%%%%% T64   rCc t}g}tj||D]}|jp|j}|tj|}|rt|}notj|} | rtj j } n tj } | d| j |fz| _ t| }|j |dpgf} |t!dtj|zt%| |d\} } | r!fdt'j| D} t+||} t-j|| |d}|j}|||s t5jj|j||#|xYwtA|}j!}|"|j#||fS) NrrrrcDg|]}|Sr)r)r@rrls r9rz_outgoing..Ws'PPPDINN$$PPPrCr)rs)key)$rr(get_push_pathspushloclocr!rrhrir-r5rrrEr`rrrrYrrevrangerLr findcommonoutgoingmissingrrnochangesfoundrexcludedrOr0rMrsortr)rrldestsrroutothersr5rrrrUrJrrToutgoingo outgoing_revscls ` r9 _outgoingrAsF %%C F&tR77!!|'tx  k'**G}} W~~K%%99;;2!w/HH(1H!(afg->">??Qxx; 3 3 9r9 !*++g.B4.H.HHIII&tT8TXXf=M=MNNh  QPPPP 0CD$0O0OPPPDT4&&  3eT(););H A JJqMMM I&twh6GHHH MM%   KKMMM IIM B26""" &  s A>HH+c d}|drY|d}t|jD]<}||}t |||||}=|Sr)r`rrrrr)rrlrrrrrrs r9_outgoing_recursermst C xx :4jcl++ : :G'''""Cc3<<E48899CC JrCc#Ktj|}|d}|dr|| |s |D]}|VdSd}j}|D]M}| ||krdSfd||D} |rt | dkrD|dz }|VNdS)z5apply revision filtering/ordering option for outgoingrrNrc*g|]}|jk |Srrrs r9rz$_outgoing_filter..s%@@@qDK/?/?1/?/?/?rCrr)rrr`rrrrK) rlrJrr no_mergesrArrrrs ` r9_outgoing_filterrws   % %E&&I xx    }Y}  AGGGG E B   % EE@@@@bjjmm@@@  W**   rCc P|drtjg|t|||||\}}d} |rd}|drftj|||}|dtj|||d} tj|||| tj nn|dtj|||} t|||D]} | || | |D]:} tj||| ||t|t!||||};||D]} | S#|D]} | wxYw)NsgraphrrrrTr)r`rcheckunsupportedgraphflagsr graphrevsrr displaygraphr asciiedgesrrr0r outgoinghooksrr) rrlrrrrrrrevdagrroths r9rrs xx8-b$777"dE4AAAIAv C  "Cxx!! "#-dAt<<%%%&9dT 'fi1D%%%&9"dDII )$488,,ANN47++++!!! E EC  !"dCq 9 9 9c,RudCCDDCC  C IIKKKK 6  C IIKKKK s D+F F%c tj||}|dtj|j|d}|r|jtd|D]}||} |j D]i} | |dp|}/#tj $r)}|jd||fzYd}~bd}~wwxYw}#t$rL|jtd t!|zYwxYw|S) z&verify the consistency of a repository)levels filelog(%s)s .hgsubstateschecking subrepo links F) allowcreates%d: %s Ns&.hgsubstate is corrupt in revision %s ) verifymodr#rJr"pathtorgetcwdrrrrrr RepoErrorwarn Exceptionrr)rlrrrJrrrr8s r9r#r#s  4u - - -C 99 DIt{{}}nMM  D  q455666  Cs)C "|==G=GGGG??FFHHOC!?=== [C8%;<<<<<<<<= =    @AACHHJJ''(  Js= D+CDC<C72D7C<<DAEEctj|dr!|j}|j}n|}dD]G}||p|d|}|r|d||dH|dd}|r|dd|ddD]5}||D]\}}||||d6|dd }|r*|dd tj |d|S) z*build a remote ui from ui or repo and optssbaseui)r\s remotecmdrscopiedrZs mainreporoot)sauthshostfingerprintss hostsecuritys http_proxyswebscacerts) r"rbrrcrr`rrA configitemsr+) rXrdstrvrAsectrvals r9rrs\ Y''joofhhjj"22 HHQKK /3::eQ//  2 MM%Ay 1 1 1 9o..A@ i!Y???O55-- 5 5HC MM$S) 4 4 4 4 5 6:&&AI fj$/!*<*>   +t'788DJJ**DJ  z4rCcg}d}tD]\}}t|j|}tj||} tj|}n$#t$rtj|}YnwxYw||t j |j ft||t j }t||fS)N) foirrr-r5rr.r4rOST_MTIMEst_sizemaxtuple)r rmaxmtimeattrrprefixrr6s r9rzcachedlocalrepo._repostate%s 8 8KD%TZ..F VU++A %WQZZ % % %WV__ % LL"T]+RZ8 9 9 98R %677HHU||X%%sAA=<A=ct|jj|jj}|jr||j}n|}t|}|j|_|j |_ |S)zObtain a copy of this class instance. A new localrepository instance is obtained. The new instance should be completely independent of the original. ) r%rrorigrootr rrrrr)r rlrs r9rczcachedlocalrepo.copy4sq $*+TZ-@AA   %==!122DD??$$D D ! !;*rCN)__name__ __module__ __qualname____doc__r rrrcrrCr9rrsV@@ + + +   8 & & &rCr)T)FNNN)rCFNNN)FNN)NTTNFr?)FNTF) NFNTFNNNNN)F)FN)TF)FTN)br-rr.r.r:i18nrrrrrpycompatrr8r r r r r rrrrrrrrrrrwrrrrrrrrrrFr r!r"r#rr$r interfacesr%rSutilsr&r'r(rrr:rYr_rerirurrrLrrrrrrrrr rrrpryrrrrrrrUPDATECHECK_NO_CONFLICTrrrrrrrrrrrrrrCr9r&s   <433333 ,...()))Z   "     9999JN<   %%%%2    444,,   - - - - `   ,---`3333$,%%%^   h-h-h-h-X***      NNNNb"(%%%%      $ MMMMd    %%%%.   , < < < < ~>)!)!)!)!X.BDBHHHHHHHHHHrC