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__/censor.cpython-310.pyc
o

�]Lb��	@s�dZddlmZddlmZddlmZddlmZm	Z	m
Z
mZiZe
�
e�Z
dZe
ddd	d
ed�ed�fd
dd
ed�ed�fged�e
jd�ddd��Zddd�ZdS)anerase file content at a given revision

The censor command instructs Mercurial to erase all content of a file at a given
revision *without updating the changeset hash.* This allows existing history to
remain valid while preventing future clones/pulls from receiving the erased
data.

Typical uses for censor are due to security or legal requirements, including::

 * Passwords, private keys, cryptographic material
 * Licensed data/code/libraries for which the license has expired
 * Personally Identifiable Information or other private data

Censored nodes can interrupt mercurial's typical operation whenever the excised
data needs to be materialized. Some commands, like ``hg cat``/``hg revert``,
simply fail when asked to produce censored data. Others, like ``hg verify`` and
``hg update``, must be capable of tolerating censored data to continue to
function in a meaningful way. Such commands only tolerate censored file
revisions if they are allowed by the "censor.policy=ignore" config option.

A few informative commands such as ``hg grep`` will unconditionally
ignore censored data and merely report that it was encountered.
�)�absolute_import)�_)�short)�error�
logcmdutil�	registrar�scmutilsships-with-hg-core�censor�rsrev�s#censor file from specified revisionsREV�ts	tombstonesreplacement tombstone datasTEXTs-r REV [-t TEXT] [FILE])�helpcategoryc	Ks||���0|���t|||||fi|��Wd�Wd�S1s'wYWd�dS1s7wYdS)N)�wlock�lock�	_docensor)�ui�repo�path�rev�	tombstone�opts�r�./usr/lib/python3/dist-packages/hgext/censor.py�censor4sR�rcKs�|s	t�td���|st�td���|d}t�||f�}|��s)t|���dkr0t�td���|��d}|�|�}t|�sFt�td���t	�
|||���}z||}	Wntyet�td�|��wz|	�
|�}
Wntjy~t�td�|��w|
��}g}|��D]}
||
}||vr�|�|�|kr�|�|�q�|r�d	�d
d�|D��}tjtd�|td
�d��|��}|	��dd�|D�vr�tjtd�td�d��|�d��}|j|||d�Wd�dS1s�wYdS)Ns must specify file path to censorsmust specify revision to censor�s%can only specify an explicit filenamers"cannot censor file with no historysinvalid revision identifier %ss"file does not exist at revision %ss, cSsg|]}t|����qSr)r�node)�.0�crrr�
<listcomp>jsz_docensor.<locals>.<listcomp>s cannot censor file in heads (%s)sclean/delete and commit first)�hintcSsg|]}|���qSr)r)r�prrrrqsscannot censor working directorysclean/delete/update firstr	)r)r�Abortrr�match�anypats�len�files�filer�	revsingler�KeyError�filectx�LookupError�filenode�heads�append�join�parentsr�transaction�censorrevision)rrrrrr�wctx�m�flog�ctx�fctx�fnoder,�headnode�hc�headlist�wp�trrrrrHsZ
��
�
��"�rN)rr)�__doc__�
__future__r�mercurial.i18nr�mercurial.noder�	mercurialrrrr�cmdtable�command�
testedwith�CATEGORY_MAINTENANCErrrrrr�<module>s.
��
�

https://t.me/RX1948 - 2025