HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //lib64/python2.7/site-packages/mercurial/extensions.pyo
�
1�3\c@@s[ddlmZddlZddlZddlZddlZddlZddlZddlm	Z	m
Z
ddlmZm
Z
mZmZmZddlmZiZiZiZgZddd	d
ddd
dhZdd�Zd�Zd�Zd�Zddd�Zd�Zd�Zd8Z d�Z!d�Z"d�dd�Z#d�Z$d�Z%dd�Z&d �Z'd!�Z(d"�Z)d#�Z*ddd$�Z+d%�Z,d&e-fd'��YZ.d(�Z/dd)�Z0d*�Z1d+�Z2d,�Z3d-�Z4d.�Z5d/�Z6d0�Z7d1�Z8d2�Z9e:d3�Z;e<d4�Z=d5�Z>d6�Z?d7�Z@dS(9i(tabsolute_importNi(t_tgettext(tcmdutiltconfigitemsterrortpycompattutil(t
stringutilthbisectt	bookmarkstcolort
parentrevspectprogresstinterhgtinotifythgciac#@s`�r�fd�}n	d�}x8tD]0}t|}|r(||�r(||fVq(q(WdS(Nc@sQxJddgD]<}�jd||�}|dk	r
|jd�r
tSq
WdS(Ns%sshgext.%st
extensionst!(tconfigtNonet
startswithtTrue(tnametformattconf(tui(s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytenabled3scS@stS(N(R(R((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt<lambda>9t(t_ordert_extensions(RRRtmodule((Rs:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR1s	

cC@s�d}yt|}Wn^tk
rtxNtj�D]<\}}|jd|�sc|jd|�r1|}Pq1q1WnX|s�t|��n|S(s'return module with given extension namet.t/N(RRtKeyErrort	iteritemstendswith(Rtmodtktv((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytfind?s
&cC@s�|jdd�}tjtj|��}tj|�}tj|�}tjj|�r�tjj	|�\}}t
j||g�\}}}t
j||||�Syt
j
||�SWn+tk
r�}|js�||_n�nXdS(NR!R(treplaceRtnormpatht
expandpathRtfsdecodetostpathtisdirtsplittimptfind_moduletload_moduletload_sourcetIOErrortfilename(R/tmodule_nametdtftfdtfpathtdesctexc((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytloadpathMs	cC@sLttj|��}|jd�}x!|dD]}t||�}q/W|S(s#import and return the <name> moduleR!i(t
__import__RtsysstrR1tgetattr(RR&t
componentstcomp((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_importh_s
cC@s�|rt|d|�}n�ytd|�}Wn�tk
r�}|rc||d|d|�nytd|�}Wq�tk
r�}|r�||d||�nt|�}q�XnX|S(Nshgext.%sshgext3rd.%s(R?REtImportError(RR/t
reportfuncR&terr((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt
_importextgscC@sR|jdd�rN|jd|tj|�|f�|jrN|j�qNndS(Ntdevelsdebug.extensionss<debug.extensions:     - could not import %s (%s): trying %s
(t
configbooltdebugRtforcebytestrt	debugflagt	traceback(RRHtfailedtnext((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_reportimporterror{s
		cC@s�t|tttf�r9x�|D]}t||�qWn�t|t�r�x�|j�D]9\}}t||�td|tj|�f|�qUWn7t|t	d��r�t
jd||fdd��ndS(Ns%s.%susunicode %r found in %sthintsuse b'' to make it byte string(t
isinstancetlisttsetttuplet_rejectunicodetdicttitemsRRMttypeRtProgrammingError(RtxstxR'R(((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyRX�s

'tnorepotoptionalrepot	inferrepocC@s�x�|j�D]s\}}|d}gtD]}tj||�s*|^q*}|sZq
ntjddj|�dd|��q
WdS(s4Check if extension commands have required attributesismissing attributes: %ss, RSs'use @command decorator to register '%s'N(R$t
_cmdfuncattrsRtsafehasattrRR\tjoin(RtcmdtabletcteR:tatmissing((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_validatecmdtable�s
+cC@s�x0dddgD]}t|t||i��qWxKdddddd	gD]1}t||d
�}|rLt||j�qLqLWt|t|di��d
S(s=Sanity check for loadable tables provided by extension moduleRet
colortabletconfigtabletfilesetpredicatet
internalmergetrevsetpredicatettemplatefilterttemplatefuncttemplatekeywordN(RXRBRt_tableRj(RR&ttto((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_validatetables�scG@sdS(N(R(Rh((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR�Rc

C@s�|jd�s|jd�r+|d}n|}|tkrAdS|tkrUt|S|d|�dt|<tjd|��"}t||tt|��}WdQX|d||�|dk	r�||c|j	7<nt
|dd�}|r1tj|d�tjd	d�kr1|jt
d
�||f�dS|d|�t||�|t|<tj|�|d|�tjd
|��1}x'tj|g�D]}	|	dt�q�WWdQX|d|�|S(Nshgext.shgext/is  - loading extension: %r
sload extension %rs  > %r extension loaded in %s
tminimumhgversionitnsP(third party extension %s requires version %s or newer of Mercurial; disabling)
s&    - validating extension tables: %r
s(    - invoking registered callbacks: %r
scallbacks extension %rtloadeds     > callbacks completed in %s
(Rt_builtinRRRttimedcmRItbindRRtelapsedRBtversiontupletwarnRRvRtappendt_aftercallbackstgetR(
RRR/tlogtloadingtimet	shortnametstatsR&tminvertfn((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytload�s:


!*





cC@s�tt|dd�}|r�y||�Wq�tk
r|}|jdt�tj|�}|jt	d�||f�t
SXntS(Ntuisetuptforces&*** failed to set up extension %s: %s
(RBRRt	ExceptionRORRRMRRtFalse(RRR�tinsttmsg((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_runuisetup�scC@s�tt|dd�}|r�yEy||�Wn0tk
r_tj|�jrU�n|�nXWq�tk
r�}|jdt	�t
j|�}|jt
d�||f�tSXnt	S(NtextsetupR�s&*** failed to set up extension %s: %s
(RBRRt	TypeErrorRt
getargspectargsR�RORRRMRRR�(RRR�R�R�((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_runextsetup�s
c@s��jdd�r$�fd�}n	d�}tjt�}�jd�}|dk	r�g|D]$\}}||kr^||f^q^}ntt�}|d|r�dnd�|d	t|��tj	d
��1}x'|D]\}	}
|
r4|
dd!d
kr4|	t
kr|d|	�n|
dt
|	<q�q4nyt�|	|
||�Wq�tk
r�}t
j|�}|
r��jtd�|	|
|f�n�jtd�|	|f�t|tj�r�|jr��jtd�|j�n�j�q�Xq�WWdQX|dtt�||�dtdfg}
|d�t�||
�t�}|d�tj	d���}x�t|D]}}	|d|	�tj	d|	��3}t|	��s�|d|	�|j|	�nWdQX|d|	|�||	c|j7<q{WWdQX|d|�|d�tj	d���}x�t|D]�}	|	|krNq6n|d|	�tj	d |	��3}t|	��s�|d!|	�|j|	�nWdQX|d"|	|�||	c|j7<q6WWdQX|d#|�x%|D]}	|d$|	�dt|	<q�W|d%�tj	d&��Y}xOtD]G}|tkr?q'nx,t|D] }|d'|�|d(t�qJWq'WWdQX|d)|�tj�dd*l m!}m"}m#}m$}m%}m&}m'}m(}|d+�d,|d-fd.|d/fd0|d1fd2|d3fd4|d1fd5|d6fd7|d8fd9|d:fg}tj	d;��}t�||�WdQX|d<|�x7t)|�D])}	d=}|||	tj*||	��q{W|d>�dS(?NRJsdebug.extensionsc@s�jd||dd�S(Nsdebug.extensions: tlabelsdebug.extensions(RL(R�tvalues(R(s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR�s	c_@sdS(N(R(Rhtkw((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR�RRsloading %sextensions
sadditional Rs- processing %d entries
sload all extensionsiiRs$  - skipping disabled extension: %r
s.*** failed to import extension %s from %s: %s
s&*** failed to import extension %s: %s
s	*** (%s)
s&> loaded %d extensions, total time %s
Rltloadconfigtables!- loading configtable attributes
s- executing uisetup hooks
sall uisetups  - running uisetup for %r
s
uisetup %rs&    - the %r extension uisetup failed
s  > uisetup for %r took %s
s> all uisetup took %s
s- executing extsetup hooks
sall extsetups  - running extsetup for %r
sextsetup %rs'    - the %r extension extsetup failed
s  > extsetup for %r took %s
s> all extsetup took %s
s$    - disabling broken %r extension
s%- executing remaining aftercallbacks
taftercallbackss.  - extension %r not loaded, notify callbacks
Rys+> remaining aftercallbacks completed in %s
(Rtcommandst	filemergetfilesettrevsetttemplatefilterst
templatefuncst
templatekws)- loading extension registration objects
RetloadcmdtableRktloadcolortableRmt
loadpredicateRntloadinternalmergeRoRpt
loadfilterRqtloadfunctionRrtloadkeywordsload registration objectss0> extension registration object loading took %s
s*> extension %s take a total of %s to load
sextension loading complete
(+RKtcollectionstdefaultdicttintRRtlenRRR{t_disabledextensionsR�R�RRMRRRTRtHintRSROt
_loadextraRVR�taddR}R�RR�R�tclearRRR�R�R�R�R�R�R�tsortedt	timecount(Rt	whitelistR�R�tresultR'R(tnewindexR�RR/R�R�tearlyextraloaderstbrokentalluisetupstatstallextetupstatsR�R�RR�R�R�R�R�R�R�textraloaderst
extension_msg((Rs:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytloadall�s�	4	

	













:

!c	C@s�x|t|D]p}t|}|s'qnxQ|D]I\}}}t||d�}|dk	r.t||�|||�q.q.WqWdS(N(RRRBR(	RR�R�RR tobjnamet	loadermodt
loadernametextraobj((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR�xs
cC@sI|tkr,t|dk	}|d|�ntj|g�j|�dS(s�Run the specified function after a named extension is loaded.

    If the named extension is already loaded, the callback will be called
    immediately.

    If the named extension never loads, the callback will be called after
    all extensions have been loaded.

    The callback receives the named argument ``loaded``, which is a boolean
    indicating whether the dependent extension actually loaded.
    RyN(RRR�t
setdefaultR�(t	extensiontcallbackRy((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytafterloaded�s
c@s��fd�}|S(s�Partial function application

      Returns a new function that is the partial application of args and kwargs
      to func.  For example,

          f(1, 2, bar=3) === bind(f, 1)(2, bar=3)c@s��||�S(N((RhR�(R�tfunc(s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytclosure�s((R�R�R�((R�R�s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR|�scC@szy|j|_Wntk
r#nXt|d�|_t|d�|_|jjt|di��||_||_dS(s.Copy and add some useful attributes to wrappert
__module__t__doc__t__dict__N(	t__name__tAttributeErrorRBR�R�R�tupdatet	_origfunct_unboundwrapper(twraptorigfntunboundwrapper((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_updatewrapper�s
	c
C@s�tj||�\}}x0|j�D]"\}}||kr%|}	Pq%q%W|d}
tjtj|�tj|
��}t||
|�|dk	r�|j	|7_	nt
|�}||d<|dk	r�|dc|7<nt|�||	<|S(s.Wrap the command named `command' in table

    Replace command in the command table with wrapper. The wrapped command will
    be inserted into the command table specified by the table argument.

    The wrapper will be called like

      wrapper(orig, *args, **kwargs)

    where orig is the original (wrapped) function, and *args, **kwargs
    are the arguments passed to it.

    Optionally append to the command synopsis and docstring, used for help.
    For example, if your extension wraps the ``bookmarks`` command to add the
    flags ``--remote`` and ``--all`` you might call this function like so:

      synopsis = ' [-a] [--remote]'
      docstring = """

      The ``remotenames`` extension adds the ``--remote`` and ``--all`` (``-a``)
      flags to the bookmarks command. Either flag will show the remote bookmarks
      known to the repository; ``--remote`` will also suppress the output of the
      local bookmarks.
      """

      extensions.wrapcommand(commands.table, 'bookmarks', exbookmarks,
                             synopsis, docstring)
    iiN(RtfindcmdR$t	functoolstpartialRtchecksignatureR�RR�RURW(
ttabletcommandtwrappertsynopsist	docstringtaliasestentrytaliasRgtkeyR�R�tnewentry((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytwrapcommand�s"

c@s�tj|�}xV|jD]K}||jkr|j|j���fd�}||j|_PqqW|tkr�td||f��ndS(s[Wraps a filecache property.

    These can't be wrapped using the normal wrapfunction.
    c@s��||�S(N((R�tkwargs(R�R�(s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR��sstype '%s' has no property '%s'N(RRAt__mro__R�R�tobjectR�(tclstpropnameR�tcurrclsR�((R�R�s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt
wrapfilecache�stwrappedfunctioncB@s)eZdZd�Zd�Zd�ZRS(s3context manager for temporarily wrapping a functioncC@s||_||_||_dS(N(t
_containert	_funcnamet_wrapper(tselft	containertfuncnameR�((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt__init__�s		cC@st|j|j|j�dS(N(twrapfunctionR�R�R�(R�((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt	__enter__�scC@st|j|j|j�dS(N(tunwrapfunctionR�R�R�(R�texctypetexcvalueRO((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt__exit__s(R�R�R�R�R�R�(((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR��s		cC@sft||�}tj|�r3tj||�}nt||�}t|||�t|||�|S(s�Wrap the function named funcname in container

    Replace the funcname member in the given container with the specified
    wrapper. The container is typically a module, class, or instance.

    The wrapper will be called like

      wrapper(orig, *args, **kwargs)

    where orig is the original (wrapped) function, and *args, **kwargs
    are the arguments passed to it.

    Wrapping methods of the repository object is not recommended since
    it conflicts with extensions that extend the repository by
    subclassing. All extensions that need to extend methods of
    localrepository should use this subclassing trick: namely,
    reposetup() should look like

      def reposetup(ui, repo):
          class myrepo(repo.__class__):
              def whatever(self, *args, **kwargs):
                  [...extension stuff...]
                  super(myrepo, self).whatever(*args, **kwargs)
                  [...extension stuff...]

          repo.__class__ = myrepo

    In general, combining wrapfunction() with subclassing does not
    work. Since you cannot control what other extensions are loaded by
    your end users, you should play nicely with others by using the
    subclass trick.
    (RBtinspecttismoduleR�R�R|R�tsetattr(R�R�R�R�R�((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR�s#cC@s|t||�}|j�}|dkr4|d}n|j|�t|||�x$t|�D]}t|||�q^W|S(s/undo wrapfunction

    If wrappers is None, undo the last wrap. Otherwise removes the wrapper
    from the chain of wrappers.

    Return the removed wrapper.
    Raise IndexError if wrapper is None and nothing to unwrap; ValueError if
    wrapper is not None but is not found in the wrapper chain.
    iN(tgetwrapperchaintpopRtremoveR�treversedR�(R�R�R�tchainR�tw((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR�5s


cC@sQg}t||�}x5|rL|jt|d|��t|dd�}qW|S(s�get a chain of wrappers of a function

    Return a list of functions: [newest wrapper, ..., oldest wrapper, origfunc]

    The wrapper functions are the ones passed to wrapfunction, whose first
    argument is origfunc.
    R�R�N(RBR�R(R�R�R�R�((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyR�Is	cC@sPddl}tjjtjjtj|j���}ytj|�}Wnt	k
r]iSXi}x�|D]�}|j
d�r�|jdd�d}tjj||�}n6|}tjj||d�}tjj
|�s�qkn||ksk|tksk|dkrqkn|||<qkWx-tj�D]\}}|r)|||<q)q)W|S(sAfind paths of disabled extensions. returns a dict of {name: path}iNs.pyR!is__init__.pyR�(thgextR.R/tdirnametabspathRtfsencodet__file__tlistdirtOSErrorR%trsplitRdtexistsRR�R$(RtextpathtfilestextsRgRR/((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_disabledpathsYs.	!

$cC@s�g}|j�}x7|d dks2|j�rK|j�}|sPqqW|d }|dksn|dkr�|d}xv|r�|j�j|�r�|j|�d}|r�|j|�nPn
|s�dS|j|�|j�}q{WndSdj|�S(	s�return the top-level python documentation for the given file

    Loosely inspired by pydoc.source_synopsis(), but rewritten to
    handle triple quotes and to return the whole text instead of just
    the synopsisit#is"""s'''iRN(treadlinetstriptrstripR%R1R�RRd(tfileR�tlinetstart((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt
_moduledocws* 

	
cC@s[y(t|d��}t|�}WdQXWntk
r<dSX|rMt|�Std�SdS(sBretrieve help synopsis of a disabled extension (without importing)trbNs(no help text available)(topenRR6RR(R/tsrctdoc((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt
_disabledhelp�s

cC@s�y1ddlm}td�|jj�D��SWnttfk
rJnXt�}|s^iSi}xC|j�D]5\}}t|�}|rq|j	�d||<qqqqW|S(sCfind disabled extensions from hgext. returns a dict of {name: desc}i(t	__index__cs@s3|])\}}|tkr|t|�fVqdS(N(RR(t.0RR=((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pys	<genexpr>�s	(
RRRYtdocsR$RFR�R
Rt
splitlines(RtpathsRRR/R((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytdisabled�s		cC@s{y:ddlm}|tkr#dSt|jj|��SWnttfk
rSnXt�}||krwt	||�SdS(s;find a specific disabled extension from hgext. returns desci(RN(
RRRRRR�RFR�R
R(RRR((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytdisabledext�s	cc@s�tj|g�}x�|r�|j�}t|tj�sU|jtj|��qnxa|jD]V}t|tj	�s}q_nt|j
tj�s�q_n|j
jdkr�q_n|Vq_WqWdS(s7Scan @command() decorators in the tree starting at nodeR�N(
R�tdequetpopleftRTtasttFunctionDeftextendtiter_child_nodestdecorator_listtCallR�tNametid(tnodettodoR9((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_walkcommand�s	cC@s�t|d��}tj|j�|�}WdQXi}x�t|�D]�}|jsXqCn|jd}t|tj�r�tj	|j
�}n*tjrCt|tj�rC|j
}nqCdgdf||<qCW|S(suConstruct a dummy command table without loading the extension module

    This may raise IOError or SyntaxError.
    RNiR(RR$tparsetreadR.R�RTtStrRtsysbyteststispy3tBytesR(R/RtrootReR,RhR((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_disabledcmdtable�s	
c
C@s�yt|�}Wnttfk
r*dSXytj|||�\}}Wntjtjfk
rjdSXx1|D]}|j|�rr|}PqrqrW|d}t	|�}	|||	fS(Ni(
R7R6tSyntaxErrorRR�RtAmbiguousCommandtUnknownCommandRR(
RtcmdRR/tstrictReR�R�RfR((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt_finddisabledcmd�s

cC@s�t�}|s!tj|��nd}|j|d�}|r]t||||d|�}n|s�xB|j�D]1\}}t||||d|�}|rpPqpqpWn|r�|Stj|��dS(sXfind cmd from disabled extensions without importing.
    returns (cmdname, extname, doc)R<N(R
RR:RR�R=R$(RR;R<RtextR/R((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytdisabledcmds	cC@sui}xht�D]]\}}t|j�p4td�}|rS|jd�d}n|j�dj�||<qW|S(s+return a dict of {name: desc} of extensionss(no help text available)R!i����i(RRR�RR1RR(R�RtenameR>R((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyRscC@s/gtj�D]\}}|dkr
|^q
S(s4return short names of extensions that failed to loadN(RR$R(RR&((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt	notloaded$scC@s�tj|d�r0t|j�r0|j�}n$tj|d�rN|j}nd}t|ttf�r�djd�|D��}n|S(s8return version information from given module as a stringt
getversiont__version__RR!cs@s|]}tj|�VqdS(N(Rtbytestr(RRu((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pys	<genexpr>2s(	RRctcallableRBRCRTRURWRd(R tversion((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt
moduleversion(scC@st|dd�}|dkS(Nt
testedwithsships-with-hg-core(RBR(R t
exttestedwith((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pytismoduleinternal5s(R_R`Ra(At
__future__RR$R�R�R2R�R.ti18nRRRRRRRRtutilsRRR�R�RRzRRR)R?RERIRRRXRbRjRvR�R�R�R�R�R�R|R�R�R�R�R�R�R�R�R
RRR R!R.R7R=R�R?RRRARGRJ(((s:/usr/lib64/python2.7/site-packages/mercurial/extensions.pyt<module>st(							
		&		�				2		1