mercurial/hbisect.py
changeset 35128 fd8b6b183073
parent 30389 e124e83fd159
child 35129 ec25c8275cfa
equal deleted inserted replaced
35127:fa2395db68c6 35128:fd8b6b183073
    19 )
    19 )
    20 from . import (
    20 from . import (
    21     error,
    21     error,
    22 )
    22 )
    23 
    23 
    24 def bisect(changelog, state):
    24 def bisect(repo, state):
    25     """find the next node (if any) for testing during a bisect search.
    25     """find the next node (if any) for testing during a bisect search.
    26     returns a (nodes, number, good) tuple.
    26     returns a (nodes, number, good) tuple.
    27 
    27 
    28     'nodes' is the final result of the bisect if 'number' is 0.
    28     'nodes' is the final result of the bisect if 'number' is 0.
    29     Otherwise 'number' indicates the remaining possible candidates for
    29     Otherwise 'number' indicates the remaining possible candidates for
    30     the search and 'nodes' contains the next bisect target.
    30     the search and 'nodes' contains the next bisect target.
    31     'good' is True if bisect is searching for a first good changeset, False
    31     'good' is True if bisect is searching for a first good changeset, False
    32     if searching for a first bad one.
    32     if searching for a first bad one.
    33     """
    33     """
    34 
    34 
       
    35     changelog = repo.changelog
    35     clparents = changelog.parentrevs
    36     clparents = changelog.parentrevs
    36     skip = set([changelog.rev(n) for n in state['skip']])
    37     skip = set([changelog.rev(n) for n in state['skip']])
    37 
    38 
    38     def buildancestors(bad, good):
    39     def buildancestors(bad, good):
    39         # only the earliest bad revision matters
    40         # only the earliest bad revision matters