Mercurial > public > mercurial-scm > hg-stable
diff mercurial/utils/compression.py @ 46122:84130fd74a22
revlog: support none compression
revlog files had uncompressed revlog entries support since forever, but
it wasn't selectable or exposed explicitly. It is occassionally useful
for performance testing as it avoids the latency of zlib or zstd. It
also has the nice side effect of providing a non-default compression
engine out-of-the-box.
Differential Revision: https://phab.mercurial-scm.org/D9572
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Sun, 13 Dec 2020 00:19:03 +0100 |
parents | 89a2afe31e82 |
children | 471cd86c8eb4 |
line wrap: on
line diff
--- a/mercurial/utils/compression.py Thu Nov 12 10:41:03 2020 -0800 +++ b/mercurial/utils/compression.py Sun Dec 13 00:19:03 2020 +0100 @@ -617,8 +617,10 @@ def wireprotosupport(self): return compewireprotosupport(b'none', 0, 10) - # We don't implement revlogheader because it is handled specially - # in the revlog class. + # revlog special cases the uncompressed case, but implementing + # revlogheader allows forcing uncompressed storage. + def revlogheader(self): + return b'\0' def compressstream(self, it, opts=None): return it