~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-05 01:12:15 UTC
  • mto: This revision was merged to the branch mainline in revision 5757.
  • Revision ID: jelmer@samba.org-20110405011215-8g6izwf3uz8v4174
Remove some unnecessary imports, clean up lazy imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
from bzrlib import (
30
30
    annotate,
 
31
    bencode,
31
32
    errors,
32
33
    graph as _mod_graph,
33
34
    groupcompress,
37
38
    multiparent,
38
39
    tsort,
39
40
    revision,
40
 
    ui,
41
41
    )
42
 
from bzrlib.graph import DictParentsProvider, Graph, StackedParentsProvider
43
 
from bzrlib.transport.memory import MemoryTransport
44
42
""")
45
43
from bzrlib.registry import Registry
46
44
from bzrlib.textmerge import TextMerge
47
 
from bzrlib import bencode
48
45
 
49
46
 
50
47
adapter_registry = Registry()
1451
1448
        # line data for locally held keys.
1452
1449
        self._lines = {}
1453
1450
        # key lookup providers
1454
 
        self._providers = [DictParentsProvider(self._parents)]
 
1451
        self._providers = [_mod_graph.DictParentsProvider(self._parents)]
1455
1452
 
1456
1453
    def plan_merge(self, ver_a, ver_b, base=None):
1457
1454
        """See VersionedFile.plan_merge"""
1464
1461
 
1465
1462
    def plan_lca_merge(self, ver_a, ver_b, base=None):
1466
1463
        from bzrlib.merge import _PlanLCAMerge
1467
 
        graph = Graph(self)
 
1464
        graph = _mod_graph.Graph(self)
1468
1465
        new_plan = _PlanLCAMerge(ver_a, ver_b, self, (self._file_id,), graph).plan_merge()
1469
1466
        if base is None:
1470
1467
            return new_plan
1522
1519
            result[revision.NULL_REVISION] = ()
1523
1520
        self._providers = self._providers[:1] + self.fallback_versionedfiles
1524
1521
        result.update(
1525
 
            StackedParentsProvider(self._providers).get_parent_map(keys))
 
1522
            _mod_graph.StackedParentsProvider(
 
1523
                self._providers).get_parent_map(keys))
1526
1524
        for key, parents in result.iteritems():
1527
1525
            if parents == ():
1528
1526
                result[key] = (revision.NULL_REVISION,)