Mercurial > hg
view tests/test-check-code.t @ 30798:f50c0db50025
util: compression APIs to support revlog decompression
Previously, compression engines had APIs for performing revlog
compression but no mechanism to perform revlog decompression. This
patch changes that.
Revlog decompression is slightly more complicated than compression
because in the compression case there is (currently) only a single
engine that can be used at a time. However for decompression, a
revlog could contain chunks from multiple compression engines. This
means decompression needs to map to multiple engines and
decompressors. This functionality is outside the scope of this patch.
But it drives the decision for engines to declare a byte header
sequence that identifies revlog data as belonging to an engine and
an API for obtaining an engine from a revlog header.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 02 Jan 2017 13:27:20 -0800 |
parents | 13d94304c8da |
children | 8a17c541177f |
line wrap: on
line source
#require test-repo $ . "$TESTDIR/helpers-testrepo.sh" $ check_code="$TESTDIR"/../contrib/check-code.py $ cd "$TESTDIR"/.. New errors are not allowed. Warnings are strongly discouraged. (The writing "no-che?k-code" is for not skipping this file when checking.) $ hg locate -X contrib/python-zstandard -X hgext/fsmonitor/pywatchman | > sed 's-\\-/-g' | xargs "$check_code" --warnings --per-file=0 || false Skipping i18n/polib.py it has no-che?k-code (glob) mercurial/demandimport.py:312: > if os.environ.get('HGDEMANDIMPORT') != 'disable': use encoding.environ instead (py3) mercurial/encoding.py:54: > environ = os.environ use encoding.environ instead (py3) mercurial/encoding.py:56: > environ = os.environb use encoding.environ instead (py3) mercurial/encoding.py:61: > for k, v in os.environ.items()) use encoding.environ instead (py3) mercurial/encoding.py:203: > for k, v in os.environ.items()) use encoding.environ instead (py3) Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob) Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob) mercurial/policy.py:45: > policy = os.environ.get('HGMODULEPOLICY', policy) use encoding.environ instead (py3) Skipping mercurial/statprof.py it has no-che?k-code (glob) [1] @commands in debugcommands.py should be in alphabetical order. >>> import re >>> commands = [] >>> with open('mercurial/debugcommands.py', 'rb') as fh: ... for line in fh: ... m = re.match("^@command\('([a-z]+)", line) ... if m: ... commands.append(m.group(1)) >>> scommands = list(sorted(commands)) >>> for i, command in enumerate(scommands): ... if command != commands[i]: ... print('commands in debugcommands.py not sorted; first differing ' ... 'command is %s; expected %s' % (commands[i], command)) ... break