\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@s-dZddlmZddlmZddlmZddlmZm Z m Z m Z m Z m Z mZmZmZmZmZddlmZe jrddlZejjZnddlZejZdZiZejeZejZejZed d d e ed d d e ed d d d defdYZ!d e"fdYZ#dZ$dZ%dZ&ed dddhdZ'eddddhdZ(eddddhdZ)dZ*eddZ+edd Z,ed!d"Z-dS(#s@ 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') i(tabsolute_import(t_(tbin( t bookmarksterrort extensionst logexchanget namespacestpycompatt registrart revsetlangtsmartsett templateutiltutil(t stringutilNsships-with-hg-coret remotenamesRtdefaulttbranchest hoistedpeertlazyremotenamedictcB@sqeZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z RS( s 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). cC@s1i|_i|_||_||_t|_dS(N(tcachetpotentialentriest_kindt_repotFalsetloaded(tselftkindtrepo((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyt__init__[s     cC@sct|_|j}xJtj||jD]3\}}}|d|}|||f|j|Wq+Wn|jS(N(RFRMR<RJRK(RRMR$tnodesR!((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyt nodetobranchs    'cC@s~|jsw|j}i|_|d7}xL|jD];\}}|j|r5|t|}||j|stnamemapcS@s|jjj|gS(N(RhRItget(RR$((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyRistnodemapcS@s|jjj|gS(N(RhRLRk(RR!((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyRisRt hoistednamest hoistednameshoisted name: %s c@s|jjjS(N(RhRSR;(R(RQ(s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyRi!sc@s|jjj|gS(N(RhRSRk(RR$(RQ(s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyRi#sc@s|jjj|gS(N(RhRTRk(RR!(RQ(s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyRi%sRtremotebranchest remotebranchsremote branch: %s cS@s|jjjS(N(RhRMR;(R((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyRi/scS@s|jjj|gS(N(RhRMRk(RR$((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyRi0scS@s|jjj|gS(N(RhRORk(RR!((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyRi2s( R[t setconfigRtlocalRRhRt namespacet configboolRXt addnamespacetconfig(R[RR^tremotebookmarknst hoistednamenstremotebranchns((RQs7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyt reposetupsH        trequiresRtctxcC@s|j|d}|j|d}g}d|jkr[|jdj||j}nd|jkr||jdj||j7}ntj||d|ddS(s<List of strings. Remote names associated with the changeset.RR|RURot remotenametpluralR(tresourceRXR!R t compatlist(tcontexttmappingRR|R((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyt remotenameskw6s"&RUcC@sw|j|d}|j|d}g}d|jkr[|jdj||j}ntj||d|ddS(s@List of strings. Remote bookmarks associated with the changeset.RR|RURfR~(RRXR!R R(RRRR|t remotebmarks((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pytremotebookmarkskwFs"RocC@sw|j|d}|j|d}g}d|jkr[|jdj||j}ntj||d|ddS(s?List of strings. Remote branches associated with the changeset.RR|RoRpR~(RRXR!R R(RRRR|Ro((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pytremotebrancheskwSs"c @sEtj|ddtd}|rUtjtj|dtd\}}}nd}}tj}t }|j xr|D]j} | |j kr|j | } xE| j |D]1} || sqn|j | j|| qWqqW|dkr| rtjtd|nfd|D} |tj| @S( s<utility function to return a set of revs based on the rtypesiisonly one argument acceptedsargument must be a stringtliteralsremote name '%s' does not existc3@s-|]#}j|rj|VqdS(N(thasnodeR((t.0tn(tcl(s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pys wsN(R tgetargsRRt stringmatchert getstringR&R talwaystsetR'RXRYtupdateRNRtRepoLookupErrorR tbaseset( RtsubsettxtrtypesRCRtpatterntmatcherRNtrtypeR^R$trevs((Rs7/usr/lib64/python2.7/site-packages/hgext/remotenames.pyt _revsetutil`s(+       $ sremotenames([name])cC@st|||dS(sAll 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`. RURo(RURo(R(RRR((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pytremotenamesrevsetzssremotebranches([name])cC@st|||dS(sAll 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`. Ro(Ro(R(RRR((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pytremotebranchesrevsetssremotebookmarks([name])cC@st|||dS(sAll 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`. RU(RU(R(RRR((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pytremotebmarksrevsets(.RAt __future__Rtmercurial.i18nRtmercurial.nodeRt mercurialRRRRRRR R R R R tmercurial.utilsRtispy3tcollections.abct collectionstabctMutableMappingtmutablemappingt testedwitht configtablet configitemttemplatekeywordtrevsetpredicateRRtobjectRR_RbRzRRRRRRR(((s7/usr/lib64/python2.7/site-packages/hgext/remotenames.pytsBL         ZE   5!! !