Mercurial > hg
view contrib/fuzz/revlog_corpus.py @ 42070:675775c33ab6
zstandard: vendor python-zstandard 0.11
The upstream source distribution from PyPI was extracted. Unwanted
files were removed.
The clang-format ignore list was updated to reflect the new source
of files.
The project contains a vendored copy of zstandard 1.3.8. The old
version was 1.3.6. This should result in some minor performance wins.
test-check-py3-compat.t was updated to reflect now-passing tests on
Python 3.8.
Some HTTP tests were updated to reflect new zstd compression output.
# no-check-commit because 3rd party code has different style guidelines
Differential Revision: https://phab.mercurial-scm.org/D6199
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 04 Apr 2019 17:34:43 -0700 |
parents | c06f0ef9a5ba |
children | 2372284d9457 |
line wrap: on
line source
from __future__ import absolute_import, print_function import argparse import os import zipfile ap = argparse.ArgumentParser() ap.add_argument("out", metavar="some.zip", type=str, nargs=1) args = ap.parse_args() reporoot = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')) # typically a standalone index changelog = os.path.join(reporoot, '.hg', 'store', '00changelog.i') # an inline revlog with only a few revisions contributing = os.path.join( reporoot, '.hg', 'store', 'data', 'contrib', 'fuzz', 'mpatch.cc.i') print(changelog, os.path.exists(changelog)) print(contributing, os.path.exists(contributing)) with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf: if os.path.exists(changelog): with open(changelog) as f: zf.writestr("00changelog.i", f.read()) if os.path.exists(contributing): with open(contributing) as f: zf.writestr("contributing.i", f.read())