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: //usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyc
�
1�3\c	@@s�ddlmZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZddlmZmZejZejZejr�eZniZeje�Zedde�d	��Zd
drdfddtdfddvdfddwdfdxdydzgZedde
j�ed��Zed de�d!��Z ed"�d#��Z!ed$�d%��Z"ed&de�d'��Z#ed(de�d)��Z$ed*de�d+��Z%ed,de�d-��Z&da(da)d.d.d/�Z*ed0de�d1��Z+ed2de�d3��Z,ed4de�d5��Z-ed6de�d7��Z.ed8de
j�d9��Z/ed:de
j�d;��Z0ed<de
j�d=��Z1d>�Z2ed?�e3d@��Z4edAde�dB��Z5edCde�dD��Z6edEde�dF��Z7edGde�dH��Z8edIde�dJ��Z9edKde�dL��Z:edMde
j�dN��Z;edOde
j�dP��Z<edQde�dR��Z=edSde�dT��Z>edUde
j�dV��Z?edWde�dX��Z@edYde�dZ��ZAed[de�d\��ZBed]de�d^��ZCed_de�d`��ZDedade�db��ZEedcde�dd��ZFedede�df��ZGedgde�dh��ZHedide�dj��ZIedkde�dl��ZJedmde�dn��ZKdo�ZLdp�ZMejN�ZOdS({i(tabsolute_importNi(t_(tencodingterrortnodetpycompatt	registrarttemplateutilturltutil(tdateutilt
stringutilt	addbreakstintypecC@s|jdd�S(sZAny text. Add an XHTML "<br />" tag before the end of
    every line except the last.
    s
s<br/>
(treplace(ttext((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR,styeariiimtYtmonthitMtweekitWtdaytdthourthtminutei<tmtsecondtstagec@s-d����fd�}tj�}|d}t}||kr�t}tdt||��}|tdddkr�dSn>tdt||��}|tdddkr�tj|�SxgtD]_\}}}	||}
|
dks�|dkr�|rd|||
|	�Sd	|||
|	�Sq�Wd
S(ssDate. Returns a human-readable date/time difference between the
    given date/time and the current date/time.
    cS@s|dkr|S|dS(NiR((tttc((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pytpluralAsc@s+�rd||fSd|�||�fS(Ns%d%ss%d %s((RR ta(tabbrevR!(s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pytfmtEsiiisin the distant futureis%s from nows%s agoN(ttimetFalsetTruetmaxtintt	agescalesR
t	shortdate(tdateR#R$tnowtthentfuturetdeltaRRR"tn((R#R!s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR;s&	


tbasenamecC@stjj|�S(s�Any text. Treats the text as a path, and returns the last
    component of the path after splitting by the path separator.
    For example, "foo/bar/baz" becomes "baz" and "foo/bar//" becomes "".
    (tostpathR2(R4((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR2^st	commondircC@s�d�}y�|sdSg|D]"}|jd�jd�d ^q}t|�dkrhdj|d�St|�}t|�}dj|||��SWn&tk
r�tjt	d���nXdS(	s�List of text. Treats each list item as file name with /
    as path separator and returns the longest common directory
    prefix shared by all list items.
    Returns the empty string if no common prefix exists.

    The list items are not normalized, i.e. "foo/../bar" is handled as
    file "bar" in the directory "foo/..". Leading slashes are ignored.

    For example, ["foo/bar/baz", "foo/baz/bar"] becomes "foo" and
    ["foo/bar", "baz"] becomes "".
    cS@s�t|�t|�kr+|t|� }n+t|�t|�krV|t|� }n||krf|Sx9tjt|��D]"}||||kr||| Sq|W|S(N(tlenRtxrange(R"tbti((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pytcommonsstt/i����iisargument is not a list of textN(
tlstriptsplitR6tjointminR(t	TypeErrorRt
ParseErrorR(tfilelistR:tftdirlistR"R8((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR5fs
	/
tcountcC@s;yt|�SWn&tk
r6tjtd���nXdS(s/List or text. Returns the length as an integer.s
not countableN(R6RARRBR(R9((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRF�s
tdirnamecC@stjj|�S(s~Any text. Treats the text as a path, and strips the last
    component of the path after splitting by the path separator.
    (R3R4RG(R4((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRG�stdomaincC@sY|jd�}|dkrdS||d}|jd�}|dkrU|| }n|S(s�Any text. Finds the first string that looks like an email
    address, and extracts just the domain component. Example: ``User
    <user@example.com>`` becomes ``example.com``.
    t@i����R;it>i(tfind(tauthorRD((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRH�s
temailcC@s
tj|�S(s�Any text. Extracts the first string that looks like an email
    address. Example: ``User <user@example.com>`` becomes
    ``user@example.com``.
    (RRM(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRM�stescapecC@stj|jdd�t�S(s�Any text. Replaces the special XML/XHTML characters "&", "<"
    and ">" with XML entities, and filters out NUL characters.
    sR;(RRNRR'(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRN�sR;c	@s�tdkr3tjdtj�atjd�an�fd�}djg|�D]@\}}tjtj	dtj||��|||�|^qR�S(s/fill many paragraphs with optional indentation.s(

|
\s*[-*]\s*)s  +c3@s�d}x�tr�tj�|�}|s�tj�|�}t|�}x.|dkrv||dj�rv|d8}qIWtj|| �tj||�fVPn�||jd�!|j	d�fV|j
d�}q	WdS(Nii(R'tpara_retsearchRtunifromlocalR6tisspacet
unitolocaltstarttgrouptend(RTRtuctexttw(R(s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyt	findparas�s	#$R;t N(
ROtNonetretcompileRtspace_reR?Rtwraptsub(Rtwidtht
initindentt
hangindentRYtparatrest((Rs?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pytfill�s	tfill68cC@s
t|d�S(s.Any text. Wraps the text to fit in 68 columns.iD(Rf(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRg�stfill76cC@s
t|d�S(s.Any text. Wraps the text to fit in 76 columns.iL(Rf(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRh�st	firstlinecC@s7y|jt�djd�SWntk
r2dSXdS(s)Any text. Returns the first line of text.is
R;N(t
splitlinesR'trstript
IndexError(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRi�s
thexcC@s
tj|�S(sgAny text. Convert a binary Mercurial node identifier into
    its long hexadecimal representation.
    (RRm(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyt	hexfilter�sthgdatecC@sd|S(skDate. Returns the date as a pair of numbers: "1157407993
    25200" (Unix timestamp, timezone offset).
    s%d %d((R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRo�stisodatecC@stj|d�S(sMDate. Returns the date in ISO 8601 format: "2009-08-18 13:00
    +0200".
    s%Y-%m-%d %H:%M %1%2(R
tdatestr(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRp�st
isodateseccC@stj|d�S(s�Date. Returns the date in ISO 8601 format, including
    seconds: "2009-08-18 13:00:13 +0200". See also the rfc3339date
    filter.
    s%Y-%m-%d %H:%M:%S %1%2(R
Rq(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRr�sc@sP|j��t���|ddk�����fd�}dj|��S(s;indent each non-empty line of text after first with prefix.i����s
c3@sex^tj��D]M}�|}|r:|j�r:�Vn|V|�dksU�rdVqqWdS(Nis
(RR7tstrip(R9tl(tendswithnewlinetlinest	num_linestprefix(s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pytindenters
R;(RjR6R?(RRxRy((RuRvRwRxs?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pytindents
tjsoncC@sz|dkrdS|tkr dS|tkr0dSt|tttf�rUtj|�St|t	�r{dt
j|d|�St|td��r�t
jd|��n�tj|d�rgt|j��D]4\}}d	t
j|d|�t||�f^q�}d
dj|�dStj|d
�rcg|D]}t||�^q3}ddj|�dSt
jd|��dS(s;Any object. Serializes the object to a JSON formatted text.tnulltfalsettrues"%s"tparanoidus)Mercurial only does output with bytes: %rtkeyss"%s": %st{s, t}t__iter__t[t]scannot encode %rN(R[R&R't
isinstanceR)tlongtfloatRtbytestrtbytesRt
jsonescapettypeRtProgrammingErrorR	tsafehasattrtsortedt	iteritemsR{R?(tobjRtktvtoutR9((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR{s*
J"tlowercC@s
tj|�S(s)Any text. Converts the text to lowercase.(RR�(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�0stnonemptycC@s
|p	dS(s2Any text. Returns '(none)' if the string is empty.s(none)((R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�5st	obfuscatecC@sHt|tjtj�d�}djg|D]}dt|�^q+�S(sQAny text. Returns the input text rendered as a sequence of
    XML entities.
    RR;s&#%d;(tunicodeRtsysstrRR?tord(RR ((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�:stpermissionscC@s$d|krdSd|kr dSdS(NRtt
lrwxrwxrwxtxs
-rwxr-xr-xs
-rw-r--r--((tflags((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�Bs
tpersoncC@s
tj|�S(s]Any text. Returns the name before an email address,
    interpreting it as per RFC 5322.
    (RR�(RL((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�Jst	revescapecC@stj|dd�jdd�S(s�Any text. Escapes all "special" characters, except @.
    Forward slashes are escaped twice to prevent web servers from prematurely
    unescaping them. For example, "@foo bar/baz" becomes "@foo%20bar%252Fbaz".
    tsafes/@R<s%252F(turlreqtquoteR(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�Qstrfc3339datecC@stj|d�S(spDate. Returns a date using the Internet date format
    specified in RFC 3339: "2009-08-18T13:00:13+02:00".
    s%Y-%m-%dT%H:%M:%S%1:%2(R
Rq(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�Yst
rfc822datecC@stj|d�S(smDate. Returns a date using the same format used in email
    headers: "Tue, 18 Aug 2009 13:00:13 +0200".
    s%a, %d %b %Y %H:%M:%S %1%2(R
Rq(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�`stshortcC@s|d S(shChangeset hash. Returns the short form of a changeset hash,
    i.e. a 12 hexadecimal digit string.
    i((R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�gstshortbisectcC@s|r|dd!j�SdS(s�Any text. Treats `label` as a bisection status, and
    returns a single-character representing the status (G: good, B: bad,
    S: skipped, U: untested, I: ignored). Returns single space if `text`
    is not a valid bisection status.
    iiRZ(tupper(tlabel((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�nsR+cC@s
tj|�S(s'Date. Returns a date like "2006-09-18".(R
R+(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR+yst	slashpathcC@s
tj|�S(s8Any text. Replaces the native path separator with slash.(R	tpconvert(R4((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR�~sRjcC@stj|j�dd�S(s*Any text. Split text into a list of lines.tnametline(Rt
hybridlistRj(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyRj�ststringescapecC@s
tj|�S(N(Rt	escapestr(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR��st	stringifycC@s|S(scAny type. Turns the value into text by converting values into
    text and concatenating them.
    ((tthing((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR��ststripdircC@s6tjj|�}|dkr.tjj|�S|SdS(syTreat the text as path and strip a directory level, if
    possible. For example, "foo" and "foo/bar" becomes "foo".
    R;N(R3R4RGR2(Rtdir((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR��st	tabindentcC@s
t|d�S(snAny text. Returns the text, with every non-empty line
    except the first starting with a tab character.
    s	(Rz(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR��sR�cC@s
tj|�S(s)Any text. Converts the text to uppercase.(RR�(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR��st	urlescapecC@s
tj|�S(s`Any text. Escapes all "special" characters. For example,
    "foo bar" becomes "foo%20bar".
    (R�R�(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR��stusercC@s
tj|�S(sMAny text. Returns a short representation of a user name or email
    address.(Rt	shortuser(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyt
userfilter�st	emailusercC@s
tj|�S(s7Any text. Returns the user portion of an email address.(RR�(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR��stutf8cC@s
tj|�S(s>Any text. Converts from the local character encoding to UTF-8.(Rt	fromlocal(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR��st	xmlescapecC@sU|jdd�jdd�jdd�jdd�jd	d
�}tjdd|�S(
Nt&s&amp;t<s&lt;RJs&gt;t"s&quot;t's&#39;s
[--]RZ(RR\R`(R((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyR��scC@s6|r2x)|D]\}}|j||�}q
Wn|S(s}:websub: Any text. Only applies to hgweb. Applies the regular
    expression replacements defined in the websub section.
    (R`(Rtwebsubtabletregexptformat((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pytwebsub�scC@s.x'|jj�D]\}}|t|<qWdS(s5Load template filter from specified registrarobj
    N(t_tableR�tfilters(tuitextnametregistrarobjR�tfunc((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyt
loadfilter�si�Qi�3�i�Qi�'i�Qi�:	i�Q(RiR(Ri<R(RiR(Pt
__future__RR3R\R%ti18nRR;RRRRRRRR	tutilsR
RturlerrR�tispy3R)R�R�ttemplatefilterR�RR*R,R&RR2R5RFRGRHRMRNR[ROR^RfRgRhRiRnRoRpRrRzR'R{R�R�R�R�R�R�R�R�R�R�R+R�RjR�R�R�R�R�R�R�R�R�R�R�R�tvaluest
i18nfunctions(((s?/usr/lib64/python2.7/site-packages/mercurial/templatefilters.pyt<module>s�:
					"'