~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

bugfix from Aaron Bentley - bzrlib.graph.max_distance had an off-by-1 error

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
            continue
31
31
        if ancestor not in distances:
32
32
            return None
33
 
        if best is None or distances[ancestor] > best:
 
33
        if best is None or distances[ancestor]+1 > best:
34
34
            best = distances[ancestor] + 1
35
35
    return best
36
36