korsygfhrtzangaiide
Elepffwdsff
/
lib64
/
python2.7
/
site-packages
/
hgext
/
Upload FileeE
HOME
� Hq�Qc @ s� d Z d d l Z d d l Z d d l m Z d d l m Z m Z d Z d a d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d Z d Z d Z d Z d � Z d S( s� 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. i����N( t _( t utilt encodingt internalc C s� t | t � rF | j t � } | | j t � k r7 | St d � � n} t | t � rh t t t | � � St | t � r� t t | � St | t � r� x- | j � D] \ } } t | � | | <q� Wn | S( Ns Not local encoding( t isinstancet strt decodet _encodingt encodet UnicodeErrort tuplet mapt listt dictt items( t argt uargt kt v( ( s5 /usr/lib64/python2.7/site-packages/hgext/win32mbcs.pyR 7 s c C s� t | t � r | j t � St | t � r>