# HG changeset patch # User Pierre-Yves DAVID # Date 2022-06-05 05:16:29 # Node ID 5acbc550d9875a1740cfcb503754cfd54ec1eb9a # Parent ef0b0f94d2e5838fd91bbb1f2e162f96f7fb1324 compare-disco: support for `file` nodes specification This leverage the `nodefromfile` feature in core. This make it possible for callers to no longer pay the subset computation cost (and to make sure the subset is the right one, even when the base repository is different) diff --git a/contrib/perf-utils/compare-discovery-case b/contrib/perf-utils/compare-discovery-case --- a/contrib/perf-utils/compare-discovery-case +++ b/contrib/perf-utils/compare-discovery-case @@ -99,7 +99,11 @@ assert set(VARIANTS.keys()) == set(VARIA def parse_case(case): case_type, case_args = case.split('-', 1) - case = (case_type,) + tuple(int(x) for x in case_args.split('-')) + if case_type == 'file': + case_args = (case_args,) + else: + case_args = tuple(int(x) for x in case_args.split('-')) + case = (case_type,) + case_args return case @@ -115,6 +119,8 @@ def to_revsets(case): return '::randomantichain(all(), "%d")' % case[1] elif t == 'rev': return '::%d' % case[1] + elif t == 'file': + return '::nodefromfile("%s")' % case[1] else: assert False