Mercurial > hg
comparison contrib/fuzz/revlog_corpus.py @ 43076:2372284d9457
formatting: blacken the codebase
This is using my patch to black
(https://github.com/psf/black/pull/826) so we don't un-wrap collection
literals.
Done with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
Differential Revision: https://phab.mercurial-scm.org/D6971
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:45:02 -0400 |
parents | c06f0ef9a5ba |
children | 54a6846ba96f |
comparison
equal
deleted
inserted
replaced
43075:57875cf423c9 | 43076:2372284d9457 |
---|---|
6 | 6 |
7 ap = argparse.ArgumentParser() | 7 ap = argparse.ArgumentParser() |
8 ap.add_argument("out", metavar="some.zip", type=str, nargs=1) | 8 ap.add_argument("out", metavar="some.zip", type=str, nargs=1) |
9 args = ap.parse_args() | 9 args = ap.parse_args() |
10 | 10 |
11 reporoot = os.path.normpath(os.path.join(os.path.dirname(__file__), | 11 reporoot = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')) |
12 '..', '..')) | |
13 # typically a standalone index | 12 # typically a standalone index |
14 changelog = os.path.join(reporoot, '.hg', 'store', '00changelog.i') | 13 changelog = os.path.join(reporoot, '.hg', 'store', '00changelog.i') |
15 # an inline revlog with only a few revisions | 14 # an inline revlog with only a few revisions |
16 contributing = os.path.join( | 15 contributing = os.path.join( |
17 reporoot, '.hg', 'store', 'data', 'contrib', 'fuzz', 'mpatch.cc.i') | 16 reporoot, '.hg', 'store', 'data', 'contrib', 'fuzz', 'mpatch.cc.i' |
17 ) | |
18 | 18 |
19 print(changelog, os.path.exists(changelog)) | 19 print(changelog, os.path.exists(changelog)) |
20 print(contributing, os.path.exists(contributing)) | 20 print(contributing, os.path.exists(contributing)) |
21 | 21 |
22 with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf: | 22 with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf: |