diff --git a/docs/benchmarks.rst b/docs/benchmarks.rst index 617cfa829add86f337868c1baeb2779caeb36b1f_ZG9jcy9iZW5jaG1hcmtzLnJzdA==..1ffffb032034543293a9b80fb76f6403d66f56dc_ZG9jcy9iZW5jaG1hcmtzLnJzdA== 100644 --- a/docs/benchmarks.rst +++ b/docs/benchmarks.rst @@ -156,6 +156,10 @@ Target repository must have at least that many visible revision for this benchmark to run. +- `compatible-revision-range=<revset>`: + + The range of revision compatible with this changes. + variants -------- diff --git a/python-libs/poulpe/benchmarks.py b/python-libs/poulpe/benchmarks.py index 617cfa829add86f337868c1baeb2779caeb36b1f_cHl0aG9uLWxpYnMvcG91bHBlL2JlbmNobWFya3MucHk=..1ffffb032034543293a9b80fb76f6403d66f56dc_cHl0aG9uLWxpYnMvcG91bHBlL2JlbmNobWFya3MucHk= 100644 --- a/python-libs/poulpe/benchmarks.py +++ b/python-libs/poulpe/benchmarks.py @@ -31,6 +31,14 @@ else: core['graph']['visible-revision-count'] = min(new_revs, core_revs) + core_range = core.get('compatible-revision-range') + new_range = new.get('compatible-revision-range') + if new_range is not None: + if core_range is None: + core['compatible-revision-range'] = new_range + else: + rev_range = f"({core_range}) and ({new_range})" + core['compatible-revision-range'] = rev_range def get_benchmark(path_def): """get a benchmark from path applying possible variant selection on the way diff --git a/suites/hg/scheduling/auto-cases b/suites/hg/scheduling/auto-cases index 617cfa829add86f337868c1baeb2779caeb36b1f_c3VpdGVzL2hnL3NjaGVkdWxpbmcvYXV0by1jYXNlcw==..1ffffb032034543293a9b80fb76f6403d66f56dc_c3VpdGVzL2hnL3NjaGVkdWxpbmcvYXV0by1jYXNlcw== 100755 --- a/suites/hg/scheduling/auto-cases +++ b/suites/hg/scheduling/auto-cases @@ -150,6 +150,11 @@ return False # we can't know if min_revs > revs: return False + rev_range = constraints.get('compatible-revision-range') + if rev_range is not None: + compatible = list_mercurial_hashes(base_dir, rev_range) + if changeset not in compatible: + return False return True