Ë Ë8¶©.ÚŠ]ãó6—ddlZddlZddlZddlZddlZddlmZddlmZm Z ddl m Z mZm Z m Z mZejZdZdZdZd Zd Zd Zd Zd ZdZdZdZe j6Zd„Zd„ZegZGd„de«Z Gd„d«Z!d„Z"d d„Z#d„Z$d„Z%d„Z&d„Z'd!d„Z(d„Z)d„Z*y)"éNé)Ú_)ÚgetattrÚopen)ÚencodingÚpycompatÚscmutilÚ templaterÚutiléÈéÉi0i�i‘i“i”i•i–iŸiôcóþ—t|jjd««rY|j}|j dd«}|j }|rt |||«rytd«|z}|j|«y)Ns access-hiddens experimentalsserver.allow-hidden-accessTsEignoring request to access hidden changeset by unauthorized user: %r F) ÚboolÚqsparamsÚgetÚuiÚ configlistÚ remoteuserÚismemberrÚwarn)ÚrepoÚreqrÚallowÚuserÚmsgs ú:usr/lib/python3.12/site-packages/mercurial/hgweb/common.pyÚhashiddenaccessr.s~€Ü ˆC�L‰L× Ñ Ð-Ó .Ô/ð�W‰WˆØ— ‘ ˜oÐ/LÓMˆØ�~‰~ˆÙ ”X˜b $¨Ô.Øôð/óðñ ð ð �G‰G�CŒLØ ócóŽ—|j}|jdd«}|r3|r!t|jj||«rt t d«‚|jdd«}|r1t|jj||«st t d«‚|dk(r|jst t d«‚|dk(s|€y|dk(r!|jd k7r3d }t t|«‚|jd k7rd }t t|«‚|jdd «r|jdk7rt td«‚|jdd«}|r3|r!t|jj||«rt t d«‚|jdd«}|r!t|jj||«st t d«‚y)zšCheck permission for operation based on request data (including authentication info). Return if op allowed, else raise an ErrorResponse exception.ówebs deny_readsread not authorizeds allow_readspullspull not authorizedNsuploadsPUTsupload requires PUT requestsPOSTspush requires POST requestspush_sslshttpss ssl requireds deny_pushspush not authorizeds allow-push) rrrrrÚ ErrorResponseÚHTTP_UNAUTHORIZEDÚ allowpullÚmethodÚHTTP_METHOD_NOT_ALLOWEDÚ configboolÚ urlschemeÚHTTP_FORBIDDEN) ÚhgwebrÚoprÚ deny_readÚ allow_readrÚdenyrs rÚ checkauthzr.Hs�€ð �>‰>€Dà× Ñ  ¨Ó6€IÙ™$¤(¨5¯:©:¯=©=¸$À Ô"JÜÔ-Ð/EÓFÐFà×!Ñ! &¨-Ó8€JÙœ8 E§J¡J§M¡M°4¸ÔDÜÔ-Ð/EÓFÐFà ˆW‚}˜UŸ_š_ÜÔ-Ð/EÓFÐFØ ˆwŠ˜"˜*Øð ˆY‚Ø �:‰:˜Ò Ø0ˆCÜÔ 7¸Ó=Ð =à �‰�wÒ Ø+ˆÜÔ3°SÓ9Ð9ð ×ј  Ô,°·±À(Ò1JÜœN¨OÓ<Ð<à × Ñ ˜F LÓ 1€DÙ ‘TœX e§j¡j§m¡m°T¸4Ô@ÜÔ-Ð/EÓFÐFà × Ñ ˜V ]Ó 3€EÙ ”h˜uŸz™zŸ}™}¨d°EÔ:ÜÔ-Ð/EÓFÐFð;rcó—eZdZdd„Zy)r!Ncó¢—|€ t|«}tj|tj|««||_|€g}||_||_y©N)Ú_statusmessageÚ ExceptionÚ__init__rÚsysstrÚcodeÚheadersÚmessage)Úselfr6r8r7s rr4zErrorResponse.__init__sI€Ø ˆ?Ü$ TÓ*ˆGÜ×ј4¤§¡°Ó!9Ô:؈Œ Ø ˆ?؈G؈Œ ؈� r)NN)Ú__name__Ú __module__Ú __qualname__r4©rrr!r!~s„ôrr!có$—eZdZdZd„Zdd„Zd„Zy)Úcontinuereadera.File object wrapper to handle HTTP 100-continue. This is used by servers so they automatically handle Expect: 100-continue request headers. On first read of the request body, the 100 Continue response is sent. This should trigger the client into actually sending the request body. có.—||_||_d|_y)NF)ÚfÚ_writeÚ continued)r9rAÚwrites rr4zcontinuereader.__init__“s€ØˆŒØˆŒ ؈�rcó€—|jsd|_|jd«|jj|«S)NTsHTTP/1.1 100 Continue )rCrBrAÚread)r9Úamts rrFzcontinuereader.read˜s0€Ø�~Š~Ø!ˆDŒNØ �K‰KÐ8Ô 9Ø�v‰v�{‰{˜3ÓÐrcóB—|dvrt|j|«St‚)N)sclosesreadlines readliness__iter__)rrAÚAttributeError)r9Úattrs rÚ __getattr__zcontinuereader.__getattr__žs"€Ø ÐEÑ Eܘ4Ÿ6™6 4Ó(Ð (ÜÐrN)éÿÿÿÿ)r:r;r<Ú__doc__r4rFrKr=rrr?r?Šs„ñòó  ó rr?có†—tjj}tj|j |d«d«S)N)ÚErrorz Unknown errorr)Ú httpserverÚbasehttprequesthandlerÚ responsesrÚbytesurlr)r6rRs rr2r2¤s5€Ü×1Ñ1×;Ñ;€IÜ × Ñ ˜YŸ]™]¨4Ð1KÓLÈQÑOÓ PÐPrcó*—d||xs t|«fzS)Ns%d %s)r2)r6r8s rÚ statusmessagerU©s€Ø �t˜WÒ<¬°tÓ(<Ð=Ñ =Ð=rcóÔ—tjj||«}tjj|«rtj|«Stj|«S)z%stat fn if it exists, spath otherwise)ÚosÚpathÚjoinÚexistsÚstat)ÚspathÚfnÚcl_paths rÚget_statr_­sC€ä�g‰g�l‰l˜5 "Ó%€GÜ ‡w�w‡~�~�gÔÜ�w‰w�wÓÐä�w‰w�u‹~Ðrcó<—t|d«tjS)Ns 00changelog.i)r_r[ÚST_MTIME)r\s rÚ get_mtimerb¶s€Ü �EÐ+Ó ,¬T¯]©]Ñ ;Ð;rcóè—|jd«}|D]\}|dtjtjfvs6tj|vs$tj €ŒItj |vsŒ\yy)z9Determine if a path is safe to use for filesystem access.ó/rFT)ÚsplitrÚoscurdirÚospardirÚossepÚosaltsep)rXÚpartsÚparts rÚ ispathsaferlºsc€à �J‰J�tÓ €EÛˆà �Sœ(×+Ñ+¬X×->Ñ->Ð?Ñ ?Ü�~‰~ Ñ%Ü× Ñ Ñ,Ü×!Ñ! TÒ)áðð rcó‚—t|«sy|s:|xstj«}|� tjj |d«}tjj |j d«Ž}tjtjtj|««dxsd«}tjj ||«} tj|«t|d«5}|j«} ddd«||j2d<|j5 «|S#1swYŒ+xYw#t$rt!t"d«‚t$$r^} | j&t&j(k(rt!t*«‚t!t"t-j.| j0««‚d} ~ wwxYw) a+return a file inside directory with guessed Content-Type header fname always uses '/' as directory separator and isn't allowed to contain unusual path components. Content-Type is guessed using the mimetypes module. Return an empty string if fname is illegal or file not found. Nsstaticrdrz text/plainsrbsillegal filenames Content-Type)rlr Ú templatedirrWrXrYrerÚsysbytesÚ mimetypesÚ guess_typeÚfsdecoder[rrFÚ TypeErrorr!ÚHTTP_SERVER_ERRORÚOSErrorÚerrnoÚENOENTÚHTTP_NOT_FOUNDrÚ strtolocalÚstrerrorr7Ú setbodybytes) Ú templatepathÚ directoryÚfnameÚresÚtpÚfpathÚctrXÚfhÚdataÚerrs rÚ staticfiler†És]€ô �eÔ Øá Ø Ò 4œY×2Ñ2Ó4ˆØ ˆ>ÜŸ™Ÿ ™  R¨Ó3ˆIä �G‰G�L‰L˜%Ÿ+™+ dÓ+Ð ,€EÜ × Ñ Ü×ÑœX×.Ñ.¨uÓ5Ó6°qÑ9ÒJ¸]ó €Bô �7‰7�<‰<˜  5Ó )€Dð Ü �‰�Œ Ü �$˜Ô  "Ø—7‘7“9ˆD÷ð$&€C‡K�K�Ñ Ø×Ñ�TÔØ €J÷Ð ûä òDÜÔ-Ð/BÓCÐCÜ òØ �9‰9œŸ ™ Ò $ܤÓ/Ð /äÜ!¤8×#6Ñ#6°s·|±|Ó#Dóð ûð ús1Ã!D?Ã8D3Ä D?Ä3D<Ä8D?Ä?!F>Å AF9Æ9F>c#ótK—|r|r||z|z}||z|zdz}nd}d} |–—|dz }|r ||k\rd|z }d}Œ­w)z5count parity of horizontal stripes for easier readingérr=)Ú stripecountÚoffsetÚcountÚparitys rÚ paritygenr�òsfèø€á‘và˜vÑ%¨Ñ4ˆØ Ñ&¨;Ñ6¸Ñ:‰àˆØˆØ ØŠ Ø �‰ ˆÙ ˜5 KÒ/ؘ‘ZˆF؈Eð ùs‚68cót—|dd«xs.|dd«xs#tjjd«xsdS)z¾Return repo contact information or empty string. web.contact is the primary source, but if that is not set, try ui.username or $EMAIL as a fallback to display something useful. r scontactsuisusernamesEMAILr)rÚenvironr)Úconfigs rÚ get_contactr‘sE€ñ ˆv�zÓ"ò Ù �%˜Ó %ò ä × Ñ × Ñ  Ó )ò ð ð rcóæ—ddl}|jddd¬«}d}|rRd|vrNtj|j «j «j d«}|jd|«}||fS) aObtain the Content-Security-Policy header and nonce value. Returns a 2-tuple of the CSP header value and the nonce value. First value is ``None`` if CSP isn't enabled. Second value is ``None`` if CSP isn't enabled or if the CSP header doesn't need a nonce. rNr scspF)Ú untrusteds%nonce%ó=)Úuuidr�Úbase64Úurlsafe_b64encodeÚuuid4ÚbytesÚrstripÚreplace)rr•ÚcspÚnonces rÚ cspvaluesržsm€ó.ð �)‰)�F˜F¨eˆ)Ó 4€CØ €Eá ˆz˜SÑ Ü×(Ñ(¨¯©«×);Ñ);Ó<×CÑCÀDÓIˆØ�k‰k˜* eÓ,ˆà �ˆ:Ðrr1)r)+r–rvrprWr[Úi18nrrrrÚrr r r rPÚHTTP_OKÚ HTTP_CREATEDÚHTTP_NOT_MODIFIEDÚHTTP_BAD_REQUESTr"r(rxr%ÚHTTP_NOT_ACCEPTABLEÚHTTP_UNSUPPORTED_MEDIA_TYPErtrrr.Ú permhooksr3r!r?r2rUr_rbrlr†r�r‘ržr=rrÚr¨sÖðóÛ ÛÛ Û å÷÷õð�_‰_€ à €Ø€ ØÐØÐØÐ؀؀ØÐØÐØ!ÐØÐà × Ñ €òò4)GðfˆL€ ô �Iô ÷ñò4Qó >òò<ò ò&óRò" ó"r