| 1 |
$ cat >> $HGRCPATH <<EOF |
| 2 |
> [censor] |
| 3 |
> policy=ignore |
| 4 |
> EOF |
| 5 |
|
| 6 |
$ mkdir r |
| 7 |
$ cd r |
| 8 |
$ hg init |
| 9 |
$ echo secret > target |
| 10 |
$ hg commit -Am "secret" |
| 11 |
adding target |
| 12 |
$ touch bystander |
| 13 |
$ hg commit -Am "innocent" |
| 14 |
adding bystander |
| 15 |
$ echo erased-secret > target |
| 16 |
$ hg commit -m "erased secret" |
| 17 |
$ hg censor target --config extensions.censor= -r ".^^" |
| 18 |
checking for the censored content in 1 heads |
| 19 |
checking for the censored content in the working directory |
| 20 |
censoring 1 file revisions |
| 21 |
$ hg update ".^" |
| 22 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 23 |
$ cat target |
| 24 |
$ hg update tip |
| 25 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |