contrib/fuzz/dirs_corpus.py
author Joerg Sonnenberger <joerg@bec.de>
Mon, 28 Dec 2020 03:18:16 +0100
changeset 46200 bd31462a86a2
parent 43862 b7af8a02a304
child 48966 6000f5b25c9b
permissions -rw-r--r--
largefiles: redo heads interception The largefiles extension replaces the "heads" wire command and tries to redirect all uses towards the custom "lheads" wire command. As seen in issue6384, this doesn't currently work for ssh. Instead of hooking into the _callstream interface, properly register the command for the peer instance and monkeypatch the executor to do the redirection. This works transparently for both all kinds of peers and both for the batch and non-batch case. Differential Revision: https://phab.mercurial-scm.org/D9663

from __future__ import absolute_import, print_function

import argparse
import zipfile

ap = argparse.ArgumentParser()
ap.add_argument("out", metavar="some.zip", type=str, nargs=1)
args = ap.parse_args()

with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf:
    zf.writestr(
        "greek-tree",
        "\n".join(
            [
                "iota",
                "A/mu",
                "A/B/lambda",
                "A/B/E/alpha",
                "A/B/E/beta",
                "A/D/gamma",
                "A/D/G/pi",
                "A/D/G/rho",
                "A/D/G/tau",
                "A/D/H/chi",
                "A/D/H/omega",
                "A/D/H/psi",
            ]
        ),
    )