def raw_diff_range(repo, base, new, context_lines=None):
    args = [
        "diff",
        base + "..." + new,
        "-M",  # automatically detect moves/renames
    ]

    if context_lines:
        args.append("--unified=" + str(context_lines))

    result = repo(*args)
    return result
Configures the given netutils_mod mock to work with the given config.
dataset/ETHPy150Open bloomberg/phabricator-tools/py/phl/phlgit_diff.py/raw_diff_range--crossover with--dataset/ETHPy150Open ganeti/ganeti/test/py/cmdlib/testsupport/netutils_mock.py/SetupDefaultNetutilsMock