Commit Graph

4 Commits

Author SHA1 Message Date
FUJIWARA Katsunori
a8288b7afa censor: make various path forms available like other Mercurial commands
Before this patch, censored file should be exactly "a path relative to
repository root" regardless of current working directory, because "hg
censor" passes "path" to "repo.file()" directly without any
preparations.

To make various path forms available like other Mercurial commands,
this patch gets a target file path in the way of "hg parents FILE".

Getting "wctx" is relocated to reuse "wctx" for efficiency.
2015-07-17 00:22:16 +09:00
Matt Harbison
9741c43e48 tests: replace uses of 'seq' with portable 'seq.py' 2015-03-17 21:47:47 -04:00
Mike Edgar
c4ec7b1256 censor: add exchange tests, via local push/pull and bundle/unbundle
These tests exercise the edge cases of exchanging censored commits between
censor-aware Mercurial clients. These tests do not extend to cover
backwards-compatible exchange; such tests require a script which builds older
versions of Mercurial.

For more background on the censorship feature design, see:
http://mercurial.selenic.com/wiki/CensorPlan
2015-03-15 21:52:35 -04:00
Mike Edgar
995a7fa51f censor: add censor command to hgext with basic client-side tests
The censor command is a core extension which can replace the contents of a
historical file revision with a censor "tombstone" which can be exchanged
with older clients in place of the real revision data. The command rewrites
the filelog by copying revision-by-revision.

Care must be taken to expand the fulltext of the children of the censored
revision before copying them to the new filelog; they might be stored as
deltas against the uncensored revision, and those deltas will be invalidated.

For more background on the censorship feature design, see:
http://mercurial.selenic.com/wiki/CensorPlan
2015-03-15 21:52:17 -04:00