403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/__pycache__/win32mbcs.cpython-39.pyc
a

�+�b��@s�dZddlmZddlZddlZddlmZddlmZm	Z	ddl
mZmZm
Z
mZdZiZe�e�Zedd	d
d�d�dad
d�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�ZdZdZdZd Zd!d"�ZdS)#a�allow the use of MBCS paths with problematic encodings

Some MBCS encodings are not good for some path operations (i.e.
splitting path, case conversion, etc.) with its encoded bytes. We call
such a encoding (i.e. shift_jis and big5) as "problematic encoding".
This extension can be used to fix the issue with those encodings by
wrapping some functions to convert to Unicode string before path
operation.

This extension is useful for:

- Japanese Windows users using shift_jis encoding.
- Chinese Windows users using big5 encoding.
- All users who use a repository with one of problematic encodings on
  case-insensitive file system.

This extension is not needed for:

- Any user who use only ASCII chars in path.
- Any user who do not use any of problematic encodings.

Note that there are some limitations on using this extension:

- You should use single encoding in one repository.
- If the repository path ends with 0x5c, .hg/hgrc cannot be read.
- win32mbcs is not compatible with fixutf8 extension.

By default, win32mbcs uses encoding.encoding decided by Mercurial.
You can specify the encoding by config option::

 [win32mbcs]
 encoding = sjis

It is useful for the users who want to commit with UTF-8 log message.
�)�absolute_importN)�_)�getattr�setattr)�encoding�error�pycompat�	registrarsships-with-hg-core�	win32mbcs�encodingcCstjS�N)r�r
r
�5/usr/lib64/python3.9/site-packages/hgext/win32mbcs.py�<lambda>K�r)�defaultcCs�t|t�r0|�t�}||�t�kr&|Std��nTt|t�rHttt|��St|t�r\tt|�St|t	�r�|�
�D]\}}t|�||<qn|S)NsNot local encoding)�
isinstance�bytes�decode�	_encoding�encode�UnicodeError�tuple�map�list�dict�items)�argZuarg�k�vr
r
rrQs






rcCsnt|tj�r|�t�St|t�r.ttt|��St|t�rBtt|�St|t�rj|�	�D]\}}t|�||<qT|Sr)
rr�unicoderrrrrrr)rrrr
r
rras




rcCsBzt|�}Wnty"|}Yn0|r>|ddvr>|tj7}|S)N���s:/\)rrrZossep)�s�usr
r
r�	appendsepns

r$cCsl|D] }t||�r||i|��Sqz||||�i||����WStyft�td�t��Yn0dS)Ns8[win32mbcs] filename conversion failed with %s encoding
)rrrZAbortrr)�funcZargtype�encZdec�args�kwdsrr
r
r�basewrapperys
��r)cCst|tjtt||�Sr)r)rr rr�r%r'r(r
r
r�wrapper�sr+cCst|ttt||�Sr)r)�strrrr*r
r
r�reversewrapper�sr-cCsB|rt|�}t|d�|d<d|vr4t|d�|d<||i|��S)Nrspath)rr$r*r
r
r�wrapperforlistdir�sr.csJ|�dd�\}}tj|}t||����fdd�}�j|_t|||�dS)N�.�cs��||�Srr
)r'r(�r%r+r
r�f�szwrapname.<locals>.f)�rsplit�sys�modulesr�__name__r)�namer+�moduler2r
r1r�wrapname�s

r9s:os.path.join os.path.split os.path.splitext
 os.path.normpath os.makedirs mercurial.util.endswithsep
 mercurial.util.splitpath mercurial.util.fscasesensitive
 mercurial.util.fspath mercurial.util.pconvert mercurial.util.normpath
 mercurial.util.checkwinfilename mercurial.util.checkosfilename
 mercurial.util.splitsRmercurial.encoding.upper mercurial.encoding.lower
 mercurial.util._filenamebytestrsos.path.splituncs�big5 big5-tw csbig5 big5hkscs big5-hkscs
 hkscs cp932 932 ms932 mskanji ms-kanji shift_jis csshiftjis shiftjis
 sjis s_jis shift_jis_2004 shiftjis2004 sjis_2004 sjis2004
 shift_jisx0213 shiftjisx0213 sjisx0213 s_jisx0213 950 cp950 ms950 cCs�tjjs$tjdkr$|�td��dS|�dd�at�	�t
��vr�t��D]}t
|t�qHtjrvt��D]}t
|t�qft
dt�t
dt�t��D]}t
|t�q�dtjvr�|�dt�dS)	Nscygwins.[win32mbcs] cannot activate on this platform.
r
rsmercurial.util.listdirsmercurial.windows.listdirs--debugs([win32mbcs] activated with encoding: %s
)�os�path�supports_unicode_filenamesrZsysplatform�warnrZconfigr�lower�problematic_encodings�split�funcsr9r+Z	iswindows�winfuncsr.�rfuncsr-r4�argvZwritenoi18n)Zuir2r
r
r�extsetup�s(�


�rE) �__doc__Z
__future__rr:r4Zmercurial.i18nrZmercurial.pycompatrrZ	mercurialrrrr	Z
testedwithZconfigtableZ
configitemrrrr$r)r+r-r.r9rArCrBr?rEr
r
r
r�<module>s8#
�



Youez - 2016 - github.com/yon3zu
LinuXploit