/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/_annotator_py.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-30 22:17:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6642.
  • Revision ID: jelmer@jelmer.uk-20170530221731-k3djl8mbldt2gmoi
Fix doc generation with sphinx.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009 Canonical Ltd
 
1
# Copyright (C) 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
16
16
 
17
17
"""Functionality for doing annotations in the 'optimal' way"""
18
18
 
19
 
from bzrlib.lazy_import import lazy_import
 
19
from __future__ import absolute_import
 
20
 
 
21
from .lazy_import import lazy_import
20
22
lazy_import(globals(), """
21
 
from bzrlib import annotate # Must be lazy to avoid circular importing
 
23
from breezy import (
 
24
    annotate, # Must be lazy to avoid circular importing
 
25
    graph as _mod_graph,
 
26
    patiencediff,
 
27
    )
22
28
""")
23
 
from bzrlib import (
 
29
from . import (
24
30
    errors,
25
 
    graph as _mod_graph,
26
31
    osutils,
27
 
    patiencediff,
28
32
    ui,
29
33
    )
30
34
 
66
70
        self._num_needed_children[key] = 1
67
71
        vf_keys_needed = set()
68
72
        ann_keys_needed = set()
69
 
        needed_keys = set([key])
 
73
        needed_keys = {key}
70
74
        while needed_keys:
71
75
            parent_lookup = []
72
76
            next_parent_map = {}
277
281
            # Backwards compatibility, break up the heads into pairs and
278
282
            # resolve the result
279
283
            next_head = iter(the_heads)
280
 
            head = next_head.next()
 
284
            head = next(next_head)
281
285
            for possible_head in next_head:
282
286
                annotated_lines = ((head, line), (possible_head, line))
283
287
                head = tiebreaker(annotated_lines)[0]