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: //proc/thread-self/root/lib64/python2.7/site-packages/hgext/win32text.pyo
�
1�3\c@@s�dZddlmZddlZddlmZddlmZddlm	Z	m
Z
ddlmZdZ
iZe
je�Zed	d
de�ejdej�Zid
d6dd6Zidd6dd6Zdddd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zied6ed6ed6ed6ed 6ed!6ed"6ed#6Z d$�Z!d%�Z"d&�Z#d'�Z$d(�Z%dS()sperform automatic newline conversion (DEPRECATED)

  Deprecation: The win32text extension requires each user to configure
  the extension again and again for each clone since the configuration
  is not copied when cloning.

  We have therefore made the ``eol`` as an alternative. The ``eol``
  uses a version controlled file for its configuration and each clone
  will therefore use the right settings from the start.

To perform automatic newline conversion, use::

  [extensions]
  win32text =
  [encode]
  ** = cleverencode:
  # or ** = macencode:

  [decode]
  ** = cleverdecode:
  # or ** = macdecode:

If not doing conversion, to make sure you do not commit CRLF/CR by accident::

  [hooks]
  pretxncommit.crlf = python:hgext.win32text.forbidcrlf
  # or pretxncommit.cr = python:hgext.win32text.forbidcr

To do the same check on a server to prevent CRLF/CR from being
pushed or pulled::

  [hooks]
  pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
  # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
i(tabsolute_importN(t_(tshort(tpycompatt	registrar(t
stringutilsships-with-hg-coret	win32texttwarntdefaults	(^|[^
])
tCRLFs
tCRs
tclevertmaccC@sU||krQ|rQ|rQ|rQ|jtd�|t||jjd�f�ndS(Ns�WARNING: %s already has %s line endings
and does not need EOL conversion by the win32text plugin.
Before your next commit, please reconsider your encode/decode settings in 
Mercurial.ini or %s.
thgrc(RRt
newlinestrtvfstjoin(tstnewlinetuitrepotfilename((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pytchecknewlineNscK@s t|d|�tjd|�S(Ns
s\1
(Rtre_single_lftsub(Rtcmdtkwargs((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt
dumbdecodeZscC@s|jdd�S(Ns
s
(treplace(RR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt
dumbencode_scK@s t|d|�|jdd�S(Ns
s
(RR(RRR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt
macdumbdecodebscC@s|jdd�S(Ns
s
(R(RR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt
macdumbencodefscK@s#tj|�st|||�S|S(N(RtbinaryR(RRR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pytcleverdecodeiscC@s tj|�st||�S|S(N(RR R(RR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pytcleverencodens
cK@s#tj|�st|||�S|S(N(RR R(RRR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt	macdecodesscC@s tj|�st||�S|S(N(RR R(RR((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt	macencodexs
sdumbdecode:sdumbencode:s
cleverdecode:s
cleverencode:smacdumbdecode:smacdumbencode:s
macdecode:s
macencode:cK@s�t}t�}|d}xtj|jj�||j�dd�D]�}	||	}
x�|
j�D]�}||ksc||ksc||
kr�qcn|j|�|
|j	�}t
j|�rc||krc|s�|jt
d�t|�n|jt
d�t|
j��|f�t}qcqcWqFW|r||dkr|t|j�}
t|}|jt
d�|
|
||f�n|S(Nttipii����s=attempt to commit or push text file(s) using %s line endings
s
in %s: %s
tpretxnchangegroups�
To prevent this mistake in your local repository,
add to Mercurial.ini or .hg/hgrc:

[hooks]
pretxncommit.%s = python:hgext.win32text.forbid%s

and also consider adding:

[extensions]
win32text =
[encode]
** = %sencode:
[decode]
** = %sdecode:
(tFalsetsetRtxranget	changelogttiprevtrevtfilestaddtdataRR RRRRtnodetTruetlowert	filterstr(RRthooktypeR0RRthalttseenR%R,tctfR/tcrlftfilter((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt
forbidnewline�s.	

$
)

cK@st||||d|�S(Ns
(R;(RRR4R0R((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt
forbidcrlf�scK@st||||d|�S(Ns
(R;(RRR4R0R((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pytforbidcr�scC@sA|j�sdSx*tj�D]\}}|j||�qWdS(N(tlocalt_filterst	iteritemst
adddatafilter(RRtnametfn((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt	reposetup�scC@s,|jdd�r(|jtd��ndS(NRRsKwin32text is deprecated: https://mercurial-scm.org/wiki/Win32TextExtension
(t
configboolRR(R((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pytextsetup�s(&t__doc__t
__future__Rtretmercurial.i18nRtmercurial.nodeRt	mercurialRRtmercurial.utilsRt
testedwithtconfigtablet
configitemR1tcompilet	MULTILINERRR3tNoneRRRRRR!R"R#R$R?R;R<R=RDRF(((s5/usr/lib64/python2.7/site-packages/hgext/win32text.pyt<module>*sJ								
	+