# censor

Contents

- Description
- Commands
  - Repository maintenance

erase file content at a given revision

# Description

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 As having a censored version in a checkout is impractical. The current head revisions of the repository are checked. If the revision to be censored is in any of them the command will abort. You can configure this behavior using the following option:

> censor.policy
>   censor.policy

# Commands

## Repository maintenance

### censor

    hg censor -r REV [-t TEXT] [FILE]

Options:

`-r, --rev <REV[+]>`
| censor file from specified revision
`--check-heads` | check that repository heads are not affected (default: True)
`-t, --tombstone <TEXT>`
| replacement tombstone data

[+] marked option can be specified multiple times