https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/hgext/__pycache__/win32text.cpython-310.pyc
o

�]Lb��	@s*dZddlmZddlZddlmZddlmZddlm	Z	m
Z
mZmZddl
mZdZiZe�e�Zed	d
dd�e�d
ej�Zddd�Zddd�Zd2dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zeeeeeeeed%�Z d&d'�Z!d(d)�Z"d*d+�Z#d,d-�Z$d.d/�Z%d0d1�Z&dS)3aperform 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
�)�absolute_importN)�_)�short)�cmdutil�
extensions�pycompat�	registrar)�
stringutilsships-with-hg-core�	win32text�warnT)�defaults	(^|[^
])
sCRLFsCR)�
�
scleversmaccCsL||vr|r |r"|r$|�td�|t||j�d�f�dSdSdSdSdS)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.
shgrc)�warnr�
newlinestr�vfs�join)�s�newline�ui�repo�filename�r�1/usr/lib/python3/dist-packages/hgext/win32text.py�checknewlineOs����rcKst|dfi|��t�d|�S)Nr
s\1
)r�re_single_lf�sub�r�cmd�kwargsrrr�
dumbdecode`sr cC�|�dd�S)Nr
�
��replace�rrrrr�
dumbencodef�r&cKst|dfi|��|�dd�S�Nrr")rr$rrrr�
macdumbdecodejsr)cCr!r(r#r%rrr�
macdumbencodeor'r*cK� t�|�st||fi|��S|S�N)r	�binaryr rrrr�cleverdecodes�
r.cC�t�|�s
t||�S|Sr,)r	r-r&r%rrr�cleverencodey�

r1cKr+r,)r	r-r)rrrr�	macdecoder/r3cCr0r,)r	r-r*r%rrr�	macencode�r2r4)sdumbdecode:sdumbencode:s
cleverdecode:s
cleverencode:smacdumbdecode:smacdumbencode:s
macdecode:s
macencode:cKs
d}t�}|d}t�|j��||��dd�D]L}	||	}
|
��D]A}||vs1||vs1||
vr2q#|�|�|
|��}t	�
|�sd||vrd|sS|�td�t
|�|�td�t|
���|f�d}q#q|r�|dkr�t
|��}
t|}|�td	�|
|
||f�|S)
NFstip����s=attempt to commit or push text file(s) using %s line endings
s
in %s: %s
Tspretxnchangegroups�
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:
)�setr�xrange�	changelog�tiprev�rev�files�add�datar	r-rrrr�node�lower�	filterstr)rr�hooktyper?rr�halt�seen�tipr;�c�fr>�crlf�filterrrr�
forbidnewline�sH�
������
��rJcK�t||||dfi|��S)Nr
�rJ�rrrBr?rrrr�
forbidcrlf��rNcKrK)NrrLrMrrr�forbidcr�rOrPcCs0|��sdSt�t�D]
\}}|�||�qdSr,)�localr�	iteritems�_filters�
adddatafilter)rr�name�fnrrr�	reposetup�s
�rWcOs�|j}|���(|ddD]}	|�|	�}
|
dur'|
jr'|j|	|
jd|
jd�qWd�n1s2wY||||||g|�Ri|��S)NsrevertrT)�
p1_tracked�p2_info)�dirstate�parentchange�	get_entryrX�update_file�trackedrY)�origr�ctx�names�uipathfn�actions�argsr�dsr�entryrrr�wrap_revert�s 

����rgcCs,|�dd�r
|�td��t�tdt�dS)Nr
rsKwin32text is deprecated: https://mercurial-scm.org/wiki/Win32TextExtension
�_performrevert)�
configboolrrr�wrapfunctionrrg)rrrr�extsetup�s��rk)NNN)'�__doc__�
__future__r�re�mercurial.i18nr�mercurial.noder�	mercurialrrrr�mercurial.utilsr	�
testedwith�configtable�
configitem�compile�	MULTILINErrrArr r&r)r*r.r1r3r4rSrJrNrPrWrgrkrrrr�<module>sT$
�


�6

https://t.me/RX1948 - 2025