6hG6(SrSSKJr SSKrSSKJr SSKJr SSK J r J r J r J r JrJrJrJrJrJr SSKJr Sr0r\R0"\5r\R2"5r\R4"5r\"S S S S 9 \"S S S S 9 \"S SSS 9 "SS\R6R85r"SS5rSrSr Sr!\"S SS1S9S5r"\"SSS1S9S5r#\"SSS1S9S5r$Sr%\"S 5S!5r&\"S"5S#5r'\"S$5S%5r(g)&a?showing remotebookmarks and remotebranches in UI (EXPERIMENTAL) By default both remotebookmarks and remotebranches are turned on. Config knob to control the individually are as follows. Config options to tweak the default behaviour: remotenames.bookmarks Boolean value to enable or disable showing of remotebookmarks (default: True) remotenames.branches Boolean value to enable or disable showing of remotebranches (default: True) remotenames.hoistedpeer Name of the peer whose remotebookmarks should be hoisted into the top-level namespace (default: 'default') ) annotationsN)_)bin) bookmarkserror extensions logexchange namespaces registrar revsetlangsmartset templateutilutil) stringutilsships-with-hg-core remotenames bookmarksT)defaultbranches hoistedpeersdefaultc^\rSrSrSrSrSrSrSrSr Sr S r S r S r S rS r\rSrg)lazyremotenamedictMa Read-only dict-like Class to lazily resolve remotename entries We are doing that because remotenames startup was slow. We lazily read the remotenames file once to figure out the potential entries and store them in self.potentialentries. Then when asked to resolve an entry, if it is not in self.potentialentries, then it isn't there, if it is in self.potentialentries we resolve it and store the result in self.cache. We cannot be lazy is when asked all the entries (keys). cF0Ul0UlXlX lSUlg)NF)cachepotentialentries_kind_repoloaded)selfkindrepos 3/usr/lib/python3/dist-packages/hgext/remotenames.py__init__lazyremotenamedict.__init__Ys" "   cSUlURn[R"XR5Hup#nUS-U-nX#U4UR U'M! g)z?Read the remotenames file, store entries matching selected kindT/N)rrr readremotenamefilerr)rr!noderpathrnamenames r"_loadlazyremotenamedict._load`sX zz"-"@"@ **# D4<%'D+/*=D ! !$ ' # r%c"XR;agURUup#nURn[U5nURR U5 UR S:XaXVR5(agU/$![ a gf=f)z;Check that the node for potentialentry exists and return itNr)rrr changelogrev LookupErrorr closesbranch)rpotentialentryr)remoter,r!binnodes r" _resolvedatalazyremotenamedict._resolvedatajs!6!66!22>Bdzzd)  NN  w ' :: $)C)C)E)Ey   sB B BcUR(dUR5 URU5nUbU$[5eN)rr-_fetchandcacheKeyErrorrkeyvals r" __getitem__lazyremotenamedict.__getitem__{s4{{ JJL!!#& ?J* r%c,[UR5$r:)iterrrs r"__iter__lazyremotenamedict.__iter__sD))**r%c,[UR5$r:)lenrrDs r"__len__lazyremotenamedict.__len__s4(())r%c[er:NotImplementedError)rkvs r" __setitem__lazyremotenamedict.__setitem__!!r%c[er:rL)rrNs r" __delitem__lazyremotenamedict.__delitem__rRr%cXR;aURU$URU5nUbX RU'U$gr:)rr7r=s r"r;!lazyremotenamedict._fetchandcachesB ** ::c? "$ ?!JJsOJr%cxUR(dUR5 URR5$)z&Get a list of bookmark or branch names)rr-rkeysrDs r"rYlazyremotenamedict.keyss'{{ JJL$$))++r%c## UR(dUR5 URR5HupU[ US5/4v M g7f)z Iterate over (name, node) tuplesrN)rr-ritemsr)rrNvtups r" iteritemslazyremotenamedict.iteritemssG{{ JJL,,224GAs47|n% %5sAA)rrrrrN)__name__ __module__ __qualname____firstlineno____doc__r#r-r7r@rErIrPrTr;rYr^r\__static_attributes__r%r"rrMsE >"+*"", & Er%rcN\rSrSrSrSrSrSrSrSr Sr S r S r S r S rg ) remotenamesa This class encapsulates all the remotenames state. It also contains methods to access that state in convenient ways. Remotenames are lazy loaded. Whenever client code needs to ensure the freshest copy of remotenames, use the `clearnames` method to force an eventual load. c0XlUR5 gr:)r clearnames)rr!argss r"r#remotenames.__init__s  r%c[SUR5Ul[SUR5UlUR 5 g)zClear all remote names staterrN)rrrbranches_invalidatecacherDs r"rkremotenames.clearnamess2+L$**E*; C  r%c<SUlSUlSUlSUlgr:) _nodetobmarks _nodetobranch _hoisttonodes _nodetohoistsrDs r"rpremotenames._invalidatecaches"!!!!r%cUR$r:)rrDs r" bmarktonodesremotenames.bmarktonodess ~~r%cUR(d^UR5n0UlUR5H3up#URRUS/5R U5 M5 UR$)Nr)rsryr\ setdefaultappend)rryr,r)s r" nodetobmarksremotenames.nodetobmarkssg!!,,.L!#D *002 ""--d1gr:AA$G3!!!r%cUR$r:)rorDs r" branchtonodesremotenames.branchtonodess }}r%cUR(ddUR5n0UlUR5H9up#UH.nURRU/5R U5 M0 M; UR$r:)rtrr\r|r})rrr,nodesr)s r" nodetobranchremotenames.nodetobranchso!! ..0M!#D ,224 !D&&11$;BB4H" 5!!!r%cUR(diUR5n0UlUS- nUR5H9up4URU5(dMU[ U5SnX@RU'M; UR$)Nr')ruryr\ startswithrHrhoist marktonodesr,r)s r" hoisttonodesremotenames.hoisttonodessz!!++-K!#D  TME)//1 ??5))E -D/3&&t,2!!!r%cNUR(dUR5n0UlUS- nUR5HYup4URU5(dMU[ U5SnURR US/5R U5 M[ UR$)Nr'r)rvryr\rrHr|r}rs r" nodetohoistsremotenames.nodetohoistss!!++-K!#D  TME)//1 ??5))E -D&&11$q'2>EEdK2!!!r%)rursrtrvrrroN)r`rarbrcrdr#rkrpryr~rrrrrerfr%r"rhrhs4 " "" " "r%rhcSUR;agURSnURU5H)nURX&5nU(dMUSnUSS4XF'M+ U"XX45$)Nremotebookmarksr r%)names listnamesr) origuir!fmbmarksnsr,rr)s r"wrapprintbookmarksrsm+ & 'B T"$ QxdC( # " %%r%cD[R"[S[5 g)N_printbookmarks)r wrapfunctionrr)rs r"extsetuprsI'8:LMr%c L^URRSSSS5 UR5(dg[U5Ul[ R nURSS5(avU"SSSSS S S S 9nURRU5 URSS 5mT(a3U"SSSSU4SjU4SjU4SjS 9nURRU5 URSS5(a+U"SSSSSSSS 9nURRU5 gg)Ns experimentalrTsremotenames-extrrremotebookmarksremote bookmark: %s cRURR5R5$r:) _remotenamesryrYr!s r"reposetup..s4#4#4#A#A#C#H#H#Jr%cVURR5RU/5$r:)rrygetr!r,s r"rr#t'8'8'E'E'G'K'Kb(r%cVURR5RU/5$r:)rr~rr!r)s r"rrrr%) templatename colornamelogfmtrnamemapnodemaprs hoistednamess hoistednameshoisted name: %s cV>URRT5R5$r:)rrrY)r!rs r"rr(s%t'8'8'E'E($&(r%cZ>URRT5RU/5$r:)rrr)r!r,rs r"rr+)4+<+<+I+I,#dB-, r%cZ>URRT5RU/5$r:)rrr)r!r)rs r"rr.rr%rremotebranches remotebranchsremote branch: %s cRURR5R5$r:)rrrYrs r"rr:s4#4#4#B#B#D#I#I#Kr%cVURR5RU/5$r:)rrrrs r"rr;s#t'8'8'F'F'H'L'Lb(r%cVURR5RU/5$r:)rrrrs r"rr>rr%) r setconfiglocalrhrr namespace configboolr addnamespaceconfig)rr!rremotebookmarkns hoistednamensremotebranchnsrs @r" reposetuprs'GGo~t=OP ::<<#D)D   B }}^\22 +',J    01 ..9 ,(-  M JJ # #M 2 }}^[11 *%*K   /2r%repoctx)requirescpURUS5nURUS5n/nSUR;a,URSRX#R55nSUR;a.XBRSRX#R55- n[R"XSUSS9$)z# UH.nTRU5(dMTRU5v M0 g7fr:)hasnoder1).0ncls r" _revsetutil..s' 6u! 1 IBFF1IIus99)r getargsrr stringmatcher getstringralwayssetr0rrupdaterrRepoLookupErrorr baseset)r!subsetxrtypesrlr patternmatcherrrtyperr,revsrs @r" _revsetutilr}s   aAq)F'G HD !+!9!9  a!,H*I J" w++ EE B JJ E"B T*t}} RXXd12+ z%## 0 1G ;   7u 6D H$$T* **r%sremotenames([name])c[XUS5$)zAll changesets which have a remotename on them. If `name` is specified, only remotenames of matching remote paths are considered. Pattern matching is supported for `name`. See :hg:`help revisions.patterns`. )rrrr!rrs r"remotenamesrevsetrs tQ(O PPr%sremotebranches([name])c[XUS5$)zAll changesets which are branch heads on remotes. If `name` is specified, only remotenames of matching remote paths are considered. Pattern matching is supported for `name`. See :hg:`help revisions.patterns`. )rrrs r"remotebranchesrevsetrs tQ(< ==r%sremotebookmarks([name])c[XUS5$)zAll changesets which have bookmarks on remotes. If `name` is specified, only remotenames of matching remote paths are considered. Pattern matching is supported for `name`. See :hg:`help revisions.patterns`. )rrrs r"remotebmarksrevsetrs tQ(= >>r%))rd __future__rcollections.abc collectionsmercurial.i18nrmercurial.noder mercurialrrrr r r r r rrmercurial.utilsr testedwith configtable configitemtemplatekeywordrevsetpredicateabcMutableMappingrrhrrrrrrrrrrrfr%r"rs$#   ' #   ! !+ . ++-++-        \77\~C"C"L & N<0~7F*;<="#w.?@A$"gv->?@$+:'(Q)Q*+>,>+,?-?r%