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/self/root/proc/thread-self/root/usr/lib64/python2.7/site-packages/hgext/censor.pyo
�
1�3\c	@@s�dZddlmZddlmZddlmZddlmZm	Z	m
Z
iZe	je�ZdZ
eddd	d
ed�ed�fd
dd
ed�ed�fged�dej�d
d
d��Zd
d
d�ZdS(s�erase 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.
i(tabsolute_import(t_(tshort(terrort	registrartscmutilsships-with-hg-coretcensortrtrevts#censor file from specified revisiontREVttt	tombstonesreplacement tombstone datatTEXTs-r REV [-t TEXT] [FILE]thelpcategorycK@sC|j��1|j��t||||||�SWdQXWdQXdS(N(twlocktlockt	_docensor(tuitrepotpathRRtopts((s2/usr/lib64/python2.7/site-packages/hgext/censor.pyR/s

c	K@s�|stjtd���n|s<tjtd���n|d}tj||f�}|j�st|j��dkr�tjtd���n|j�d}|j	|�}t|�s�tjtd���ntj
|||�j�}y||}	Wn*tk
r/tjtd�|��nXy|	j
|�}
Wn-tjk
rrtjtd�|��nX|
j�}g}xO|j�D]A}
||
}||kr�|j|�|kr�|j|�q�q�W|r3d	jg|D]}t|j��^q��}tjtd
�|dtd���n|j�}|	j�g|D]}|j�^qOkr�tjtd
�dtd���n|jd��}|j||d|�WdQXdS(Ns must specify file path to censorsmust specify revision to censoris%can only specify an explicit filenameis"cannot censor file with no historysinvalid revision identifier %ss"file does not exist at revision %ss, s cannot censor file in heads (%s)thintsclean/delete and commit firstscannot censor working directorysclean/delete/update firstRR(RtAbortRtNoneRtmatchtanypatstlentfilestfilet	revsingleRtKeyErrortfilectxtLookupErrortfilenodetheadstappendtjoinRtnodetparentsttransactiontcensorrevision(RRRRRRtwctxtmtflogtctxtfctxtfnodeR#theadnodethctctheadlisttwptpttr((s2/usr/lib64/python2.7/site-packages/hgext/censor.pyR8sJ
$

!.+N(t__doc__t
__future__Rtmercurial.i18nRtmercurial.nodeRt	mercurialRRRtcmdtabletcommandt
testedwithtCATEGORY_MAINTENANCERR(((s2/usr/lib64/python2.7/site-packages/hgext/censor.pyt<module>s!