^cU ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlmZddlmZmZmZmZddlmZmZddlmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z2m3Z3m4Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;mZ>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZMmNZNmOZOmPZPmQZRmSZSmTZUmVZVmWZWddlXmYZYddlZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`dd lBmaZbmcZdmeZfmgZgmhZhmiZie2jjZjiZkekleKjmjne=jmekZmemd ged d dZoemdgdZpemdgddZqemddddedfdddedfdddedfddded fged! dd#Zrdd$Zsdd%Ztdd&Zud'Zvdd(Zwemd)d*d+ded,fdd-ged.fdd/ded0fgedd 1dd2Zxemd3ged4d 1d5Zyemd6d7gd8d9Zzemd:gdd;Z{emdfgd?d@Z|dAZ}dBZ~emdCgddDZemdEdFdGdedHfdIdJdedKfddLdedMfdNdOdedPfgedQd ddRZemdSe!jedTddUZemdVdWdXdedYfgedZd d [dd\Zemd]e!je!jzed^d dd_Zemd`e!je!jzedTd ddaZemdbddcdeddfdded edffddgdedhfddid"edjfdd+d"edkfgedldmZemdngeddoZemdpddqdedrfddsdedtfddugdvfdwdxdyge!jze!jzedzdd|Zd}Zemd~dddedfgd ddZemde!jgd dZemdddudeded8fddd"edfdNddedfddgededfgeddZemddddededfdddededfddd"edfge!jzdZemdge!jzdZemdgedd 1ddZemdddgededfddgededfdFddededfgedd 1ddZemdgddZemde!je!jzed^ddZemde!jed^d ddZemdgdZemdge!jzdd 1dZemdgedd 1dZemdgeddZemddddedfdddedĦfdNddedƦfdddedɦfgedldʄZemdddd"edͦfd*dgedϦedЦfgddd҄Zemdge!jzddԄZemdged֦dׄZemdddd"edڦfddd"edܦfddd"edަfddd"edfgdZemddddedfddd"edfddugedfddd"edfddd"edfddgedfge!jze!jzedddZemdddudeded8fgeddZemdddudeded8fgeddZemddddedfdddedfd*ddedfdddedfgeddZemde!jdd dZemdged4d 1dZemddduded ed8fdd ded fge!jze!jzed d d Zemdgedd 1dZemdgedddZemdddudeded8fdddedfgeddZemdddd"edfgddZemdddudeded8fgeddZemd gdd!Zemd"e!jd#d$d"ed%fgzed^d dd&Zemd'e!jdd(ded)ed*fgzed+d dd,Zemd-dd.ded/fdd0d ed1fdNd2ded3fddgededfdd4d"ed5fdd6d"ed7fgd8d9Zemd:dd;d"ed<fdd=ded>fdd?ded@fgddAZemdBgedCddDZemdEe!jedTddFZemdGgdHd ddIZemdJdKge!jzedLdMZemdNddudedOed8fgedPddQZemdRd dSZemdTddUd"edVfgedWdXZemdYgdZZemd[dduged\ed8fd]d^ged_ed`fgedad dbZemdcddddedeedffgedgd 1ddhZemdiddddedeedffgedgd 1ddjZemdkgdlZemdmdd.gednedfddod"edpfddqd edrfddsdedtfddudedvfddwdedxfgddyZemdze!jed{d d|Zemd}ged8d~Zemdgde!jzedd 1dZŐdZemdddd"edfdddedfddd"edfddd"edfge!jzedd ddZdS(N)_)binhexnullrevshort)getattropen)6bundle2 bundlerepo changegroupcmdutilcolorcontextcopies dagparser dirstateutilsencodingerrorexchange extensions filemerge filesetlang formatterhghttppeer localrepolock logcmdutil mergestatemetadataobsoleteobsutilpathutilphasespolicypvecpycompat registrarrepairrepoview requirementsrevlog revlogutilsrevset revsetlangscmutil setdiscovery simplemergesshpeersslutil streamclonestriptags templater treediscoveryupgradeurlutilvfswireprotoframingwireprotoserver) repository)cborutil compressiondateutilprocutil stringutilurlutil) constantsdebugdeltasnodemaprewritesidedatas debugancestors[INDEX] REV1 REV2T) optionalrepocVt|dkrH|\}}}tjtjt jd|}|j}nkt|dkr7|s!tjtd|\}}|j }|j}n!tjtd| ||||}| d| |t|fzdS) zrgetcwdlookuprAbortr changelogancestorwriterevr) uirepoargsindexrev1rev2rrXas 9/usr/lib/python3/dist-packages/mercurial/debugcommands.py debugancestorrgzs 4yyA~~ tT M&*X_%6%6eDDDe L L Ta +JKK  d Nk!EFFGGG 66$<<..AHHZ15588SVV, ,-----sdebugantivirusrunningc:|jdd5}|tjddddn #1swxYwYt jdtj|jddS)z?attempt to trigger an antivirus scanner to see if one is activezeicar-test-file.comwbsUST#=}P$fV?P+K%yP+C|uG$>GBDK|qyDK~v2MM*z!debugbuilddag..sOOOAeaiOOOrhrhsbuildings revisions)unittotalsbuilddagdefaultsnode %s smfcDg|]}|Sr)data)rxfns rfrz!debugbuilddag..s2...-.AbEJJLL...rhc6g|]}|Srr7rls rfrz!debugbuilddag..s0 !GGIIrh s r%isofsr%i snf%isnfcJ|vrtj||||SdSN)r memfilectx)r_cxpath filecontents rffctxfnzdebugbuilddag..fctxfn:s8{**&1 "dK,=   4rhc g|] }| Srr)rpnodeidss rfrz!debugbuilddag..Fs3331GAJ333rhr%irzbranch)dateuserextralstag %s %s %s as branch %s s localtags)#statusrfinreadrZrUrrYrparsedagrangeappend makeprogresswlockr transactionupdatenoter(bytestrr[r3 Merge3Textrender_minimizedrsplitrp startswithrmemctx commitctxrnoder>r\)%r^r_textmergeable_fileoverwritten_filenew_file from_existingclrtyper linesperrevinitialmergedlinesr8progressatatbranchidpsfilesp2p1pabaselocalotherm3ml mergedtextrparsrnodeidnamerrrs% @@@rf debugbuilddagrsCD | !/00111v{{}} B 2ww{{={k!677888 E(.. d 4<< QJE' OOq%+:M1N1NOOO!!#&&& D +Q|__EH \9\94::<<\9\9\9\9d.>.>{.K.K\9\9  #,T22S S JD$t||(8(>(>>@@@B !1BbeB2ww{{!"Q%[[[__....35r2,...*eU)3D%GG%0%A"%E%Ea%H #aV[[]]0077/rK'(((GbL8(((!&BJLL$$$&0KO#4BLL$$$&.mKO @ 2BLL$$$&.mKO2ww{{!-!%beB"$@@B!}}U33@ % R 0 0 024R&++-- B     r77a<<2a5199 $ >UT> U U)U U)U U))U-0U-c ^d|z|rdzfd}|d|dtjiD]}|d}||dSt t jr!tj td D]4}|\} } } } } }}} dt| fz5dS) N s3%sformat: id, p1, p2, cset, delta base, len(delta) c Z d |fz D]z}|\}}}}}}}} d t|t|t|t|t|t|fz{dS)Ns %s%s s%s%s %s %s %s %s %d )r\ deltaiterrrU) named deltadatarrrcs deltabasedeltaflagsrMrx indent_stringr^s rf showchunksz%_debugchangegroup..showchunksis HH[M5#99 : : : ]]__   FOCb"b)UE8,%D BBBIE        rh changelogmanifestsfilenamesuse debugbundle2 for this file%s%s ) writenoi18nchangelogheadermanifestheaderiter filelogheader isinstancer unbundle20rrYrrr\r)r^rxallindentoptsr chunkdatarwrrrrrrrrrMrs`` @rf_debugchangegroupras6MM $=  C           "  <     ;c/44  Ik*E Ju       c7- . . D+a ABBCC C  = =IBK ?D"b"ix HHY-T!;; < < < < = =rhc tj|}|}d|z} tj|\}}d}|||t |fz}|||d|} t|D]U} tj d| } | | |tj| | V| dS#t j$r<} d}||| jt |fz}||Yd} ~ dSd} ~ wwxYw)/display version and markers contained in 'data'rs%sversion: %d (%d bytes) debugobsoleteNs%%sunsupported version: %s (%d bytes) )r( byteskwargsrr" _readmarkersrUr\rsortedr#marker startitemplainr showmarkerendrUnknownVersionversion) r^partrrrrrmarkersmsgfm rawmarkermexcs rf_debugobsmarkersrsL   % %D 99;;D6MM#066 , }gs4yy00  \\*D 1 1 & &ItY//A LLNNN HH] # # #  r1 % % % %   7 }ck3t9944  sDE1E  Ecd|z}tj|}tjD]Y}||D]N}|||dt |tj|fzOZdS)rrrN)r% binarydecode allphasesr\r phasenames)r^rrr headsbyphasephaseheads rf_debugphaseheadsr s6MM&t,,L!II ' I ID HH] # # # HHZ3t99f.?.F"GG H H H H IIIrhctttjtjfr1ddfdtDzStj tS)Ns{%s}, c32K|]}d||fzVdS)s%s: %sNr)rkthings rf z_quasirepr..s0HHQyAuQx=0HHHHHHrh) rdictr=sortdict collections OrderedDictrprr(rrepr)rs`rf _quasireprrsq%$ {/FGHH  JJHHHH&--HHH H H    DKK ( ((rhc t|tjs!tjt d|dt|jz| dg}| D]}|r |j |vrd}|||j t|j|j fz|j dkrI|j dd}tj||d}|jst!||f|d d ||j d kr|jst#||fd d i||j d kr|jst%||d dS)zlists the contents of a bundle2snot a bundle2 filesStream params: %s part_types%s -- %s (mandatory: %r) s changegroupsversions01sUN)rrs obsmarkersrs phase-heads)rN)rr rrrYrr\rparamsget iterpartsr mandatoryr getunbundlerquietrrr ) r^rxrr parttypesrrrcgs rf _debugbundle2r!s c7- . .4k!122333HH$z#*'='==???b))I 55  )33 + #Jt{$;$;T^LLNNN 9 & &kooj%88G)'4??B8 E!"bDc!DDtDDD 9 % %8 = T<z$_debugdisplaycolor..VsdadlAaD!A$5Orhr4r%label) copy_stylesclearr_activeeffectskeys_terminfoparams configitemsrr\rrr/)r^effectr r6r/ colornameros rfrdrdIsN BJ&r**//11$$# 6 &NN8,, & &DAq||I&& & !!"" 1 l++ & !!"" 1 HHQ% & &''' 2:##%%+O+O P P PE!33 5 9$E222233rhc vtdjsdStdjD}t jD]\}}d|z||rddtd|t |z zdfd |Dd dS) Nsavailable style: c34K|]}t|VdSrrUrss rfrz%_debugdisplaystyle.._s(++1A++++++rh%srns: rrr c3DK|]}||VdSrrn)rer^s rfrz%_debugdisplaystyle..fs/HH1AHHHHHHrhr) r\rrqmaxrr/rUrpr)r^widthroeffectss` rfrcrc[s(HHQ$ % %&&& : ++ +++ + +E !1!1!3!344w e,,,  J HHUOOO HHTSECJJ$6778 9 9 9 HHUZZHHHH HHHHH I I I rhsdebugcreatestreamclonebundlecVtj|r"|tdt j|\}}t j||||tdd t|zdS)zcreate a stream clone bundle file Stream bundles are special bundles that are essentially archives of revlog files. They are commonly used for cloning very quickly. s=(warning: stream clone bundle will contain secret revisions) sbundle requirements: %s r N) r% hassecretrVrr6generatebundlev1r writechunksr\rpr)r^r_rwr,rxs rfdebugcreatestreamclonebundlerjs         $4T::L#BU+++HHQ+ , ,uzz&:N:N/O/O OPPPPPrhsdebugdagtstagssuse tags as labelsbbranchessannotate with branch namessdotssuse dots for runsssspacessseparate elements by spacessPTION]... [FILE [REV]...]c 6 |d}|d}|rMtjtjt jd|dDfd}n|r|j |d|d rji |D]A\}} | g |B fd }n!tj td tj||d d ||d D],} || |d-dS)aformat the changelog or an index DAG as a concise textual description If you pass a revlog index, the revlog's DAG is emitted. If you list revision numbers, they get labeled in the output as rN. Otherwise, the changelog DAG of the current repo is emitted. spacesdotsFrQc,h|]}t|Sr)int)rrds rf zdebugdag..s%%%1A%%%rhc 3KD]C}d|td|DffV|vr d|d|zffVDdS)Nr}c3&K|] }|dk|V dSrNrrrs rfrz+debugdag..events..s&$N$N1a2ggQgggg$N$Nrhrr)list parentrevs)rdrevsrlogs rfeventszdebugdag..eventss| 0 0Q$N$N0B0B$N$N$N N NOOOOO99FQJ//// 0 0rhr8branchesc 3RKd}D]}rB|dd}||krd|fV|}d|td|DffVr$|}|r |D] }d||ffV dS)Nrrrr}c3&K|] }|dk|V dSrrrs rfrz+debugdag..events..s&$L$L1AGGQGGGG$L$Lrhr)rrrrr) brdnewblsrrrlabelsr8s rfrzdebugdag..eventssA / /!772771::..q1)rrWrZr8r/ setdefaultr]rrrYrr dagtextlinesr\)r^r_file_rrrrrrnlinerrrrr8s ` @@@@@rfdebugdagrs&XXh  F 88F  D #=}VZ(9(9GGGOO%%%%% 0 0 0 0 0 0 0 = ^xx88J''  ;F ))++ ; ;1!!"&&))R0077:::: / / / / / / / / / k!:;;<<<&      rh debugdatas-c|-m|FILE REVc Ptj|}|ds*|ds|dr)|"tjdt dd|}}n$|"tjdt dt j|d||} || | |dS#t$r%tj t d|zwxYw)z)dump the contents of a data file revisionrrdirNrinvalid argumentsinvalid revision identifier %s) r(rrr CommandErrorrr openstorager\rawdatarXKeyErrorrY)r^r_rr]rrds rf debugdatars%   % %D xx H+!6!6H$((6:J:JH ?$\15I3J3JKK K5s  q1E/F/FGGGD,t<>DEEEFs 9;C66/D%s debugdateesextendedstry extended date formatss[-e] DATE [RANGE])r#rNc |dr tj|tj}ntj|}|d|z|dtj|z|r=tj|}|d||dzdSdS)zparse and display a dateextendedsinternal: %d %d s standard: %s s match: %s rN)rD parsedateextendeddateformatsrdatestr matchdate)r^rrrdrs rf debugdaters J%  tX%A B B  t $ $NN'!+,,,NN$x'7':'::;;; 1  u % % ~!A$/0000011rhdebugdeltachains -c|-m|FILEc "#$%tj|}tj|d||$$j#$j}$j}$j"t$dd}t#%"#$%fd}| d|}| d|r| d| di} $D]} || \} } } }}}}|d}| |t| d z}||}|| }|| z|z }||z } |d }n#t$rd }YnwxYw|dkr t|t|z }n|}|dkr t|t|z }n|}||d d | | | |t|||| ||||||| |t|||| |||||||rd}d}d}t#j$|D]K}|d z }||d ||d z}|||dz } || z }|| kr| }L|r t|t|z }!nd }!|dd|||!||||!| | d|dS)a dump information about delta chains in a revlog Output can be templatized. Available template keywords are: :``rev``: revision number :``p1``: parent 1 revision number (for reference) :``p2``: parent 2 revision number (for reference) :``chainid``: delta chain identifier (numbered by unique base) :``chainlen``: delta chain length to this revision :``prevrev``: previous revision in delta chain :``deltatype``: role of delta / how it was computed - base: a full snapshot - snap: an intermediate snapshot - p1: a delta against the first parent - p2: a delta against the second parent - skip1: a delta against the same base as p1 (when p1 has empty delta - skip2: a delta against the same base as p2 (when p2 has empty delta - prev: a delta against the previous revision - other: a delta against an arbitrary revision :``compsize``: compressed size of revision :``uncompsize``: uncompressed size of revision :``chainsize``: total size of compressed revisions in chain :``chainratio``: total chain size divided by uncompressed revision size (new delta chains typically start at ratio 2.00) :``lindist``: linear distance from base revision in delta chain to end of this revision :``extradist``: total size of revisions not part of this delta chain from base of delta chain to end of this revision; a measurement of how much extra data we need to read/seek across to read the delta chain for this revision :``extraratio``: extradist divided by chainsize; another representation of how much unrelated data is needed to load this delta chain If the repository is configured to use the sparse read, additional keywords are available: :``readsize``: total size of data read from the disk for a revision (sum of the sizes of all the blocks) :``largestblock``: size of the largest block of data read from the disk :``readdensity``: density of useful bytes in the data read from the disk :``srchunks``: in how many data hunks the whole revision would be read The sparse read can be enabled with experimental.sparse-read = True r_withsparsereadFc|}|tj}|tj}d}|tj}|tj}|tj}|}|t krn|krh|} | tjdkrJ| tj} | |ks| t ks| krn | }|} | tjdkJ|} |t krn|krh|} | tjdkrJ| tj} | | ks| t ks| krn | } | } | tjdkJrT||krd} nV||krd} nM||krd} nD||krd} n;|| krd} n2|rd} n||dz krd } nd } n ||krd} nd } |d}|D]}|}||tjz } ||||| ||fS) Nrr<r=sbasesskip1sskip2ssnaprsprevother) revlog_constantsENTRY_DATA_COMPRESSED_LENGTHENTRY_DATA_UNCOMPRESSED_LENGTHENTRY_DELTA_BASEENTRY_PARENT_1ENTRY_PARENT_2r issnapshot _deltachain)r]rcompsize uncompsize chainsizerrrp1_basee1new_basep2_basee2 deltatypechainiterrev generaldeltarard total_revss rfrevinfoz debugdeltachain..revinfo-sl #J%BC'FG  !23 . / . / ==R*__rB%BCqHH.?@''7**:--"7^%BCqHH ==R*__rB%BCqHH.?@''7**:--"7^%BCqHH  $rzz! ! # $ $ c"" %# q# $ s{{# #  c""1% J JGgA +HI III2xYyHHrhs rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratios) readsize largestblk rddensity srchunksrrrrsrrev p1 p2 chainid chainlen prevrev deltatype compsize uncompsize chainsize chainratio lindist extradist extraratios?%7d %7d %7d %7d %8d %8d %7s %10d %10d %10d %9.5f %9d %9d %10.5f) r]chainidchainlenprevrevrrrr chainratiolindist extradist extraratios*readsize largestblock readdensity srchunkss %10d %10d %9.5f %8d)readsize largestblock readdensitysrchunksN)r(rr openrevlograstartlength _generaldeltar rUrrr IndexErrorfloatrr\ deltautil slicechunkr)&r^r_rrrrwithsparsereadrr chainbasesr]rrcompuncomprrr chainbaser basestartrevstart lineardistrrrrrrr revschunkblkendblksizerrrardrs& @@@@rfdebugdeltachainrsj   % %D4!3UDAAA GE GE XF?LQ 1599NUJGIGIGIGIGIGIGIGIR ($ / /BHH  ? =>>>HHUOOOJXX>y))E),<,<.keyfuncYs49 1HfeUE8$ $rhr)rrmrsunset sset z%Y-%m-%d %H:%M:%S i slnks%3ois%c %s %10d %s%s scopy: %s -> %s )rrR_use_dirstate_v2rrYr_maprrv2 TREE_METADATAunpack tree_metadatar\ data_sizeuuidbinasciihexlifyr debug_itersortrmstrftime localtimer strtolocalr=umaskrcopied)r^r_rr start_offset root_nodesnodes_with_entrynodes_with_copy unused_bytes_unusedignore_patternrrrentriesrrstatemodesizertimestrrqs rf debugstater;sT: xx}- H+a EFFGG G#*   * 1 1&2F G G        122V5EEFFF *++fk9::: 677,FGGG 011J>??? .//2BBCCC -..@AAA 233lBCCC  * + +h.>~.N.N N    w-G xx &xx ##H % % % % 4=%00T%[0AABBG LLWL P P-2*%tU B;;-GG  3-GGm$8$.:O:OPPG)'22G '> 9DDTE\TZK78D %dGX(NNOOOO ] ! ! # #HH &''4=+?+?+B+BA*FFGGGGHHrhsdebugdirstateignorepatternshashc |jjrO|jjj}d}|j| d}|t j|dzdSdS)z^show the hash of ignore patterns stored in dirstate if v2, or nothing for dirstate-v2 Nr)rRrrrr#r\r&r')r^r_rrhash_len hash_bytess rfdebugdirstateignorepatternshashr@ssh }%7#*)8)**5  !*--566666 77rhdebugdiscoveryoldsuse old-style discoverynonheadss/use old-style discovery with non-heads includedrevs&restrict discovery to this set of revs)rhseeds12323s)specify the random seed use for discovery)rhs local-as-revsrhs+treat local has having these revisions only)rhsremote-as-revsrhs.use local as remote, with only these revisionss[--rev REV] [OTHER]rc #$%&tj}d}d&tjt d&sht jd|\}}tj |} tdt j |znsdgf}tj|d&zg%t%%%fd}|t jd < }|jd |_|rQtj|d|zg$t$$$fd } | t jd <d i#d r |f#&fd } n |f#fd } tj||d\} } d} d}|jrt0j#fd}n t4j}|5t5jd5}| | | \}}dddn #1swxYwYdddn #1swxYwYt;|dkrj|vrt?}t?|}t?|}t? }||z}||z}||z|z}!d}!d|}!d|}!d|}!d|}!d|}t;|t;|zt;|ksJ!d||}!d|}!d|} ||z}!||z}"|j"#d<t;|#d<t;|#d<t;|#d<t;|#d<t;|#d <t;|#d!<t;|t;|z #d"<t;|#d#<t;|t;|z #d$<t;|#d%<t;|#d&<t;|#d'<t;|#d(<t;|#d)<t;|#d*<t;|#d+<t;| #d,<t;|!#d-<t;|"#d.<|#|j$dVitj%#|&d/#z|&d0#zd1#vr|&d2#zd3#vr|&d4#zd5#vr|&d6#z|&d7#zd8#vr|&d9#zd:#vr|&d;#z|&d<|&d=#z|&d>#z|&d?#z|&d@#z|&dA#z|&dB#z|&dC#z|&dD#z|&dE#z|&dF#z|&dG#z|&dH#z|&dI#z|&dJ#z|&dK#z|&dL#z|&dM#z|&dN#z|&dO#z|&dP#z|&dQ#z|&dR#zj'rB|&dSdT(tSdU|Dz|*dS)Waruns the changeset discovery protocol in isolation The local peer can be "replaced" by a subset of the local repository by using the `--local-as-revs` flag. In the same way, the usual `remote` peer can be "replaced" by a subset of the local repository using the `--remote-as-revs` flag. This is useful to efficiently debug pathological discovery situations. The following developer oriented config are relevant for people playing with this command: * devel.discovery.exchange-heads=True If False, the discovery will not start with remote head fetching and local head querying. * devel.discovery.grow-sample=True If False, the sample size used in set discovery will not be increased through the process * devel.discovery.grow-sample.dynamic=True When discovery.grow-sample.dynamic is True, the default, the sample size is adapted to the shape of the undecided set (it is set to the max of: , len(roots(undecided)), len(heads(undecided) * devel.discovery.grow-sample.rate=1.05 the rate at which the sample grow * devel.discovery.randomize=True If andom sampling during discovery are deterministic. It is meant for integration tests. * devel.discovery.sample-size=200 Control the initial size of the discovery sample * devel.discovery.sample-size.initial=100 Control the initial size of the discovery for initial change s local_as_revssremote_as_revsrErAscomparing with %s Ns not (::(%s))cSrr)rremote_filtered_revss rf remote_funcz#debugdiscovery..remote_funcs ' 'rhdebug-discovery-remote-filtercSrr)rlocal_filtered_revss rf local_funcz"debugdiscovery..local_funcs & &rhsdebug-discovery-local-filterrBc .tj|dsItj|} r!|jd}||_tj |d\}}}t|} dsr dd td|Dz jj d |}fd |D}||fS) NrrJT)forcerRrCsunpruned common: %s rc34K|]}t|VdSrrrrs rfrz/debugdiscovery..doit.. s(&@&@AuQxx&@&@&@&@&@&@rhs heads(::%ln)c&h|] }|Srr)rrdclnodes rfrz/debugdiscovery..doit..s!444&&))444rh)r= safehasattrrlocallegacypeerr_repofilteredr:findcommonincomingsetrrrprrZrr) pushedrevs remoteheadsremoterdcommon_inhdsrTrr remote_revsr_r^s @rfdoitzdebugdiscovery..doits%#FK88 %"26<<>>BB% --.NOOA#$FL,?fD    FC[[F88K(( 5,ii&@&@&@&@&@ @ @AAB ,?F;;4444V4443; rhcd}|r#tj |} fd|D}tj ||d\}}}||fS)NcDg|]}|Srrrrdr_s rfrz0debugdiscovery..doit..s%666Aa666rhF) ancestorsofrRabortwhenunrelated)rrevranger2findcommonheads) r[r\r]nodesrr^anyr`rr_r^s rfrbzdebugdiscovery..doitswE 7!*4<<6666666+;!#(     FC3; rh)rrDc3jKdVd<dS)Noutput) pushbuffer popbuffer)rr^srfmay_capture_outputz*debugdiscovery..may_capture_output(s2 MMOOO EEE llnnDOOOrhzdebug-discoveryrsall()s::%lns roots(::%ld)s not ::%lds heads(%ld)s roots(%ld)snot (::%ln or %ln::)selapsedsnb-common-headssnb-common-heads-localsnb-common-heads-remotesnb-common-heads-bothsnb-common-rootss nb-head-localsnb-head-local-missingsnb-head-remotesnb-head-remote-unknownsnb-revssnb-revs-commonsnb-revs-missingsnb-missing-headssnb-missing-rootss nb-ini_undsnb-ini_und-headssnb-ini_und-rootssnb-ini_und-commonsnb-ini_und-missings#elapsed time: %(elapsed)f seconds s-round-trips: %(total-roundtrips)9d stotal-round-trips-headss5 round-trips-heads: %(total-round-trips-heads)9d stotal-round-trips-branchess; round-trips-branches: %(total-round-trips-branches)9d stotal-round-trips-betweens9 round-trips-between: %(total-round-trips-between)9d s*queries: %(total-queries)9d stotal-queries-branchess3 queries-branches: %(total-queries-branches)9d stotal-queries-betweens2 queries-between: %(total-queries-between)9d sheads summary: s, total common heads: %(nb-common-heads)9d s2 also local heads: %(nb-common-heads-local)9d s3 also remote heads: %(nb-common-heads-remote)9d s1 both: %(nb-common-heads-both)9d s* local heads: %(nb-head-local)9d s2 common: %(nb-common-heads-local)9d s2 missing: %(nb-head-local-missing)9d s+ remote heads: %(nb-head-remote)9d s3 common: %(nb-common-heads-remote)9d s3 unknown: %(nb-head-remote-unknown)9d s$local changesets: %(nb-revs)9d s+ common: %(nb-revs-common)9d s, heads: %(nb-common-heads)9d s, roots: %(nb-common-roots)9d s, missing: %(nb-revs-missing)9d s- heads: %(nb-missing-heads)9d s- roots: %(nb-missing-roots)9d s' first undecided set: %(nb-ini_und)9d s- heads: %(nb-ini_und-heads)9d s- roots: %(nb-ini_und-roots)9d s. common: %(nb-ini_und-common)9d s/ missing: %(nb-ini_und-missing)9d scommon heads: %s rc34K|]}t|VdSrrQrRs rfrz!debugdiscovery..s(>>AuQxx>>>>>>rhr)+r(r unfilteredrandomseedrrGget_unique_pull_pathrr,rr hidepasswordrri frozensetr+ filtertablerWrXr addbranchrevsr strict_format contextlibcontextmanagerr=nullcontextmanagertimedcmrUnullidrZheadsrelapsedrr strkwargsrverboserprr)'r^r_ remoteurlrunfi local_revsrr]rIrMrb remoterevs _checkout localrevsrrqtr^r` heads_common heads_remote heads_localheads_common_localheads_common_remoteheads_common_bothr roots_commonmissing heads_missing roots_missinginitial_undecidedheads_initial_undecidedroots_initial_undecidedcommon_initial_undecidedmissing_initial_undecidedrrLrHras'`` ` @@@@rfdebugdiscoveryrs R   % %D ??  D&'J()K KDM""### O%: tR   8tY// !*++g.B9.M.MMNNNN":)2 ?[01   ))=>> ( ( ( ( (BM=>|,,-MNN  >(1 ?Z/0  ((;<< ' ' ' ' 'AK<=}}<== D xx'17           028        ,T68$OOOJ V I ' . .B  5  " - - - - - # " - - "4    66 \+ , , 6$y*55KFC 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6666666666666666  6{{aDK611v;;Ls88Ldjjll##K& 3&5$|3kA ))H  C YYx ( (F99_f55Lii f--GIImW55MIImW55M v;;W %S 1 1 1 1 !46H#ii 7HII"ii 7HII069 1G ;yD"<00D %();%<%&>D "#$'(9$:$:D !"<00D  --D %(%5%5!>D "%&?"@"@D LLNNN BG''h &&'''HH 4t ;<<<HH > EFFF!T))  E L   %,,  K    $t++  ID P   HH ;d BCCC D(( H4OPPP4'' G$NOOOHH !!!HH = DEEEHH Cd JKKKHH Dt KLLLHH BT IJJJHH ;d BCCCHH Cd JKKKHH Cd JKKKHH  EFFFHH > EFFFHH 84 ?@@@HH > EFFFHH > EFFFHH ?$ FGGGHH @4 GHHH z   !ii>>>>>>>?? @   FFHHHHHs62I:I# I:#I' 'I:*I' +I::I>I>is debugdownloadrnspathc jtj|||}|}|rt|dt} |t}|r1|||t}|1|r|dSdS#|r|wwxYw)z4download a resource using Mercurial logic and configrjN)urlmodr _chunksizerr\r0)r^r_r<outputrrdestrs rf debugdownloadrs Rf % %B D /FE:..wwz"" ' JJt   77:&&D '   JJLLLLL  6  JJLLLL s A BB2debugextensionsc tj|}tj|}tj}|d|}t |tjdD]?\}}tj |}d} tj |drtj |j } n"ttddr tj} |rg} n#t|dd } t|d d} ||js|jr|d d |nx|d d ||s|| vr|dnE| s#|t-dn | d} |d| z||jo| dt-d| pd |jr-|t-dddg|z||||jo| dt-d|| d||jo| dt-d| pd A|dS)z(show information about active extensionsrrrmN__file__oxidizedF testedwithrhbuglinknamer%r~rs (untested!) rs (%s!) ssources location: %s s bundled: %s noyes)bundleds testedwiths tested with: %s sverrsbuglinks bug reporting: %s )r(rrr=rrroperator itemgetterismoduleinternalrUfsencoderr sys sysexecutablerrrrr\rr condwriter formatlistr) r^r_rextshgverrextnameextmod isinternal extsource exttestedwith extbuglinklasttestedversions rfdebugextensionsrs   % %D   $ $D LNNE ($ / /B!$H,?,B,BCCC3 3 088   FJ / / / )&/::II S*e , , / .I  GMM#FL#>>DDFFMVY55   8 :rz : HHWgw / / / / HHWeW - - - :Um33" :,--....$1"$5!'88999 J $9  ! " "       : J HHQ)**eV_Z-HH I I I  ### J (=  $ % % MM-fM 5 5     J %:  & ' '  #     FFHHHHHrhs debugfilesetrs#apply the filespec on this revisions all-filess3test files from all revisions and working directorys show-matchers(print internal representation of matcherps show-stages$print parsed tree at the given stagesNAMEs+[-r REV] [--all-files] [OPTION]... FILESPECc ddlm}|jtj|}t j||dd}dtjfdtj fdtj fg}d|D}t}|j r|d s|d|d d gkr||nN|d D]*} | |vr$t!jt%d | z+||d tj|} |D]b\} } | | } | |vrN|d s| dkr|d | z|tj| d ct} |drN|D]K} || }| || |jL|ds|x|d}| |jt7j|t;|jdd| |jnA| || |j|||}|ds|d0|j r)| dtCj"|d tG| D]&} || s|d| z'dS)z'parse and apply a fileset specificationr)filesetrDNparsedanalyzed optimizedch|]\}}|Srrrrrqs rfrzdebugfileset..%'''1!'''rh show_stager"invalid stage name: %s* %s: rs all_filesT)subreposunknownignoreds show_matcher * matcher: r%)$rsymbolsr(rrr>ridentityranalyzeoptimizerZraddrrrYrparser\ prettyformatrsubstater]rRwalkr1matchallr matchfilesetrWrrF prettyreprr)r^r_exprrrrIstages stagenames showalwaysrtreerqrrdr2wctxrs rf debugfilesetrsD OO   % %D  tTXXf%5%5t < "BCCC#$}-...  T " "D<<1qww ??M" )a9nna((( HH[-d33U ; ; ; EEE L% % %AQA LL # # # LL $ $ $ $ L #SWWYY.Dz M   &&dm,,        T]#### SYY[[!!! S\""" --A OIo!6!>2:!>  (=a(@(@%HHH E]]qtt   1rhsdebug-repair-issue6528s to-reports1build a report of affected revisions to this files from-reports+repair revisions listed in this report filesparanoids3check that both detection methods do the same thingc ~tj|dddg|d}|d}|d}|d}tj|jvr#d}t jt|tj ||||||dS)afind affected revisions and repair them. See issue6528 for more details. The `--to-report` and `--from-report` flags allow you to cache and reuse the computation of affected revisions for a given repository across clones. The report format is line-based (with empty lines ignored): ``` ,... ``` There can be multiple broken revisions per filelog, they are separated by a comma with no spaces. The only space is between the revision(s) and the filename. Note that this does *not* mean that this repairs future affected revisions, that needs a separate fix at the exchange level that was introduced in Mercurial 5.9.1. There is a `--paranoid` flag to test that the fast implementation is correct by checking it against the slow implementation. Since this matter is quite urgent and testing every edge-case is probably quite costly, we use this method to test on large repositories as a fuzzing method of sorts. to_report from_reportdry_runparanoids9can only repair revlogv1 repositories, v2 is not affected)rrrrN) rcheck_incompatible_argumentsrr,REVLOGV1_REQUIREMENTrrYrrLrepair_issue6528)r^r_rrrrrrs rfdebug_repair_issue6528rYsd ( kM95hhy!!G%%I((=))Kxx ##H(0AAAJk!C&&!!!    rh debugformatc  tj|}tdtjD tt d  fd}|d|}|rd}n tj}| d| d t dz z| d|j r| d| d tjD](}| | |}| |}||krd } d } n||jkrd } d } nd} d} |d||j|j| |dd||| |j|krd} nd} ||j dd||| ||j dd||jd| d *|dS)zdisplay format information about the current repository Use --verbose to get extra information about current config value and Mercurial default.c3>K|]}t|jVdSr)rUr)rfvs rfrzdebugformat..s*KKB3rw<<KKKKKKrhsformat-variantc4ddt|z zzS)Ns%s:rr{)rmaxvariantlengths rfmakeformatnamez#debugformat..makeformatnames!1CII!=>??rhrc<tj|dr|S|rdSdS)Ns startswithrr)r=rUvalues rf formatvaluez debugformat..formatvalues.}55   vurhrs repos config defaultrs!formatvariant.name.mismatchconfigs!formatvariant.repo.mismatchconfigs"formatvariant.name.mismatchdefaults"formatvariant.repo.mismatchdefaultsformatvariant.name.uptodatesformatvariant.repo.uptodaterrnsrepos %3ssformatvariant.config.specialsformatvariant.config.defaultsconfigs %6srs %7ssformatvariant.defaultN)r(rrr;allformatvariantrUrisplainrrrrfromrepo fromconfigdefaultr\rrr) r^r_rrrrr repovalue configvalue namelabel repolabel configlabelrs @rf debugformatrs   % %DKK'2JKKKKK30113CDD@@@@@ nd + +B zz|| (    ' HH HHT%,=(>(>> ?@@@HHX z% #$$$HHUOOO&## KK%% mmD))  # #E D>2 E >EE EE EEsdebuggetbundleHsheadsid of head nodesIDCscommonsid of common nodetypebzip2sbundle compression type to usesTYPEsREPO FILE [-H|-C ID]...c ,tj|}tj|||}|dst jdi}|rd|D|d<|rd|D|d<d|d<|jdi|}|d d  } d d ddd} | | } | tj vr!t jtdtj |||| dS)zretrieves a bundle from a repo Every ID must be a full-length hex node id string. Saves the bundle to the given file. s getbundles.getbundle() not supported by target repositoryc,g|]}t|Srrr|s rfrz"debuggetbundle..s111Q#a&&111rhr^c,g|]}t|Srrr|s rfrz"debuggetbundle..!s...AQ...rhrN bundlecapsdebugrrsHG10UNsHG10BZsHG10GZsHG20)snonersgzipsbundle2s)unknown bundle type specified with --type)r)r(rrr,capablerrY getbundlerlowerr bundletypesr writebundle) r^repopathr'rr^rr_r`bundle bundletypebtypess rfdebuggetbundler$s?,   % %D 72tX & &D << % %MkKLLL D 211&111X /.....W D T^ - - - -F'8,,2244J F J''J,,,k!HIIJJJ FJ ;;;;;rhs debugignores[FILE]c|jj}|s,|dtj|zdSt j|d|}t j|d}|D]N}tj |}d} d} |dkrh||r|} |j |} n@tj |D]+} || r| } |j | } n,| r| |kr/|td||zn0|td||| fz| \} } }|td | | |fz |td ||zPdS) adisplay the combined ignore pattern and information about ignored files With no argument display the combined ignore pattern. Given space separated file names, shows if the given file is ignored and if so, show the ignore rule (file and line number) that matched it. r%N)patsT)legacyrelativevaluers%s is ignored s1%s is ignored because of containing directory %s s#(ignore rule in %s, line %d: '%s') s%s is not ignored )rR_ignorer\r(bytereprr1match getuipathfnrr=normpath_ignorefileandliner$finddirsr)r^r_rrignoreruipathfnrqnfr ignoredatar ignorefilelinenors rf debugignorer53s] "F %B 8,V44455555 M$t*5 1 1 1&tFFF B BAq!!BGJTzz6"::" G!%!A!A"!E!EJJ%.r22""!6!99"&'G)-)I)I!)L)LJ!E" Bb==HHQ122XXa[[@AAAAHH9$8A;;0 1,6( FD=>>!6401 122XXa[[@AAAA? B Brhsdebug-revlog-index|debugindexc tj|}tj|d||}|d|}t |d|}t j|||||jS)zdump index data for a revlogs debugindexs_revlog)rr- full_node) r(rrrrr revlog_debug debug_index debugflag)r^r_rrstorerr-s rf debugindexr<esy   % %D  mUD A AE mT * *B UJ . .F  #  ,    rh debugindexdotc tj|}tj|d||}|d|D]}||}||}|d||d|fz|d|j kr3|d||d|fz|ddS)z(dump an index DAG as a graphviz dot filer=s digraph G { s %d -> %d rrs} N) r(rrrrrrSr\r]r)r^r_rrrdrrpps rf debugindexdotr@|s   % %DD"2E4@@ANN#$$$ ::vvayy YYt__ AEE"Q%LL!#44555 a5DK   HH_be a'88 9 9 9HHVrhsdebugindexstatscp|j|jd|jj}t j|ds!t jtdt| D]\}}| d||fz dS)z)show stats related to the changelog indexrsstatss+debugindexstats only works with native codes%s: %d N) rZshortestrrar=rUrrYrrstatsr/r\)r^r_rar r6s rfdebugindexstatsrDs NDK+++ N E  E8 , ,Mk!JKKLLLu{{}}**,,--''1 1v%&&&&''rh debuginstallc tj|}d}|d|}||ddt jd} t jtjt jn0#t$r#}tj |}|dz }Yd}~nd}~wwxYw| |dd|d}tjtd r$rd}YnwxYwtAtBj"}tBj#r|$d|dt/d|%tM|dddd|vr"|'t/d d|vr"|'t/d!|'t/d"|d#nd$ztj(} |d%t/d&| )d'd|d(t/d)d'*| )d'ddd} tjt*j+tXd r7tjtjt&} n"t)t*d d r tj} |d*t/d+tZj-|d,t/d-| pt/dtZj-d.v} | }tZj-d/vp| } | p|} | rd} | rFdd0l.m/}m0}m1}m2}tg|tg|tg|tg|f|r&dd1lm4}m5}tg|tg|fn0#tl$r#}tj |}|dz }Yd}~nd}~wwxYw| |d2d3|tj7j89}|d4t/d5|%tMd6|Dd7dd8|d9t/d:|%tMd;|Dd7dd8ttj7;ttj<}|d|Dd7dd8d#}tj=rd?}|'t/d@|z|>ttj=AtjA}|dBdC|pdD| | dDt/dE|rtjBdF\}}|rid} tj@C|n-#tl$r }tj |}d}Yd}~nd}~wwxYw| |dGd3|nd}| |dHt/dI|| | dJt/dKdL|s|dz }| | dDt/dM|D}tjE|}tjG|d}|dNt/dO|tjH|}| | o|dPkdQt/dR| o|dPko|| | o|dPkdSt/dT| o||s |dPkr|dz }d}d} |I}n(#tjK$r}|jL}|dz }Yd}~nd}~wwxYw| |dUt/dV|| |dWt/dX|tjMD]'\}} t)| dYd}!|!||!||z }(| | dDt/dZ|s|>|[| |d\t/d]||N|S)^z;test Mercurial installation Returns 0 on success. rrEsencodingschecking encoding (%s)... Nrs encodingerrors. %s (check that your locale is properly set) rrFs pythonexes checking Python executable (%s) sunknownspythonimplementations$checking Python implementation (%s) s pythonverschecking Python version (%s) s%d.%d.%drPs pythonlibschecking Python lib (%s)... )rustextssnispythonsecuritys&checking Python security support (%s) sprotocolr~,)rfmtsepstls1.2sT TLS 1.2 not supported by Python install; network connections lack modern security sV SNI not supported by Python install; may have connectivity issues with some servers schecking Rust extensions (%s) missings installedshgvers checking Mercurial version (%s) +s hgverextras%checking Mercurial custom build (%s) shgmodulepolicyschecking module policy (%s) s hgmoduless#checking installed modules (%s)... )srust+cs rust+c-allow)csallow)base85bdiffmpatchosutil)r[rRsextensionserrors %s s compenginess-checking registered compression engines (%s) c3>K|]}|VdSrrrrs rfrzdebuginstall..;s*1116688111111rhs compenginer scompenginesavails,checking available compression engines (%s) c3fK|],}||V-dSr) availablerrSs rfrzdebuginstall..Es7BBAKKMMB16688BBBBBBrhscompenginesservers>checking available compression engines for wire protocol (%s) c^g|]*}||+Sr)wireprotosupportrrSs rfrz debuginstall..Us1 G G G!!2D2D2F2F GQVVXX G G Grhs availables"checking "re2" regexp engine (%s) )re2s templatedirsschecking templates (%s)... rhs no template directories found smap-cmdline.defaultsdefaulttemplateerrorsdefaulttemplateschecking default template (%s) sdefaulttemplatenotfounds template '%s' not found rs5 (templates seem to have been installed incorrectly) seditorschecking commit editor... (%s) svis vinotfoundsf No commit editor set and can't find %s in PATH (specify a commit editor in your configuration file) seditornotfoundsV Can't find editor '%s' in PATH (specify a commit editor in your configuration file) susernameschecking username (%s) s usernameerrorsJchecking username... %s (specify a username in your configuration file) debuginstallsno problems detected )problemssproblemss1%d problems detected, please check your install! )Or(rrrr\rcodecsrXsysstr LookupErrorrF forcebytestrrr=rUosrdirnamerrr rrrsysbytesplatformpython_implementation version_inforrG__doc__ ImportErrorrZr5supportedprotocolshassnirrrrrrrpmodules__name__r&cextrNrOrPrQrr[rR Exception compengines_enginesr5rCsupportedwireengines SERVERROLE_re2rboolr9 templatedirtry_open_template frommapfile geteditor expandpathrE shellsplitfindexeusernamerrYmessagerr)"r^rrZrr\inst pythonlibrGsecurityr hgmodulesrustandcrknopurerNrOrPrQr[rRrmwirecompenginesrXrrfpeditor editorbincmdpathrzrrmodhandlers" rfrYrYs   % %DH ot , ,BLLNNNHH[8(:KLLL C hoh&7889999 %d++A LL ; I J''+GOOH$5bk$B$BCC j% ( (+* HH .///!J-- HH 233(8::;; HH +,, s'+ + HH *++"Qz]]  7-..H~ VHH 455 fX&&[e NN    >     X  ;     HH .$_zz, @   LNNEHH!8995;;t;L;LQ;OHH 344 %++d##ABB'((I  H-z::+GOOH$5h$?$?@@ j% ( (+* HH1=>> HH 122"Qz]] } <> JJJy))GLL  '%     5%5I   LL  '%     !     vA H C;;== ;iA LL+q!<==xLL   B    *,,(( c#~t44   B 'HLLXsA&?$@$@AAA # """LL ?@@  FFHHH Oss%0B C B>>C I I&%I&A0V V/ V**V/_00 `:``f44g ggs debugknowns REPO ID...cTtj|}tj|||}|dst jd|d|D}|dd d|DzdS)ztest whether node ids are known to a repo Every ID must be a full-length hex node id string. Returns a list of 0s and 1s indicating unknown/known. sknowns*known() not supported by target repositoryc,g|]}t|Srrr|s rfrzdebugknown..s,,,1A,,,rhr%rhcg|]}|rdpd S)10rrrqs rfrzdebugknown..s!!D!D!D!*"4!D!D!DrhN) r(rrr,rrrYknownr\rp)r^r idsrr_rs rf debugknownrs   % %D 72tX & &D << ! !IkGHHH JJ,,,,, - -EHHW!D!De!D!D!DEE FGGGGGrhsdebuglabelcompletesLABEL...c"t||g|RdS)zEbackwards compatibility with old bash completion scripts (DEPRECATED)N)debugnamecomplete)r^r_r`s rfdebuglabelcompleters"b$&&&&&&&rhs debuglocksLsforce-free-locksfree the store lock (DANGEROUS)Wsforce-free-wlocks'free the working state lock (DANGEROUS)sset-locks set the store lock until stoppedSs set-wlocks(set the working state lock until stoppedc 8|dr|jd|dr|jd|ds|drdSg} |dr^ ||dn4#t j$r"t jtdwxYw|d r^ || dn4#t j$r"t jtd wxYwt|r r%td } |n?d }|t|z}| tjdn'#t"$rd}|YnwxYw t%|dS t%|n#t%|wxYwtjd}fd}|||jd|j z }|||jd|jz }|S)ashow or modify state of locks By default, this command will show which locks are held. This includes the user and process holding the lock, the amount of time the lock has been held, and the machine name where the process is running if it's not local. Locks protect the integrity of Mercurial's data, so should be treated with care. System crashes or other interruptions may cause locks to not be properly released, though Mercurial will usually detect and remove such stale locks automatically. However, detecting stale locks may not always be possible (for instance, on a shared filesystem). Removing locks may also be blocked by filesystem permissions. Setting a lock will prevent other commands from changing the data. The command will wait until an interruption (SIGINT, SIGTERM, ...) occurs. The set locks are removed when the command exits. Returns 0 if no locks are held. force_free_lockslockforce_free_wlockswlockr set_wlockFswlock is already heldset_lockslock is already helds&ready to release the lock (y)? $$ &Yess"%d locks held, waiting for signal Tg?s signal-received releasing locks cT |d}n#tj$rd}YnwxYw|r|n ||} |tjz }t j|j}| |}d|vrC| d\}} |tj kr d|pd| fz}n d|pd| |fz} d|dz||fzdS#t$rYnwxYw d|dzzd S) NF:suser %s, process %ssNonesuser %s, process %s, host %ss%-6s %s (%ds) rs %-6s free r)rLockHeldreleaselstatstatST_MTIMEr=rzst_uidreadlockrsocket gethostnamerFileNotFoundError) r>rmethodrstagerlockerhostpidnowr^s rfreportzdebuglocks..report1 sm u AA~   AAA    IIKKKK YYt__Bt}--}RY//d++6>> & T 2 2ID#v13333!74?7C:P!P!@ OG D" 1TD[NNOOOq$     ~5666qs ##B=C== D  D )rsvfs tryunlinkr>rrrrrYrrrU interactive promptchoicerrmrnKeyboardInterruptr) r^r_rlockspromptrheldrrs ` @rf debuglocksrsZ xx!""% G$$$ xx"##% 8$$$ xx!""dhh/A&B&Bq E 88K  ? ? TZZ..////> ? ? ?k!$<"="=>>> ? 88J   > > TYYu--....> > > >k!$;"<"<=== > u::  >>##(HIIFOOF++++@C3u::%CIIcNNN( 3( ,%   : # !   )++C DB FF49gty 1 11DFF48Xtz 2 22D KsaH=&(CH=1DH=(EH=1E33H=A8G?>H=?!H# H="H##H== Isdebugmanifestfulltextcachesclearsclear the cachesadds)add the given manifest nodes to the cachesNODErc fd}|drN5|}|d ddddS#1swxYwY|r5j}|d}|D]m} |||} n:#t j$r(} t jt| dd} ~ wwxYw| n ddddS#1swxYwY|}t|s$| td dS| td t|fzd } |D]t} || } t| }| |d zz } | td t| t!j|fzu|jdj}| tdt!j| t!j|fzdS)z@show, clear or amend the contents of the manifest fulltext cachecjd} |jS#t$r$t d}t j|wxYw)NrhsOCurrent revlog implementation doesn't appear to have a manifest fulltext cache ) manifestlog getstorage_fulltextcacheAttributeErrorrrrY)rdrr_s rfgetcachez,debugmanifestfulltextcache..getcachei sh   ' ' , , ## # # # #-C+c"" "  #s $.ArrT)clear_persisted_dataNrhsCheck your manifest node idhints cache empty sFcache contains %d manifest entries, in order of most to least recent: rsid: %s, size %s smanifestfulltextcaches%total cache data size %s, on-disk %s )rrrrrrrXrr]rYbytesrrUr\rpeekrr= bytecount_openerrst_size)r^r_rrrcacherr;rrTr totalsizerrr9ondisks ` rfdebugmanifestfulltextcacherX s," # # # # # xx ZZ\\  HJJE KKTK 2 2 2                    ZZ\\   ALL%%E   a1HH(+a'E                   HJJE u::  #$$%%%%%  #  5zzm        F::f%%Dt99D  "I HH&''3v;;t8L8L*MM    ##$<==E  7 8 8~i(($.*@*@A B     sG"AA#&A#!D"B>=D>C5 #C00C55DD"Ddebugmergestatec |jrtj|}|}|}|s|snY|s|dnA|||r|dn|dtj|}|dsd|d<tj |}| d|}| | d}| rd|jd fd |jd ffD]\} } } | || |t#|  |jr9t'|j| kr!||j| || d} | r:|D]6} | | | |j| }| |d |d tjtjfvr| |d | |d| |d| |d| |d| |d| |dnX|d tjtjfvr8| |d | |d | d!}t5|| D]E\}}| ||"||#F|8| | d!}t5|D]z\} }| |vr |D][\}}| || $||"||#\{||d%S)&zpprint merge state Use --verbose to print out information about whether v1 or v2 merge state was chosen.sno version 2 merge state s!v1 and v2 states match: using v2 s$v1 and v2 states mismatch: using v1 templates{if(commits, "", "no merge state found ")}{commits % "{name}{if(label, " ({label})")}: {node} "}{files % "file: {path} (state \"{state}\") {if(local_path, " local path: {local_path} (hash {local_key}, flags \"{local_flags}\") ancestor path: {ancestor_path} (node {ancestor_node}) other path: {other_path} (node {other_node}) ")}{if(rename_side, " rename side: {rename_side} renamed path: {renamed_path} ")}{extras % " extra: {key} = {value} "}"}{extras % "extra: {file} ({key} = {value}) "}rscommitsslocalrrrrrernsfiles)r)r7) local_keyrS) local_pathrP) ancestor_pathr) ancestor_noder) other_pathrh) other_node) local_flags) renamed_path) rename_sidesextrasrmr)fileN)r mergestatemodr _readrecordsv1_readrecordsv2r _v1v2matchr(rrrrnestedactiverrrr_labelsrUrrMERGE_RECORD_UNRESOLVEDMERGE_RECORD_RESOLVEDMERGE_RECORD_UNRESOLVED_PATHMERGE_RECORD_RESOLVED_PATHrextrasr/ allextras)r^r_r`rms v1records v2recordsr fm_commitsrr label_indexfm_filesrqr7 fm_extrasr r6rs rfdebugmergestater s  zE  %d + +%%'' %%''  E E  E NN8 9 9 9 9 ]]9i 0 0 E NN@ A A A A NNC D D D   % %D    > [$  ! & &t , ,B ($ / /BLLNNN:&&J yy{{ ? rx # rx #(  ? ? #D$   " " " OOO & & & OOTO + + +z ?c"*oo ;;bj&=>>>NNyy""H yy{{  A    MMqM ! ! !IaLE MMaM ) ) )Qx53 a 111 q 222 E!H 555 E!H 555 q 222 q 222 %( 3333q:8 58 444 %( 333  22Iryy||113344 ( (1##%%%1%%%Q'''' MMOOOO LLNNN )$$Ir||~~++--..$$1 77 GGII $ $DAq    ! ! ! NNN " " " NNqN ! ! ! NNN # # # #  $ MMOOOFFHHHHHrhsdebugnamecompletesNAME...cJt}|jD]3\}}|dkr(|||4|d|Dt}|sdg}|D]#|fd|D$|dt||ddS)z:complete "names" - tags, open branch names, bookmark namesrc3(K|] \}}}}| |VdSrr)rtagrtipcloseds rfrz$debugnamecomplete.. sD %S%f rhrhc3FK|]}||VdSr)r)rrres rfrz$debugnamecomplete..# s2??q||A?1??????rhrN) rZnamesr/r listnames branchmap iterbranchesr\rpr)r^r_r`rrns completionsres @rfrr s3 EEEJ$$&&--b ;   LLd++ , , , LL)-)9)9)F)F)H)H %%K u @@????e???????HHUZZ{++ , ,---HHUOOOOOrhs debugnodemapsdump-news1write a (new) persistent binary nodemap on stdouts dump-disksdump on-disk data on stdoutschecks-check that the data on disk data are correct.smetadatas-display the on disk meta data for the nodemapc |dr|}|j}tj|jdr|j}nt j|j}||dS|drW|}|j}t j |}|$|\}}||dddSdS|drS|}|j}t j |}| |\}}t j ||j|SdS|dr|}|j}t j |}||\}}|d|j z|d|j z|d t|jz|d |jz|d |jz|jd z|jz }|d |zdSdSdS)z!write and inspect on disk nodemapdump_newnodemap_data_all dump_diskNcheckr!suid: %s s tip-rev: %d s tip-node: %s sdata-length: %d sdata-unused: %d Y@sdata-unused: %2.3f%% )rsrZr=rUrarrKpersistent_datar\persisted_data check_datauidtip_revrtip_node data_length data_unused) r^r_rrrrnm_datar unused_percs rf debugnodemapr ( s_4 J"@   ^  BH&8 9 9 58,,..DD*2844D  k @   ^(,,  "LFD HHT!!!W        g@   ^(,,  "LFD%b"(D99 9   j  @   ^(,,  "LFD HHlfj0 1 1 1 HH&&.8 9 9 9 HH'3v+?+?? @ @ @ HH*f.@@ A A A HH*f.@@ A A A ,u4v7IIK HH/;> ? ? ? ? ? @ @  rhrflagss markers flagsrecord-parentss+record parent information for the precursorsdisplay markers relevant to REV exclusives0restrict display to markers only relevant to REVindexsdisplay index of the markerdeletes#delete markers specified by indicess[OBSOLETED [REPLACEMENT ...]]c  tj|}fd|dr g}|dD]f} |t |&#t $r4t jtd|ztdwxYw r!t j td 5tj j|}|td|zdddn #1swxYwYdS|+|d rt jd i}t!j|d p||d <t'fd |D}  } d } |d} | rt+j| } nd} |} d}|dro| vrt j d| }t'd|D}j| | | |d|| ||| nH#t $r;}t j tdt7j|zd}~wwxYw | n#| wxYw | dS#| wxYw|d rkt=j|d }fd|D}tAtCj"||d}|#dntCj"}|}d}|d r=|dr(tCj"}tI|fd}|%d |}tM|D]U\}}||s|'|dr|nd}tQj)|||V|*dS)zccreate arbitrary obsolete marker With no arguments, displays the list of obsolescence markers.c t|}t|jjkrt|S#t$rt jdwxYw)Ns>changeset references must be full hexadecimal node identifiers)rrU nodeconstantsnodelen ValueErrorr InputError)r}rr_s rf parsenodeidz"debugobsolete..parsenodeid sl AA1vv+333  H   "$  s 48Arsinvalid index value: %rsuse integers for indicesrs6cannot delete obsmarkers in the middle of transaction.s deleted %i obsolescence markers NrDs+cannot select revision when creating markersuserc3.K|]}|VdSrr)rsuccrs rfrz debugobsolete.. s-??Dkk$''??????rhrsdatesrecord_parentss2cannot used --record-parents on unknown changesetsc3>K|]}|VdSrrers rfrz debugobsolete.. s*#>#>AFFHH#>#>#>#>#>#>rhr)rSrr!r^sbad obsmarker input: %scDg|]}|Srrerfs rfrz!debugobsolete.. s%222T!W\\^^222rhr)rk exclusivec|jSr)_datars rfrlzdebugobsolete.. sqwrhrmcdS)NTr)rs rfrlzdebugobsolete.. strhrc |vSrr)r markersets rfrlzdebugobsolete.. s 1 >rh)ra)+r(rrrrrrrrcurrenttransactionrYrr*deleteobsmarkersobsstorer\r fromlocalrztuplerrDrrsrScreater0rFr^rrrirr# getmarkersr)rZr enumeraterrrr)r^r_ precursor successorsrindicesr6rr!succsrtrrprecrSrrrkr markerstoiter isrelevantrrrindr#rs ` @@rf debugobsoleter5g s:   % %D      xx )$$  A s1vv&&&&   &011A5677   " " $ $ +KLL YY[[ B B' w??A HHQ;< $.tG}/M NN????J????? IIKK$ !!"233B xx(( #-d33DDD"{9--)*?4??#4#444#k2#oo//5==??G##>#>g#>#>#>>>G $$N#%%       k011J4KC4P4PP    IIKKKKKAIIKKKK < /&tT&\::D2222T222E"l1CG LL..L / / / /(..G #^ 88F   2 2 2 2#.t44MG I1111J \\*D 1 1m,, 1 1DAq:a==  LLNNNxx))3!!tC  r1C 0 0 0 0 0 sb "A00>B.:AEE  E M(+C.KL8 L$6LLL8#M(8MM((M>s debugp1copiessrevision to debugs[-r REV]c tj|}tj||dd}|D]\}}|d||fz dS)z$dump copy information compared to p1rDNr %s -> %s )r(rr1r>rp1copiesr/r\r^r_rrIdstsrcs rf debugp1copiesr=    % %D  D$((6"2"2D A A ACLLNN((**--S #s+,,,,--rhs debugp2copiesc tj|}tj||dd}|D]\}}|d||fz dS)z$dump copy information compared to p2rDNr7r8)r(rr1r>rp2copiesr/r\r:s rf debugp2copiesrA r>rhsdebugpathcompletefsfullscomplete an entire pathsnormalsshow only normal filesr:sshow only added filesr;sshow only removed filess FILESPEC...c, fd}d}dr|dz }dr|dz }dr|dz } |sd g}tt}}|D]=}|||pd \} } || || >|||d  fd t |D|d d S)a)complete part or all of a tracked path This command supports shells that offer path name completion. It currently completes only files already known to the dirstate. Completion extends only to the next path segment unless --full is specified, in which case entire paths are used.cj}tjtjt j|}jtj z}|jkr| |sggfStj |r|dz }|t|d}tj dk}|r | tj d}t|}d}tt} }| j|j} } |D]\} } | |r~| j|vru|r | dtj } |r | | S| tj |}|dkr| | d|| | || fS)N/fullr)rRr_rr,rprrWrootr(osseprisdirrUreplacerZrr/r7find)r acceptablerRr(rootdirfixpathsspeclen fullpathsrdirsadddiraddfilerqrr}rr_s rfcompletez#debugpathcomplete..complete- s=w X_->-> E EFF)hn, 49  T__W%=%= r6M 7==    DLDCLLNN#>T)  6<<55Dd))L eeSUUt(EI^^%%  EAr||D!! bh*&<&<8 $77AGAJJJFF8>73366F1RaR5MMMMGAJJJd{rhrhnormalsnmrCrrDrrsnmarrc3DK|]}|VdSr)pathto)rrcwdr_s rfrz$debugpathcomplete..\ s1CC As++CCCCCCrhN)rWrZrr\rpr) r^r_specsrrTrLrrQr(rqrrXs ` ` @rfdebugpathcompleterZ sC&<J H~e  G}d  Id ++--C %%4Exj3G441 Q A LLHHUZZCCCCCVE]]CCC C CDDDHHUOOOOOrhsdebugpathcopiess#hg debugpathcopies REV1 REV2 [FILE]) inferrepoc0tj||}tj||}tj|||}tt j|||D]\} } |d| | fz dS)z!show copies between two revisionsr8N)r1r>r*rr pathcopiesr/r\) r^r_rbrcr&rctx1ctx2rr;r<s rfdebugpathcopiesr`` s  T4 ( (D  T4 ( (D dD$''A6,T4;;AACCDD--S #s+,,,,--rhs debugpeercddi}||5tj|i|} |du}|}|t d|z|t d|rt dnt dz|t d|rt dnt dz|n#|wxYw ddddS#1swxYwYdS) z+establish a connection to a peer repository)sdevelsdebug.peer-requestTNsurl: %s s local: %s rrs pushable: %s ) configoverriderr,rcanpushr\rr<r0)r^r overridesr,rrcs rf debugpeerreo s{ *4I  9 % %  wr2t$$ JJLL,EllnnG HHQ|__txxzz1 2 2 2 HHQ~&&u*J!F)))!E((K L L L HH#$$W(J& !E((K    JJLLLLDJJLLLLL                  s)EC'D.E.EEEEsdebugpickmergetools check for files in this revision changedeletes!emulate merging change and deletes [PATTERN]...c Ftj|}i}|dr;|d|d<|dtj|dz||d5t jd}|*|dtj|z|dd }|r*|d tj|ztj ||d }tj |||}|d } | |D]} || } |j s|d ntj5t#j||| | d| v| \} } dddn #1swxYwY|d| | fz ddddS#1swxYwYdS)afexamine which merge tool is chosen for specified file As described in :hg:`help merge-tools`, Mercurial examines configurations below in this order to decide which merge tool is chosen for specified file. 1. ``--tool`` option 2. ``HGMERGE`` environment variable 3. configurations in ``merge-patterns`` section 4. configuration of ``ui.merge`` 5. configurations in ``merge-tools`` section 6. ``hgmerge`` tool (for historical reason only) 7. default tool for fallback (``:merge`` or ``:prompt``) This command writes out examination result in the style below:: FILE = MERGETOOL By default, all files known in the first parent context of the working directory are examined. Use file patterns and/or -I/-X options to limit target files. -r/--rev is also useful to examine files in another context without actual updating to it. With --debug, this command shows warning messages while matching against ``merge-patterns`` and so on, too. It is recommended to use this option with explicit file patterns and/or -I/-X options, because this option increases amount of output per file according to configurations in hgrc. With -v/--verbose, this command shows configurations below at first (only if specified). - ``--tool`` option - ``HGMERGE`` environment variable - configuration of ``ui.merge`` If merge tool is chosen before matching against ``merge-patterns``, this command can't show any helpful information, even with --debug. In such case, information above is useful to know why a merge tool is chosen. stool)uis forcemergeswith --tool %r sdebugmergepatternssHGMERGENswith HGMERGE=%r rhsmergeswith ui.merge=%r rDrfT)rrs%s = %s )r(r notenoi18nrrbrenvironrconfigr1r>r*rr:silentr=r~r _picktoolisbinaryrr\)r^r_r&rrdhgmergeuimergerIr changedeleterfctxtooltoolpaths rfdebugpickmergetoolru sj   % %DI G}O,0M () )X-=d7m-L-LMNNN  9&; < <22"&&z22   MM.(2B72K2KL M M M))E8,,  O MM/83CG3L3LM N N Ndhhv&6&677 M#tT * *O, HHQKK 2 2Dt9D\A'+'>'@'@  "+!4MMOODJJLL( ""h                HH\T4L0 1 1 1 1 2222222222222222222s80D#HAG" H"G& &H)G& *HHHs debugpushkeysREPO NAMESPACE [KEY OLD NEW]c tj|i|} |r|\}}}|5} | d||||d} dddn #1swxYwY|t j| dz| |St| | D]C\} } | dtj| tj| fzD |dS#|wxYw)zaccess the pushkey key/value protocol With two args, list the keys in the given namespace. With five args, set a key to new if it currently is set to old. Reports success or failure. spushkey)s namespaceskeyrBsnewNrs%s %s )rr,commandexecutor callcommandresultrr(rr0rlistkeysr/r\rF escapestr) r^r  namespacekeyinfortargetr4oldnewrrdr r6s rf debugpushkeyr sWRX & &F  #MCc'')) QMM&/ # # # &((                IIh&q))E1 2 2 25   vy99??AABB  1!+A.. 0DQ0G0GHI    s5E .A." E .A22E 5A26/E :A8E Es debugpvecsA Bctj||}tj||}tj|}tj|}||krd}n||krd}n||krd}n||zrd}|t d|z|t d|z|t d|j|jfz|t dt|j|jz tj|j |j | ||fzdS) N=><|sa: %s sb: %s sdepth(a): %d depth(b): %d s.delta: %d hdist: %d distance: %d relation: %s ) r1r>r'ctxpvecr\r_depthabs_hamming_vecdistance) r^r_rercacbrpbrels rf debugpvecr sU  4 # #B  4 # #B b  B b  B Rxx b b bHHQz]]R    HHQz]]R    HHQ- . .")RY1G GHHHHH <==  BI% & & M"'27 + + KKOO    rhs&debugrebuilddirstate|debugrebuildstatesrevision to rebuild tosminimalsEonly rebuild files that are inconsistent with the working copy parentc  tj||}|5|j d}|dr_t |}t }||z }||z } fd| D} || z} | ||ddddS#1swxYwYdS)arebuild the dirstate as it would look like for the given revision If no revision is specified the first current parent will be used. The dirstate will be set to the files of the given revision. The actual working directory content or existing dirstate information such as adds or removes is not considered. ``minimal`` will only rebuild the dirstate status for files that claim to be tracked but are not in the parent manifest, or that exist in the parent manifest but are not in the dirstate. It will not change adds, removes, or modified files that are in the working copy parent. One use of this command is to make the next :hg:`status` invocation check the actual file content. NminimalcHh|]}|j|Sr) get_entryrC)rrqrRs rfrz'debugrebuilddirstate..J s/OOO83E3Ea3H3H3NO!OOOrh) r1r>rrRrrZrTrtrebuildr) r^r_r]rrI changedfiles manifestfiles dirstatefiles manifestonlydsonly dsnotaddedrRs @rfdebugrebuilddirstater sIB  D# & &C  C C= 88I   5  3 3 5 566MMMM(=8L"]2FOOOOVOOOJ'*4LS\\^^\BBB C C C C C C C C C C C C C C C C C CsB9C11C58C5sdebugrebuildfncaches only-datas*only look for wrong .d files (much faster)c tj|}tj|||ddS)zrebuild the fncache files only_dataN)r(rr*rebuildfncacherres rfdebugrebuildfncacherP s;   % %D "dDHH\$:$:;;;;;rhs debugrenames[-r REV] [FILE]...c Xtj|}tj||d}tj|||}||D]}||}|| }| |} |rB| td| |dt|dfz| td| zdS)zdump rename informationrDs%s renamed from %s:%s rrs%s not renamed N)r(rr1r>rr*rfilelogrenamedfilenoderWr\rr) r^r_r&rrIrrrrors rf debugrenamerb s   % %D  D$((6"2"2 3 3C c4&&Axx{{333x LLNN " "4==?? 3 3kk#  3 HHQ122c1Q4QqT5KK L L L L HHQ*++c1 2 2 2 233rhsdebugrequires|debugrequirementscdt|jD]}|d|zdS)z#print the current repo requirementsr%N)rr,r\)r^r_rds rfdebugrequirementsrw sAD% & & 1rh debugrevlogddumpsdump index datac EFtj|}tj|d||}|drt |}|dd}t}t|D]}| |} | dkr|} | |} | |} | |\} } | |}||z}|t| |z}|| |||z }n#t $rd}YnwxYw|d|| | |||||| || || || |||t || fzdS|j}|j}g}d}|t(jzr|d|t(jzrd }|d |sd g}d}d}d}d}d}d}t1jd }d}d}d}d}d}d} g}!g}"g}#gd }$gd }%gd }&t1jd}'gd }(i})i}*d}+t |}t|D]}| |\} } | |},|dkr|+| ||$| t4kr|dz }||}-|,t4kr|!d|"|||#|-|-dkr |dz }|dz }ni|dz }|dxxdz cc<|+|-|%|+|-|'dn4|!|!|,dz|"|,}.||}/|"|.|#|/|.z |-z|-dkr |dz }|dz }n||rI|+|-|&|dz }||}0||0xxdz cc<|+|-|'|0nZ|+|-|(|,|dz kr|dz }|,| kr|dz }n4|,| kr| dz } n(|,| kr|dz }n|,| kr|dz }n|,t4kr|dz }t=j|dr| ||d}1n!|j! ||d}1|1rtE|1dd}2nd}2|2|)vr d|)|2<d|*|2<|)|2xxdz cc<|*|2xx|-z cc<|$|%|&|(fD]}-|-dd|-d<||z |z |z }3||z | z }4|$d}5|$dxx|zcc<|%d}6|dkrd|%d<n|%dxx|zcc<|&d}7i}8|dkr|&dxx|zcc<|'D]/}0|'|0d|8|0<|'|0dxx||0zcc<0|(d}9|3dkr|(dxx|3zcc<|6|7z|9z}:tG|!|z };tI|!}|:r|5|:z }>dEdFEfd}?d}B|%d+|B|;zz|%d,|B|zz|dkr:|d|%d/tQ|$z|%d0tQ|%z|%d1tQ|&ztO|'D]8}0|0dkr |%d2|0ftQ|'|0zz9|%d3tQ|(z|3dkr9|d|@|3}B|@|3d4}C|%d5|B|A||3zz|dkro|%d6|C|A||zz|%d7|C|A| |zz|%d8|C|A|4|zz|rs|%d9|B|A||3zz|%d:|B|A||3zz|%d;|B|A||3zzdSdSdS)=z'show data and statistics about a revlogrrse# rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen rrs:%5d %5d %5d %5d %5d %10d %4d %4d %4d %7d %9d %11d %5d %8d FsinlineTs generaldeltas(none)cdSNrrrrhrfrlzdebugrevlog.. s1rhNrrc gdS)Nrrrrhrfrlzdebugrevlog.. s LLLrhcz|d ||dkr||d<||dkr||d<|dxx|z cc<dS)NrrrSr)r9rs rfaddsizezdebugrevlog..addsize sO Q4<4!A$;;AaD !A$;;AaD ! rhrs_getsegmentforrevsemptyNrSs%%%dd s%%%dd %s(%%5.2f%%%%) cBtt|zSrrUstr)r basedfmtstrs rfdfmtstrzdebugrevlog..dfmtstr] sSS]]**rhcLtt|d|zfzS)Nrr)rpadding basepcfmtstrs rfpcfmtstrzdebugrevlog..pcfmtstr` s#s3s88}}dWn===rhc<|r|dt|z|z fS|dfS)Ndr)r)rrs rfpcfmtzdebugrevlog..pcfmtc s/  3u-56 6%< rhs format : %d s flags : %s r rsrevisions : s merges : s normal : s empty : s text : s delta : s snapshot : s lvl-%-3d : s deltas : srevision size : c|dkrd|zS|tjtjvrdt ||fzSdt |zS)Nrs %s : s 0x%s (%s) : s 0x%s : )r(rstring ascii_lettersr) chunktypes rf fmtchunktypez!debugrevlog..fmtchunktype sX  #i/ / (*6+?@@ @ @'3y>>9*EE E&Y7 7rhschunks : schunks size : savg chain length : smax chain length : smax chain reach : scompression ratio : s4uncompressed data size (min/max/avg) : %d / %d / %d s4full revision size (min/max/avg) : %d / %d / %d s4inter-snapshot size (min/max/avg) : %d / %d / %d s5 level-%-3d (min/max/avg) : %d / %d / %d s4delta size (min/max/avg) : %d / %d / %d rsdeltas against prev : s where prev = p1 : s where prev = p2 : s other : sdeltas against p1 : sdeltas against p2 : sdeltas against other : r))r(rrrrrUr\rZr deltaparentrrrrawsizerrZeroDivisionErrorr_format_version _format_flagsr-FLAG_INLINE_DATArFLAG_GENERALDELTAr defaultdictrrr snapshotdepthr=rU_getsegmentforrevs_revlogrsumrrrprr()Gr^r_rrrdnumrevstsrr]dbasecbaseclenrrrsrCformatr6rgdelta nummergesnumempty numemptytext numemptydeltanumfullnumsemi numsnapdepthnumprevnump1nump2numother nump1prev nump2prev chainlengthsr chainspansdatasizefullsizesemisize snapsizedepth deltasizechunktypecountschunktypesizesrrr9baseaddrrevaddrdepthsegmentr numdeltasnumoprev totalrawsize fulltotal semitotal snaptotal deltatotalr avgchainlen maxchainlen maxchainspan compratiorrrrIfmt2rrrsG @@rf debugrevlogr~ sm   % %D4==A xx.a&& C   >>" " CMM#&&E{{KK$$E::c??D\\#&&FB3BbB Sc**++ +E IIcNNN  155::o $     HH"GGCLLEE#JJGGENNGGENNGGBKKGGBKKJJ    (q  F A E F6 ""  Y6 ##& _%%%  IHLMGG*9955LG E EHIILJJ||H||H||H+,@,@AAM ION!ffGW~~A*A*c""B c"" A:: GAIIcNNH - - - == NIxx}} G      " " "   aggcll + + +   d # # #qyyA ! 1 Q1$h'''mA.////    U 3a 7 8 8 8!%(HggcllG   h ' ' '   w1T9 : : :qyyA " c"" "h'''1 ,,U###q(###mE23333i(((C!G##qLG{{!Q "!Q b[[QJEEb[[QJEEg%%MH  A4 5 5 @**344Q7GGi223<>>>>>   NN#f,---NN#ejj&7&77888HHUOOO (9  C 79  DNN&7888NN&uuY/H/H)HHIIINNcEE'I*=w$G$GGGNN&7888NN&uuXw/G/G)GGHHHNN& lL=$@AA A BNN& m\M%ABB B CNNcEE'G*;W$E$EEE %%    '% /EE,u-w777 8    NN&uuY/H/H)HHIIINN& )99:::NNcEE)i*?$K$KKK %%    '% /EE)E*I666 7    NN&uuZ/K/K)KKLLL888HHUOOONN&7888O,,CC  i(())) uu_Y7AAABBBBNN& )99:::O,,DD  i(())) uu^I6 BBBCCCCHHUOOO '#k; iHH I ICNN*S;->>???NN*S;->>???NN*S<-??@@@NN*S9_<=== zz   DHoo    NN@ // NN@ //  &&   A::   Ex% e 4555 7    NN@     1}} hy!!x 1%%  &uuWi/H/H)H H    Q;; NN*TEE)W4M4M-MM    NN*TEE)W4M4M-MM    NN*TEE(G4L4L-LL      NN*S55 3J3J-JJ    NN*S55 3J3J-JJ    NN*S5593M3M-MM     1}"  s>E E&%E&debugrevlogindexformats revlog formatsFORMATs[-f FORMAT] -c|-m|FILEc tj|}tj|d||}|dd}|dvr$t jtd|z|jrt}nt}d}|D]-}t|| |}|dkr|j rA|dd|d |fzn|d d|d |fznd|d kr^|j r,|d d|zn+|d d|z|D][}| |} |dkr || } n#t$$r|j|jg} YnwxYw|j r|d||||||||| || d|| d fz|d||||| || d|| d fz4|d kr ||} |j r|d|||||||||||| d| d || f z|d|||||||| d| d || fz]dS)z#dump the contents of a revlog indexrrr)rrsunknown format %d s* rev offset length linkrev %s %s p2 snodeidr<s rev linkrev %s %s p2 rs? rev flag offset length size link p1 p2 %s s- rev flag size link p1 p2 %s s% 6d % 9d % 7d % 7d %s %s %s s% 6d % 7d %s %s %s s+% 6d %04x % 8d % 8d % 8d % 6d % 6d % 6d %s s!% 6d %04x % 8d % 6d % 6d % 6d %s N)r(rrrrrrYrr:rrrUrrrljustrjustrSrlrr\rrlinkrevrrr) r^r_rrrdrshortfnidlenrrr?prs rfdebugrevlogindexr  s=   % %D4!4eTBBA XXi # #F Vk!011F:;;; | E GGAFF1II&&''  {{ :  NN>??5))5;;u+=+=>?     NN,??5))5;;u+=+=>?     1 :  NN$//%(( )     NNA//%(()    <<vvayy Q;; 0YYt__ 0 0 0k4;/ 0z 5   !  11     + !  11     q[[aBz C    !  ! 11       9  !  ! 11     c<<sGG87G8s debugrevspecoptimizes/print parsed tree after optimizing (DEPRECATED)s show-revss(print list of result revisions (default)sshow-sets+print internal representation of result sets no-optimizeds"evaluate tree without optimizationsverify-optimizedsverify optimized resultsREVSPECc b tj|}dddfdfdfdtjfdtjfdtjfg}|d r |d d }|d r)|d r!tjtd d|D}t}t}j rQ|dsI| d| ddg|dr| d|dr)|dr!tjtd|ddgkr| |nN|dD]*}||vr$tjtd|z+| |di} d } tj|tj|} |D]s\}} | | x| |<} ||vs ||vrV| | krP|ds|dkrd|ztj| d| } t|d rtj| d|} tj| d|}|ds|dYj rRdt+j| ddt+j|dt/| } t/|}| |krdSddddt1jd | |}|D]\}}}}}|d vr'| ||D]}d!|zd"|d#vr'|||D]}d$|zd%|d&kr%| ||D]}d'|zd(Stj| }||}|ds|d0j r)d)t+j|d|d*sd S|D]}d+|zd S),aparse and apply a revision specification Use -p/--show-stage option to print the parsed tree at the given stages. Use -p all to print tree at every stage. Use --no-show-revs option with -s or -p to print only the set representation or the parsed tree respectively. Use --verify-optimized to compare the optimized result with the unoptimized one. Returns 1 if the optimized result differs. s revsetaliasrc|Srr)rs rfrlzdebugrevspec..srhsexpandedc:tj|jSr)r0 expandaliasesrV)raliasesr^s rfrlzdebugrevspec..s1$IIrhs concatenatedrrs no_optimizedNrsverify_optimizeds1cannot use --verify-optimized with --no-optimizedch|]\}}|Srrrs rfrzdebugrevspec..rrhrr s'cannot use --optimize with --show-stager"rrXrrsshow_sets* analyzed set: s* optimized set: rs --- analyzed s diff.file_arns+++ optimized s diff.file_b)deleterJs-%d s diff.deleted)insertrJs+%d s diff.insertedequals %d rs* set: s show_revss%d )r(rrvr0 foldconcatrrrrYrrZrrrrr/lookupfnr\r makematcherrrFrrdifflibSequenceMatcher get_opcodes)r^r_rrrrr showchangedr treebystage printedtreerrqarevsbrevssmraloahiblobhir2funcrrs` @rf debugrevspecr(UsxZ   % %Dnn^,,G %%&  I I I I I  */0 j() z*+ F O   T/%: k B C C   (''''JJ%%K z)$}-)y!!!K9:::   ) NN< ( ( ( MItK0Ik!FGGHHH Mvh&&*%%%%m$ D DA ""k!$=">">"BCCC#$}-...KK  D)>)> ? ? ?D1 !$' A ??qK//DK4G4GM" )a9nna((( HHZ,T22E : : :K  <";{#;<>1 (??? )@@@  $T5% 8 8')~~'7'7 + + #Cc3+++s3wBBAHHX\HAAAA+++s3wCCAHHX\1AHBBBBg~~s3w++AHHX\****q  d # #D 4::D KHT+.62:6 {J$9$$?$?GGG    1rh debugservesshstdios*run an SSH server bound to process handleslogiofds$file descriptor to log server I/O to logiofilesfile to log server I/O toc tj|}|ds!tjt dd}|dr)|dr!tjt d|dr t jt|ddd}nu#t$rI}|j tj krt jt|dd d}Yd}~n'd}~wwxYw|drt|dd d}tj ||| }|dS) zrun a server with advanced settings This command is similar to :hg:`serve`. It exists partially as a workaround to the fact that ``hg serve --stdio`` must have specific arguments for security reasons. r*s&only --sshstdio is currently supportedNr+r,s)cannot use both --logiofd and --logiofileabrwbsab)logfh)r(rrrYrr_fdopenrrerrnoESPIPEr r@ sshserver serve_forever)r^r_rr0rr}s rf debugserver6sU*   % %D  Hk!EFFGGG E JKD.Kk!HIIJJJ J 3  >Ic$z"233T1==EE > > >w%,&&Ic$z"233T1==EEEEEE  > l 3T,'22!"d%888AOOs:)B$$ C7.?C22C7sdebugsetparentss REV1 [REV2]c*tj||}tj||d}|5|||ddddS#1swxYwYdS)amanually set the parents of the current working directory (DANGEROUS) This command is not what you are looking for and should not be used. Using this command will most certainly results in slight corruption of the file level histories withing your repository. DO NOT USE THIS COMMAND. The command update the p1 and p2 field in the dirstate, and not touching anything else. This useful for writing repository conversion tools, but should be used with extreme care. For example, neither the working directory nor the dirstate is updated, so file status may be incorrect after running this command. Only used if you are one of the few people that deeply unstand both conversion tools and file level histories. If you are reading this help, you are not one of this people (most of them sailed west from Mithlond anyway. So one last time DO NOT USE THIS COMMAND. Returns 0 on success. snullN)r1r>rr setparents)r^r_rbrcnode1node2s rfdebugsetparentsr; s,  dD ) ) . . 0 0E  dD' 2 2 7 7 9 9E && u%%%&&&&&&&&&&&&&&&&&&s$BB B s debugsidedatac tj|}|ds*|ds|dr)|"tjdt dd|}}n$|"tjdt dt j|d||}t|d|} | | |}n2#t$r%tj t d|zwxYw|rt|j}|j|d t#|z|D]_\}}|d |t#|fz|jr*|d t'j|z^dSdS) zcdump the side data for a cl/manifest/file revision Use --verbose to dump the sidedata content.rrrNrrrrs%d sidedata entries s entry-%04o size %d r+)r(rrrrrrrr rMrXrrYrr/r)rrUrrFra) r^r_rr]rrdrMr4rs rf debugsidedatar=)s   % %D xx H+!6!6H$((6:J:JH ?$\15I3J3JKK K5s  q1E/F/FGGGD,t<>DEEEFE(())  /#h--?@@@" E EJC NN3sCJJ6GG H H Hz Ey:+there is no Mercurial repository here, and no server specifiedrr>i)shttpsssshsmalformed port number in URLs,only https and ssh connections are supportedr)win32N) ssl_version cert_reqsca_certsTs&checking the certificate chain for %s F)builds-certificate chain is incomplete, updating... sfailed. sdone. s$full certificate chain is available )r( iswindowsrrYrrGrvr<schemerrportrrrAssl wrap_socketr PROTOCOL_TLS CERT_NONEconnect getpeercertrcheckcertificatechainr0) r^r_sourcerrr< defaultportaddrrAr}certrTs rfdebugsslrTEs   k G H H     +(  3T2vFH +f  C "--K z[   BHc#("Ek#*.EFFGDD B B B+a ?@@AA A Bk!KLLMMM  $-    A $}}T"" !>??#(JKKK..t5.AA C IIaHII J J J..t44 ) !L//**** !J--(((( IIa@AA B B B   s(B;;,C'D I11Jdebugbackupbundle)rhrecoverrhs7brings the specified changeset back into the repositorys%hg debugbackupbundle [--recover HASH]c  tttjjt jjddz}|ddtj dd<dd <tj fd } d }|r=tj|r'|t#d |zdSnM|r't#d }||dn$|t#ddS|D]}tj|t)j} t-jd||  d\} } t1j| ni#t4j$rW} t#d| z}t#dt9| jz} ||| Yd} ~ d} ~ wwxYwt1j|  d\} }| rfd| D} |5 tAj!|| dd \}}n!#t4j$rYddd~wxYw dddn #1swxYwY |s ||r5"5#d5}tj|r|t#d|zt1j$|| }tKj&||| }tO|tPj)rtQj*||dd| zn|+dd| z dddddd|dS dddn #1swxYwYdddn #1swxYwYnt)j,t[j.dt[j/tj0| }|d|1dz|j2r.|d d1d!| fznd"d#<tj3|d$}||||4|#|wxYwdS)%alists the changesets available in backup bundles Without any arguments, this command prints a list of the changesets in each backup bundle. --recover takes a changeset hash and unbundles the first bundle that contains that hash, which puts that changeset back in your repository. --verbose will print the entire commit message and the bundle path for that backup. s strip-backups/*.hgc@tj|Sr)r_rgetmtimer s rfrlz#debugbackupbundle..srw//22rhT)r4reverserhsbundleNsforcec\dr|d}|D]|} |krdSfd|j|D}drt |dkr\|dz }|||}dS)Ns newest_firstrc*g|]}|jk dS)T)r)rrr_s rfrz6debugbackupbundle..display..s,A.displays 88O $ $  NN    % %A Ue^^#o55a88Gxx %% #g,,!*;*; QJE NN58 $ $ $ $ % %rhrVs%s already exists in the repo sgRecover changesets using: hg debugbackupbundle --recover Available backup changesets:sstatus.removedrnsno backup changesets found rUr)default_branchess" warning: unable to open bundle %ss (missing parent rev %s) rrDc:g|]}|Srr)rr]rs rfrz%debugbackupbundle..s%666#ELL%%666rhsunbundlesUnbundling %s sbundle:)rPr<z%a %H:%M, %Y-%m-%ds %s 2r s8{label('status.modified', node|short)} {desc|firstline} rF)5rfilterr_risfileglobr>rpr)r(rrgetlimitrr1 isrevsymbolrVrrrelpathrrWrGrvrr,rr]rrrzrlr getremotechangesrrrtrrurr r applybundlervr,rmr*r+rYrrchangesetdisplayerr0)r^r_r&rbackupsrb recovernoderbackuprPrexrrcheckoutr^ cleanupfnr0rqrx backupdater_rars ` ` @@rfdebugbackupbundlerws2 GNDIdhmmO&D&Dx&OPP  G  LL22DLAAA   % %DDODN   % %E % % % % % % %((:&&K   t[ 1 1  GGA899KG H H H F   @   #. //// !344555HH):):;;"7   !XXi00     GD$//EE    :;;fDC344uRW~~ED GGCdG # # # HHHH   ) %488F#3#3  h  76666666D YY[[   +5+FeT4 ?DN,,(vyy$              )               (  L IKKKKK# "YY[[$"2"2;"?"?2*5+>> !$6"7"7;"GHHHKF33&1"a@@%c7+=>> N#/ $ # "'2$.$7  IIdKf9LMMMH IKKKKKKG"&0M,rw'7'7'?'?@@  )z'7'7';';<===:UIIi:+;+;B+?+?*HHIIIIU#'9tU vy111!!! IKKKKIIKKKKQHHs6G  H3A H..H3K! )J32K!3KK!KK!!K% (K% -T3<T3P()B8P! P(, T3 P(P P(P P( T3(P, ,T3/P, 0C7T33 T?sdebugsubsrevision to checks[-r REV] [REV]c2tj||d}t|jD]Y\}}|d|z|d|dz|d|dzZdS)Nspath %s s source %s rs revision %s r)r1r>rrr/r)r^r_r]rIr r6s rfdebugsubrys  D#t , ,Cs|))++,,111 |a'((( (1Q4/000 (1Q4/000011rhs debugshellcDddl}||d}||dS)zrun an interactive Python interpreter The local namespace is provided with a reference to the ui and the repo instance (if available). rN)r^r_)r)codeinteract)r^r_r{imported_objectss rf debugshellr~)s?KKK  MM(M)))))rhsdebugsuccessorssetssclosests#return closest successors sets onlys[REV]c.i}t}t}tj||D]}||}|d||zt j|||d|D]} | ry|d||| d| ddD]5} |d||| 6|d dS) a}show set of successors for revision A successors set of changeset A is a consistent group of revisions that succeed A. It contains non-obsolete changesets only unless closests successors set is set. In most cases a changeset A has a single successors set containing a single successor (changeset A replaced by A'). A changeset that is made obsolete with no successors are called "pruned". Such changesets have no successors sets at all. A changeset that has been "split" will have a successors set containing more than one successor. A changeset that has been rewritten in multiple different ways is called "divergent". Such changesets have multiple successor sets (each of which may also be split, i.e. have multiple successors). Results are displayed as follows:: Here rev2 has two possible (i.e. divergent) successors sets. The first holds one element, whereas the second holds three (i.e. the changeset has been split). r%closest)rrs rrNrr)rrrrir\r#successorssetsr) r^r_rrrctx2strnode2strr]rIsuccssetrs rfdebugsuccessorssetsr:s-L EGH"4..  3i 773<<'(((. #((**d9oU    H -!!!(1+..///$QRRL--DHHTNNNHHXXd^^,,,, HHUOOOO   rhsdebugtagscachectj|}|d}|D]}||}||d}|r*t |}||s|dz }n|d}nd}|d|t ||fzdS) z/display the contents of .hg/cache/hgtagsfnodes1s.hgtagsF)computemissings (unknown node)NrKsinvalids %d %s %s ) tagsmodhgtagsfnodescachersrrgetfnoderhasnoder\)r^r_rflogrdrtagsnodetagsnodedisplays rfdebugtagscacherrs  %doo&7&7 8 8E 99Z D  B BAw||~~>>$u>==  )!(mmO<<)) 6#55  (OO(O !SYY!@@AAAA B Brhs debugtemplatesapply template on changesetsDsdefinesdefine template keywords KEY=VALUEs&[-r REV]... [-D KEY=VALUE]... TEMPLATEc Xd}|dr>|!tjtdtj||d}i}|dD]l} d|ddD\}}|r|dkrt |||<;#t $r%tjtd |zwxYw|jr| d } tj |} | tj | d tj| | } | | kr)|d tj | d |t!j||} t!j||| } |jr| \}}|ddt-|z|ddt-|z|| |dStj|||}|jr|j\}}|ddt-|z|ddt-|z|D](}|j||fit7j|)|dS)zparse and apply a template If -r/--rev is given, the template is processed as a log template and applied to the given changesets. Otherwise, it is processed as a generic template. Use --verbose to print the parsed tree. Nr]rTdefinec3>K|]}|VdSrrrSs rfrz debugtemplate..s*88!AGGII888888rhrrrhs malformed keyword definition: %ss templatealiasrs * expanded: ) resourcess* keywords: %s r s* functions: %s )r RepoErrorrrrirrrYrrvr9rrrrrirtemplateresources maketemplatersymbolsuseddefaultrrprr\ renderdefaultrr]r(rr0)r^r_tmplrrpropsrr r6rrnewtreetresrkwdsfuncsr_rds rf debugtemplaters)$ D E{6 </JKK "4e55 E (^JJ J88qwwtQ'7'7888DAq !U   E!HH J J J+a CDDqHII I J z..!122t$$  &t,,e444)$88 d?? MM )"8"A"A5    |*2t44  #B = = = : M..00KD% NN.F4LL1I1II J J J NN/%**VE]]2K2KK L L L ''(((((,Rt<< : M#+88::KD% NN.F4LL1I1II J J J NN/%**VE]]2K2KK L L L A AA IN47 @ @h&8&?&? @ @ @ @s 7B/B=sdebuguigetpasssprompts prompt textsTEXTs [-p TEXT]ch||}|d}|d|zdS)zshow prompt to type passwordNs response: %s )getpassrr^rrds rfdebuguigetpassrs= 6Ay !NN$q()))))rhs debuguipromptc`||}|d|zdS)zshow plain promptrN)rrrs rf debuguipromptrs3 &ANN$q()))))rhsdebugupdatecachesc|5|5|tjdddn #1swxYwYddddS#1swxYwYdS)z'warm all known caches in the repository)cachesN)rr updatecachesrA CACHES_ALL)r^r_r&rs rfdebugupdatecachesrs 88tyy{{88 !6777888888888888888888888888888888888s4A/!A A/A A/A A//A36A3sdebugupgradereposextra optimization to performsrunsperforms an upgradesbackups&keep the old repository content aroundrs select the changelog for upgradersselect the manifest for upgradesfilelogssselect all filelogs for upgradec Jtj||f|t||d|S)a0upgrade a repository to use different features If no arguments are specified, the repository is evaluated for upgrade and a list of problems and potential optimizations is printed. With ``--run``, a repository upgrade is performed. Behavior of the upgrade can be influenced via additional arguments. More details will be provided by the command output when run without ``--run``. During the upgrade, the repository will be locked and no writes will be allowed. At the end of the upgrade, the repository may not be readable while new repository data is swapped in. This window will be as long as it takes to rename some directories inside the ``.hg`` directory. On most machines, this should complete almost instantaneously and the chances of a consumer being unable to access the repository should be low. By default, all revlogs will be upgraded. You can restrict this using flags such as `--manifest`: * `--manifest`: only optimize the manifest * `--no-manifest`: optimize all revlog but the manifest * `--changelog`: optimize the changelog only * `--no-changelog --no-manifest`: optimize filelogs only * `--filelogs`: optimize the filelogs only * `--no-changelog --no-manifest --no-filelogs`: skip all revlog optimizations )runrrr)r; upgradereporZ)r^r_rrrrrs rfdebugupgraderepors>\   D CMM&  DH  rhs debugwalks[OPTION]... [FILE]...ctj|}tjd||}|jr)|dt j|dtd |}|sdSd}| ddrtj dkrd}d td |Dtfd |Dfz}|D]g}||| |||rd pd fz} |d| zhdS)z&show how files match on given patternsNrrc|Srrrs rfrlzdebugwalk..+s2rhrhsslashrEc*tj|Sr)r=r,rs rfrlzdebugwalk..-st}R((rhsf %%-%ds %%-%ds %%sc,g|]}t|Srr{)rrs rfrzdebugwalk../s ' ' '#SXX ' ' 'rhcTg|]$}t|%Sr)rUrW)rrr_s rfrzdebugwalk..0s- 4 4 4sSS!! " " 4 4 4rhsexactrhr%)r(rr1r*rrrFrrr configboolrHrrWexactr\rstrip) r^r_r&rrr/rqrIrrs ` rf debugwalkrs}   % %D d4j$--A zI  (=a(@(@%HHH d## $ $E  A }}UH%%)(.D*@*@ ( ( # ' ' ' ' '(( 4 4 4 4e 4 4 455' C**  Adkk#   GGCLL %X ,   4;;==()))) **rhsdebugwhyunstablec 6tj|tj||D]o}d}|dr(dd|dDdz}|d|d||d|dfzpd S) z$explain instabilities of a changesetrhsdivergentnodesrc3lK|]/}d||fzV0dS)s%s (%s)N)rphasestr)rrIs rfrz#debugwhyunstable..BsP#''))S\\^^!<<rhs %s: %s%s %s s instabilitysreasonsnodeN)r# whyunstabler1r>rrpr\)r^r_r]rdnodess rfdebugwhyunstabler;s$T7+gO P       rhs debugwireargs))rhthreerhr)rhfourrhr)rhfiverhrsREPO [OPTIONS]... [ONE [TWO]]ctj|}tj|||} tjD] }||d= i}|D] \}}|r|||< tj|}|j|i|} |j|i|} | d| z| | kr| d| z| dS#| wxYw)Nrr%) r(rrr,r remoteoptsr/r debugwireargsr\rVr0) r^r valsrr_optr`r r6res1res2s rfrrNs   % %D 72tX & &D%  CSV JJLL  DAq Q!$''!t!40400!t!40400 4   4<< GGGdN # # #  s BC!!C7c#Kd}g}d}|D]}|}|s|dr/|ds|r||fV|}g}d}S|s!tjt dt |t |z }||kr%|r#|dxx|z cc<|||}|r||fVdSdS)Nr#rsindented line outside of blockr)rrrrYrrUlstripr)r activeaction blocklines lastindentrrs rf_parsewirelangblocksrnsNLJJ  {{}}   ??4   t$$  /"J....LJJ  D+a ABBCC CTS/// J  :  rNNNdkkmm +NNNN   d # # #JJ'J&&&&&&''rhsdebugwireprotolocalsshs!start an SSH server for this repopeers(construct a specific version of the peer noreadstderrs%do not read from stderr of the remotesnologhandshakes,do not log I/O related to the peer handshakec *tj|}|dr#|s!tjt d|dr:|ddvr0tjt dt d|r)|dr!tjt d|r"|t d tt|j }d }d }d }d }d } |drtj d |j d d gz} tjtjtj| tjtjtjd}|j}|j}|j}|js |ddkrWt-j||jdd}t-j||jdd}t-j||jdd}d} |d } |ddkr@|t dt1j|| ||||d | } n|ddkr&|t dd } n|t dt1j|| ||||| } nS|r/t7j|}|jdkr!tjt d|\} }dd i}|jr||d!dd"d#d$|j r d|d%d&<|ddkrd"|d'<tCj"||fi|} |ddkr%|t dd } nk|dr*tjt d(|dztGj||| )} n!tjt d*d }|D ]q\}}|d+vr|s!tjt d,d-$d.|D}tKj&|}|||d/kr|'|d0kr8|s!tjt d1|'|(d2ru| s!tjt d3|)d4d5d5}i} |D]}|*)d4d5}tW|d5kr |d}d-}n|\}}|(d6rtKj,|d7d }ntKj&|}|| |<||-|| f|.t d8|zd9| vrt_| d9d:5}| d9=| j0||fitj1| \}}|.t d;tKj2|z|.t d<tKj2|zd d d n #1swxYwY| 35}|4|| 5}d d d n #1swxYwY|.t d=tKj6|dd>?zY|d@kr'|!tjt dAg}|dBkr|.t dCtW|z| Jto| 8|D]>\}}|.t dD|tKj2|fz?d }'|(dEr| s!tjt dF|)d4d>} tW| dGkr!tjt dH| d5d \*}!i}"d }#g}$|D]_}|*}tsj:dI|}%|%rTtj;|%<d5}tj;|%<d>}||"|<|(dJrQt_|)d4d5dK5}|=}#d d d n #1swxYwY|(dLr@t}j?|tWdLd }&|$-|&=tjt dM|z||!z} |$rd-$dN|$D}#tBj@Atj;| |#|"}'*fdO|'_B | /|'}|=}#n<#t,jCjD$r%}t|dPdQYd }~d }~wwxYw|jFGdR}(|(dSkrL|t dTtKj6tjI|#dd>?zX|dUkr| J| Jx|dVkrc|r|s!tjt dW|J|=|=|dXkr9|s!tjt dY|K |dZkr9|s!tjt d[|K_|(d\rct|)d4d5d5})|s!tjt d]|=|)|(d^rct|)d4d5d5})|s!tjt d_|=|) Otjt d`|z|!tjt da| r| J|r|Md Sd S)basend wire protocol commands to a server This command can be used to issue wire protocol commands to remote peers and to debug the raw data being exchanged. ``--localssh`` will start an SSH server against the current repository and connect to that. By default, the connection will perform a handshake and establish an appropriate peer instance. ``--peer`` can be used to bypass the handshake protocol and construct a peer instance using the specified class type. Valid values are ``raw``, ``ssh1``. ``raw`` instances only allow sending raw data payloads and don't support higher-level command actions. ``--noreadstderr`` can be used to disable automatic reading from stderr of the peer (for SSH connections only). Disabling automatic reading of stderr is useful for making output more deterministic. Commands are issued via a mini language which is specified via stdin. The language consists of individual actions to perform. An action is defined by a block. A block is defined as a line with no leading space followed by 0 or more lines with leading space. Blocks are effectively a high-level command with additional metadata. Lines beginning with ``#`` are ignored. The following sections denote available actions. raw --- Send raw data to the server. The block payload contains the raw data to send as one atomic send operation. The data may not actually be delivered in a single system call: it depends on the abilities of the transport being used. Each line in the block is de-indented and concatenated. Then, that value is evaluated as a Python b'' literal. This allows the use of backslash escaping, etc. raw+ ---- Behaves like ``raw`` except flushes output afterwards. command ----------- Send a request to run a named command, whose name follows the ``command`` string. Arguments to the command are defined as lines in this block. The format of each line is `` ``. e.g.:: command listkeys namespace bookmarks If the value begins with ``eval:``, it will be interpreted as a Python literal expression. Otherwise values are interpreted as Python b'' literals. This allows sending complex types and encoding special byte sequences via backslash escaping. The following arguments have special meaning: ``PUSHFILE`` When defined, the *push* mechanism of the peer will be used instead of the static request-response mechanism and the content of the file specified in the value of this argument will be sent as the command payload. This can be used to submit a local bundle file to the remote. batchbegin ---------- Instruct the peer to begin a batched send. All ``command`` blocks are queued for execution until the next ``batchsubmit`` block. batchsubmit ----------- Submit previously queued ``command`` blocks as a batch request. This action MUST be paired with a ``batchbegin`` action. httprequest --------------------------- (HTTP peer only) Send an HTTP request to the peer. The HTTP request line follows the ``httprequest`` action. e.g. ``GET /foo``. Arguments of the form ``: `` are interpreted as HTTP request headers to add to the request. e.g. ``Accept: foo``. The following arguments are special: ``BODYFILE`` The content of the file defined as the value to this argument will be transferred verbatim as the HTTP request body. ``frame `` Send a unified protocol frame as part of the request body. All frames will be collected and sent as the body to the HTTP request. close ----- Close the connection to the server. flush ----- Flush data written to the server. readavailable ------------- Close the write end of the connection and read all available data from the server. If the connection to the server encompasses multiple pipes, we poll both pipes and read available data. readline -------- Read a line of output from the server. If there are multiple output pipes, reads only the main pipe. ereadline --------- Like ``readline``, but read from the stderr pipe, if available. read -------- ``read()`` N bytes from the server's main output pipe. eread --------- ``read()`` N bytes from the server's stderr pipe, if available. Specifying Unified Frame-Based Protocol Frames ---------------------------------------------- It is possible to emit a *Unified Frame-Based Protocol* by using special syntax. A frame is composed as a type, flags, and payload. These can be parsed from a string of the form: ``request-id`` and ``stream-id`` are integers defining the request and stream identifiers. ``type`` can be an integer value for the frame type or the string name of the type. The strings are defined in ``wireprotoframing.py``. e.g. ``command-name``. ``stream-flags`` and ``flags`` are a ``|`` delimited list of flag components. Each component (and there can be just one) can be an integer or a flag name for stream flags or frame flags, respectively. Values are resolved to integers and then bitwise OR'd together. ``payload`` represents the raw frame payload. If it begins with ``cbor:``, the following string is evaluated as Python code and the resulting object is fed into a CBOR encoder. Otherwise it is interpreted as a Python byte string literal. rs --localssh requires a repositoryr)rawssh1sinvalid value for --peers!valid values are "raw" and "ssh1"rs/cannot specify --localssh with an explicit paths (waiting for commands on stdin) Ns-Rr)s --sshstdior)stdinstdoutstderrbufsizeriT)logdatar|rsssh://localserverrrs.creating ssh peer for wire protocol version 1 )autoreadstderrsusing raw connection to peer s)creating ssh peer from handshake results shttps*only http:// paths are currently supported useragentsMercurial debugwireprotorF)r logdataapis) loggingfh loggingname loggingoptsrr sendaccepts'--peer %s not supported with HTTP peers)openers$unsupported connection configuration)rraw+s!cannot call raw/raw+ on this peerrhc3>K|]}|VdSr)rrs rfrz!debugwireproto..s*661AHHJJ666666rhrsflushscannot call flush on this peerscommands6cannot send commands unless peer instance is availablerrseval:rssending %s command sPUSHFILErbs result: %s sremote output: %s rrS)bprefixrs batchbeginsnested batchbegin not alloweds batchsubmits#sending batch with %d sub-commands sresponse #%d: %s s httprequest s+cannot use httprequest without an HTTP peerrPsDinvalid httprequest: expected format is "httprequest s^([a-zA-Z0-9_-]+): (.*)$s BODYFILE srbsframe s#unknown argument to httprequest: %sc34K|]}t|VdSr)rrs rfrz!debugwireproto..s(99Qa999999rhc,tjSr)r(r\)rsrfrlz debugwireproto..sX_V%<%<rhrcdSrrrrhrfrlz debugwireproto..s4rhz Content-Typezapplication/mercurial-cbors cbor> %s scloses readavailables(readavailable not available on this peersreadlines#readline not available on this peers ereadlines$ereadline not available on this peersread sread not available on this peerseread s eread not available on this peersunknown action: %ssunclosed "batchbegin" request)Nr(rrrYrrr\rrrrEhgcmdrG subprocessPopenrapply tonativestrPIPErrrrr=makeloggingfileobjectr4 sshv1peermakepeerrGr<rGauthinforr:rrrrprF unescapestrflushrrrrUevalpythonliteralrrr _callpushrr{rwrxryrar+ _submitbatchrer*strurlgrouprr?makeframefromhumanstringurlreqrequest get_methodurlerrurlerrorr headersrrB decodeallr0readlinerkill)+r^r_rrblocksprocrrrrr`r<rr,ur openerargsbatchedcommandsrLlinesrcommandrfieldsr4rrresrrrchunkrhttppathrbodyframesrframereqctr`rs+ @rfdebugwireprotorsV   % %D KBBk!?@@AAA G} g/k ) * *788     Q[!Qk!NOOPPP ~~: 788999 &rv.. / /F D E F F F KsF~  I   #    OH0$ 7 7/??      : g&00.DJdE/DKtF/DKtF #!/22 =G # # HHQIJJ K K K$-   DD']f $ $ HHQ899 : : :DD HHQDEE F F F#-DD 1F K   8w  +a MNNOO O X 4 :    !##'#'',$$    < <7;J} %m 4 =F " "',J| $r8::z:: =F " " HHQ899 : : :DD '] >+<==W M $Rf===DDk!CDDEEEO BABA  & & & Kk!$H"I"IJJJ886666666D)$//D KK      x   Hk!$E"F"FGGG KKMMMM   z * *r A k(ll4++A.GD " ",,T155v;;!## )CEE!'JC##H--:&8qrrCCEE&2599E!S *&&777 IIa/007: ; ; ;d""${+T22b[)"0$.##'/'9$'?'?##KCIIa00:3G3L3LLMMMII011J4H4P4PP ))++@q--66==??C@@@@@@@@@@@@@@@ '(( 'T!DDDE } $ $*k!$D"E"EFFF OO ~ % % II9::o&&'   ###%d&7&7&H&HII  5 +,,:3G3N3N/OO#OO    / /h A kDEEll4++G7||q  k8 'qrr{ FHGDF  {{}}H8$??"/!''!**55C$OAGGAJJ77E#(GCL??<00 djjq11599)R!wwyy)))))))))))))))__Y// ,ES^^--.EMM%((((+@AADH/C :xx99&99999-''(<(>>    sOB[%%[) ,[) )\;;\? \? #gg g -)kl+l  l)NFFFFrrr)NN)r)r)r)rh)FNT)r&r[rr|rr2rirr_rbrtrrrIrrrrrmi18nrrrrrrr(r r rr r r rrrrrrrrrrrrrrrrrlockmodrr rr!r"r#r$r%r&r'r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rr9r:r;r<rr=r>rVr?r@ interfacesrAutilsrBrCrDrErFrGrHrrIr8rJrrKrLrMrtablerr_tablergrrryrrrr rr!r)r7rPr^rfrdrcrrdebugrevlogoptsrr formatteroptsrrr;r@rrrrrr dryrunoptsrrrr$r5r<r@rDrYrrrr templateoptsrrr  commitopts2r5r=rArZwalkoptsr`re mergetooloptsrurrrrrrrr r(r6r;r=rTlogoptsrwryr~rrrrrrrrrrrrrrhrfr(s       7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777p#""""" /  U] !""" ) E " "  2qq!566TJJJ..KJ.(  !2&& ; ;'& ;   'W5565     A2 3 3      A3 4 4  {D!!$?"@"@A    A5 6 6  *A/8  ]9]9]932]9@&=&=&=&=R0IIII)))55550  vtQQ2334 lB"B C CD gtQQDEEF AgJJ     4 4 4   4  r11W::d;;;<;(     $&$&  $&N  R%% " "&% "  8T11:;;<= &&  &333$     ("g66QQ76Q,  waa 5667 {D!!$A"B"BC gtQQ3445 y$"@ A AB  A$%%   999  9x w.2C0D0DEE F F FFE F   Kqq!=>>?@A   1 1 1 1  g33Am  i i i  i X  g33A  2=2=2=  2=j     A< = =  haa :;;< k4#9!:!:;    A; < <      AJ K K  ,An14<H<H54<H~ &AcFF 77  7  fdAA899:    A@ A A  fbCDN  !./012A7:{ { { ;:{ |   y#qqzz* "  W2BTJJJ; ; KJ; |     A4 5 5 AfII      AD E E      A9 : :      A5 6 6 AgJJ  )8A455=@>>A@>B     AB C C AgJJ      A< = = AgJJ      AD E E  ,-4--54-` g3344D D 54D N QQy\\$777<<<87<.  wAA01111U88< y"aa 455qqxx@    A/ 0 0 AgJJ   A !!  << ? ?      A> ? ?  0$@$@10$@N  h11_--.    A< = =  vr11?@@A    AA B B  hqq!?@@A iQQEFFG!$%&'(A&''-0|||10|~  FC/00!!F))<=AkNN --  -  FC/00!!F))<=AkNN --  -  waa :;;< y$"; < <= xqq!9::; z4#=!>!>?  An  99  9x  *  --  - r11W::d333430  vsAAABBAAfIIN otQQ'K%L%LM    Ao   H2H2  H2V "aa ?@@NNN!!ON!H r11V99%%&%6 - vsAA788!!F))D    A+     AkNN CC! CB     A; < <    <<  <   FC/00!!F))<=A 3 3  3   +R5565   guaa8J6K6KLMMAm  [[[  [|    iAA.//9>?@A   iiiiX     A@ A A      A9 : :      A< = =      A5 6 6 AgJJ   ouaa(M&N&NO !5!!,F*G*GH7:?  BaaC  BaH     A; < <  j#qq!HIIJ lC#?!@!@A   !!  !H  R>!2!233&&&43&8  72AA6G4H4HIIEEEJIE6 b+D999EEE:9EP  oA.//  ~~  ~B  FC/00!!F))<=A 111  1 T*** * *+* *   :uaa FGGHIAhKK 00  0f  BBB B&  vr11<==qqyyI y"aa :;;QQ|__MA/00555p  y#qq00!!G**=AlOO  ****  y#qq00!!G**=AlOO  ****   r""88#"8      A. / / AgJJ   feQQ5667 iqq!JKKL lD!!$G"H"HI k4#E!F!FG k4#E!F!FG "#"D '"AA&>$?$?4***2  b!!F)),,  -, $    A&''      *''''''T  k5!!$H"I"IJ gsAAIJJK    A6 7 7      A= > >   !"AiLL),TTT-,TTTrh