Mercurial > hg
annotate contrib/fuzz/dirs_corpus.py @ 49511:117dcc4a0e67
revset: handle wdir() in `sort(..., -topo)`
The last apparent usage of `repo.changelog.parentrevs` in revsets is in
`children()`, but since the sets being operated on never include wdir(), it's
never called with `wdirrev` and the wdir() arg on the command line is
effectively ignored instead of aborting there. I'm not sure how to fix that.
Before (on a clone of hg):
$ python3.8 hg perf::revset --config extensions.perf=contrib/perf.py 'sort(all(), -topo)'
! wall 0.123663 comb 0.130000 user 0.130000 sys 0.000000 (best of 76)
After:
$ python3.8 hg perf::revset --config extensions.perf=contrib/perf.py 'sort(all(), -topo)'
! wall 0.123838 comb 0.130000 user 0.130000 sys 0.000000 (best of 75)
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 04 Oct 2022 12:34:50 -0400 |
parents | 6000f5b25c9b |
children |
rev | line source |
---|---|
43844
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 import argparse |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
2 import zipfile |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
3 |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
4 ap = argparse.ArgumentParser() |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
5 ap.add_argument("out", metavar="some.zip", type=str, nargs=1) |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
6 args = ap.parse_args() |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
7 |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf: |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 zf.writestr( |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 "greek-tree", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
11 "\n".join( |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
12 [ |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
13 "iota", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
14 "A/mu", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
15 "A/B/lambda", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
16 "A/B/E/alpha", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
17 "A/B/E/beta", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
18 "A/D/gamma", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
19 "A/D/G/pi", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
20 "A/D/G/rho", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
21 "A/D/G/tau", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
22 "A/D/H/chi", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
23 "A/D/H/omega", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
24 "A/D/H/psi", |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
25 ] |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
26 ), |
b7af8a02a304
fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
27 ) |