~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-16 01:25:46 UTC
  • mfrom: (2071 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: john@arbash-meinel.com-20061016012546-d01a0740671b4d73
[merge] bzr.dev

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,
473
477
        """
474
478
        raise NotImplementedError(VersionedFile.plan_merge)
475
479
        
476
 
    def weave_merge(self, plan, a_marker=TextMerge.A_MARKER, 
 
480
    def weave_merge(self, plan, a_marker=TextMerge.A_MARKER,
477
481
                    b_marker=TextMerge.B_MARKER):
478
482
        return PlanWeaveMerge(plan, a_marker, b_marker).merge_lines()[0]
479
483
 
590
594
            target = temp_source
591
595
        version_ids = self._get_source_version_ids(version_ids, ignore_missing)
592
596
        graph = self.source.get_graph(version_ids)
593
 
        order = topo_sort(graph.items())
 
597
        order = tsort.topo_sort(graph.items())
594
598
        pb = ui.ui_factory.nested_progress_bar()
595
599
        parent_texts = {}
596
600
        try:
677
681
        self._formats = formats
678
682
    
679
683
    def adapt(self, test):
680
 
        result = TestSuite()
 
684
        result = unittest.TestSuite()
681
685
        for (interversionedfile_class,
682
686
             versionedfile_factory,
683
687
             versionedfile_factory_to) in self._formats: