##// END OF EJS Templates
revlog: move censor logic out of censor extension...
revlog: move censor logic out of censor extension The censor extension is doing very low-level things with revlogs. It is fundamentally impossible for this logic to remain in the censor extension while support multiple storage backends: we need each storage backend to implement censor in its own storage-specific way. This commit effectively moves the revlog-specific censoring code to be a method of revlogs themselves. We've defined a new API on the file storage interface for censoring an individual node. Even though the current censoring code doesn't use it, the API requires a transaction instance because it logically makes sense for storage backends to require an active transaction (which implies a held write lock) in order to rewrite storage. After this commit, the censor extension has been reduced to boilerplate precondition checking before invoking the generic storage API. I tried to keep the code as similar as possible. But some minor changes were made: * We use self._io instead of instantiating a new revlogio instance. * We compare self.version against REVLOGV0 instead of != REVLOGV1 because presumably all future revlog versions will support censoring. * We use self.opener instead of going through repo.svfs (we don't have a handle on the repo instance from a revlog). * "revlog" dropped * Replace "flog" with "self". Differential Revision: https://phab.mercurial-scm.org/D4656
Gregory Szorc -
r39814:a6b3c4c1 default
Show More
Name Size Modified Last Commit Author
/ hgext / infinitepush
README Loading ...
__init__.py Loading ...
bundleparts.py Loading ...
common.py Loading ...
fileindexapi.py Loading ...
indexapi.py Loading ...
schema.sql Loading ...
sqlindexapi.py Loading ...
store.py Loading ...

## What is it?

This extension adds ability to save certain pushes to a remote blob store
as bundles and to serve commits from remote blob store.
The revisions are stored on disk or in everstore.
The metadata are stored in sql or on disk.

## Config options

infinitepush.branchpattern: pattern to detect a scratchbranch, example
're:scratch/.+'

infinitepush.indextype: disk or sql for the metadata
infinitepush.reponame: only relevant for sql metadata backend, reponame to put in
sql

infinitepush.indexpath: only relevant for ondisk metadata backend, the path to
store the index on disk. If not set will be under .hg
in a folder named filebundlestore

infinitepush.storepath: only relevant for ondisk metadata backend, the path to
store the bundles. If not set, it will be
.hg/filebundlestore