~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-12 22:03:29 UTC
  • mto: This revision was merged to the branch mainline in revision 2071.
  • Revision ID: john@arbash-meinel.com-20060912220329-0683bcd6066fc117
lazy import versionedfile, late-load bzrlib.merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
"""Versioned text file storage api."""
21
21
 
22
 
 
 
22
from bzrlib.lazy_import import lazy_import
 
23
lazy_import(globals(), """
23
24
from copy import deepcopy
24
 
from unittest import TestSuite
25
 
 
26
 
 
27
 
import bzrlib.errors as errors
 
25
import unittest
 
26
 
 
27
from bzrlib import (
 
28
    errors,
 
29
    tsort,
 
30
    ui,
 
31
    )
 
32
from bzrlib.transport.memory import MemoryTransport
 
33
""")
 
34
 
28
35
from bzrlib.inter import InterObject
29
36
from bzrlib.textmerge import TextMerge
30
 
from bzrlib.transport.memory import MemoryTransport
31
 
from bzrlib.tsort import topo_sort
32
 
from bzrlib import ui
33
37
from bzrlib.symbol_versioning import (deprecated_function,
34
38
        deprecated_method,
35
39
        zero_eight,
468
472
        """
469
473
        raise NotImplementedError(VersionedFile.plan_merge)
470
474
        
471
 
    def weave_merge(self, plan, a_marker=TextMerge.A_MARKER, 
 
475
    def weave_merge(self, plan, a_marker=TextMerge.A_MARKER,
472
476
                    b_marker=TextMerge.B_MARKER):
473
477
        return PlanWeaveMerge(plan, a_marker, b_marker).merge_lines()[0]
474
478
 
585
589
            target = temp_source
586
590
        version_ids = self._get_source_version_ids(version_ids, ignore_missing)
587
591
        graph = self.source.get_graph(version_ids)
588
 
        order = topo_sort(graph.items())
 
592
        order = tsort.topo_sort(graph.items())
589
593
        pb = ui.ui_factory.nested_progress_bar()
590
594
        parent_texts = {}
591
595
        try:
672
676
        self._formats = formats
673
677
    
674
678
    def adapt(self, test):
675
 
        result = TestSuite()
 
679
        result = unittest.TestSuite()
676
680
        for (interversionedfile_class,
677
681
             versionedfile_factory,
678
682
             versionedfile_factory_to) in self._formats: