Ë –‘¶†ÛžÜüãóR—ddlmZddlmZmZmZd„ZGd„d«ZGd„d«Zy) é)Ú_)Ú registrarÚ templatekwÚutilcó—|€gS|gS)zF a convenience method to return an empty list instead of None ©)Úvals ú8usr/lib/python3.12/site-packages/mercurial/namespaces.pyÚtolistr s€ð €{؈ àˆuˆ ócóF—eZdZdZdZd„Zd„Zd„Zd d„Zd„Z e Z d d „Z d „Z y) Ú namespacesz’provides an interface to register and operate on multiple namespaces. See the namespace class below for details on the namespace object. éc ó|—tj«|_tj«}d„}d„}d„}t dd|d|||d¬«}|j |«d„}d „}d „}t d d |d |||d hd¬«}|j |«d„} d„} d„} t dd|d| | | d¬«}|j |«y)Ncó6—|jj«S©N)Ú _bookmarksÚkeys©Úrepos r Úz%namespaces.__init__..!s€ §¡× 4Ñ 4Ô 6r cóJ—t|jj|««Sr)r rÚget©rÚnames r rz%namespaces.__init__.."s€¬¨t¯©×/BÑ/BÀ4Ó/HÔ(Ir có$—|j|«Sr)Ú nodebookmarks©rÚnodes r rz%namespaces.__init__..#s€¨×(:Ñ(:¸4Ô(@r s bookmarkssbookmarkT)Ú templatenameÚlogfmtÚ listnamesÚnamemapÚnodemapÚbuiltincóT—|j«D��cgc]\}}|‘Œ c}}Scc}}wr)Útagslist)rÚtÚns r rz%namespaces.__init__../s €¨t¯}©}¬Ô ?©¡t q¨!¢¨Ó ?ùÓ ?s” $có^—t|jjj|««Sr)r Ú _tagscacheÚtagsrrs r rz%namespaces.__init__..0s€¬¨t¯©×/CÑ/C×/GÑ/GÈÓ/MÔ(Nr có$—|j|«Sr)Únodetagsrs r rz%namespaces.__init__..1s €¨¯ © °dÔ(;r stagsstagstip)r r!r"r#r$Ú deprecatedr%có>—|j«j«Sr)Ú branchmaprrs r rz%namespaces.__init__..>s€˜dŸn™nÓ.×3Ñ3Ô5r có8—t|j|d««S)NT)r Ú branchtiprs r rz%namespaces.__init__..?s€¤f¨T¯^©^¸DÀ$Ó-GÔ&Hr có*—||j«gSr)Úbranchrs r rz%namespaces.__init__..@s€ t¨D¡z×'8Ñ'8Ó':Ñ&;r sbranchessbranch)rÚsortdictÚ_namesrÚ getlogcolumnsÚ namespaceÚ addnamespace) ÚselfÚcolumnsÚbmknamesÚ bmknamemapÚ bmknodemapr)ÚtagnamesÚ tagnamemapÚ tagnodemapÚbnamesÚbnamemapÚbnodemaps r Ú__init__znamespaces.__init__sì€Ü—m‘m“oˆŒ Ü×*Ñ*Ó,ˆñ7ˆÙIˆ Ù@ˆ Ü Ø Ø$ؘ;Ñ'ØØØØô ˆð ×ј!Ôá?ˆÙNˆ Ù;ˆ Ü Ø ØØ˜6‘?ØØØØ�xØô ˆð ×ј!Ôá5ˆÙHˆÙ;ˆÜ Ø Ø"ؘ9Ñ%ØØØØô ˆð ×ј!Õr có —|j|S)zreturns the namespace object)r7)r;r9s r Ú __getitem__znamespaces.__getitem__Ls€à�{‰{˜9Ñ%Ð%r có6—|jj«Sr)r7Ú__iter__©r;s r rJznamespaces.__iter__Ps€Ø�{‰{×#Ñ#Ó%Ð%r Ncó:—|jj||«Sr)r7r)r;r9Údefaults r rznamespaces.getSs€Ø�{‰{�‰˜y¨'Ó2Ð2r có6—|jj«Sr)r7ÚitemsrKs r rOznamespaces.itemsVs€Ø�{‰{× Ñ Ó"Ð"r cóH‡—|�(|jj|‰j‰«n‰|j‰j<‰jtjvrBt j tj«}|‰jddh¬«ˆfd„«}yy)zæregister a namespace namespace: the name to be registered (in plural form) order: optional argument to specify the order of namespaces (e.g. 'branches' should be listed before 'bookmarks') Nsreposctx)ÚrequirescóF•—tj||‰j«Sr)rÚ shownamesr)ÚcontextÚmappingr9s €r Ú generatekwz+namespaces.addnamespace..generatekwlsø€ä!×+Ñ+¨G°W¸i¿n¹nÓMÐMr )r7ÚinsertrrÚkeywordsrÚtemplatekeyword)r;r9ÚorderrYrVs ` r r:znamespaces.addnamespace[s‹ø€ð Ð Ø �K‰K× Ñ ˜u i§n¡n°iÕ @à*3ˆD�K‰K˜ Ÿ™Ñ 'ð �>‰>¤×!4Ñ!4Ñ 4Ü'×7Ñ7¼ ×8KÑ8KÓLˆOá ˜YŸ^™^°wÀÐ6GÔ Hó NóIñ Nð 5r có¤—|jj«D]\}}|j||«}|sŒ|cStt d«|z«‚)a Return the 'best' node for the given name. What's best is defined by the namespace's singlenode() function. The first match returned by a namespace in the defined precedence order is used. Raises a KeyError if there is no such node. sno such name: %s)r7rOÚ singlenodeÚKeyErrorr)r;rrÚnsÚvr)s r r\znamespaces.singlenodepsO€ð—[‘[×&Ñ&Ö(‰EˆB�Ø— ‘ ˜T 4Ó(ˆAÚØ’ð)ô”qÐ,Ó-°Ñ4Ó5Ð5r r) Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú_names_versionrFrHrJrrOÚ iteritemsr:r\rr r rrs:„ñð €Nò/òb&ò&ó3ò#ð€IóNó* 6r rcó>—eZdZdZ dd„Zd„Zd„Zd„Zy)r9aprovides an interface to a namespace Namespaces are basically generic many-to-many mapping between some (namespaced) names and nodes. The goal here is to control the pollution of jamming things into tags or bookmarks (in extension-land) and to simplify internal bits of mercurial: log output, tab completion, etc. More precisely, we define a mapping of names to nodes, and a mapping from nodes to names. Each mapping returns a list. Furthermore, each name mapping will be passed a name to lookup which might not be in its domain. In this case, each method should return an empty list and not raise an error. This namespace object will define the properties we need: 'name': the namespace (plural form) 'templatename': name to use for templating (usually the singular form of the plural namespace name) 'listnames': list of all names in the namespace (usually the keys of a dictionary) 'namemap': function that takes a name and returns a list of nodes 'nodemap': function that takes a node and returns a list of names 'deprecated': set of names to be masked for ordinary use 'builtin': bool indicating if this namespace is supported by core Mercurial. Nc ó¬—||_||_||_||_||_||_||_||_| r| |_|j€|j|_|j€|j|_|j€&d|jzjd«dz|_| €t«|_ | |_ y| |_ | |_ y)aVcreate a namespace name: the namespace to be registered (in plural form) templatename: the name to use for templating logname: the name to use for log output; if not specified templatename is used colorname: the name to use for colored log output; if not specified logname is used logfmt: the format to use for (i18n-ed) log output; if not specified it is composed from logname listnames: function to list all names namemap: function that inputs a name, output node(s) nodemap: function that inputs a node, output name(s) deprecated: set of names to be masked for ordinary use builtin: whether namespace is implemented by core Mercurial singlenode: function that inputs a name, output best node (or None) Ns%s:é s%s ) rr ÚlognameÚ colornamer!r"r#r$r\ÚljustÚsetr/r%) r;rr rirjr!r"r#r$r/r%r\s r rFznamespace.__init__›sË€ð>ˆŒ Ø(ˆÔ؈Œ Ø"ˆŒØˆŒ Ø"ˆŒØˆŒ ؈Œ Ù Ø(ˆDŒOð �<‰<Ð Ø×,Ñ,ˆDŒLð �>‰>Ð !Ø!Ÿ\™\ˆDŒNð �;‰;Ð à! D§L¡LÑ0×7Ñ7¸Ó;¸gÑEˆDŒKà Ð Ü!›eˆDŒOðˆ� ð)ˆDŒOàˆ� r có8—t|j||««S)z[method that returns a (sorted) list of names in a namespace that match a given node)Úsortedr$)r;rrs r Únamesznamespace.namesÙs€ô�d—l‘l 4¨Ó.Ó/Ð/r có8—t|j||««S)z]method that returns a list of nodes in a namespace that match a given name. )rnr#)r;rrs r Únodesznamespace.nodesÞs€ô �d—l‘l 4¨Ó.Ó/Ð/r c󶇗|j||«}|rDt|«dkDr1|jŠtˆfd„|D««}‰j |«S|dSy)z´returns the best node for the given name By default, the best node is the node from nodes() with the highest revision number. It can be overriden by the namespace.rc3ó@•K—|]}‰j|«–—Œy­wr)Úrev)Ú.0rÚcls €r Ú z'namespace.singlenode..ïsøèø€Ð8±a¨d˜RŸV™V DŸ\±aùsƒrN)r#ÚlenÚ changelogÚmaxr)r;rrr)Úmaxrevrvs @r r\znamespace.singlenodeåsVø€ð �L‰L˜˜tÓ $ˆÙ ä�1‹v˜ŠzØ—^‘^�ÜÓ8±aÓ8Ó8�Ø—w‘w˜v“Ð&Ø�Q‘4ˆKØr ) NNNNNNNNFN)r`rarbrcrFrorqr\rr r r9r9s<„ñð<ØØØØØØØØØó<ò|0ò 0ó r r9N) Úi18nrÚrrrr rr9rr r Úr~s0ðÝ÷ñò÷i6ñi6÷Xsòsr