/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 bzrlib/bzrdir_weave.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-10 13:23:20 UTC
  • mto: (5582.10.90 weave-plugin)
  • mto: This revision was merged to the branch mainline in revision 5717.
  • Revision ID: jelmer@samba.org-20110310132320-k6uclq04lapawivt
Fix imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    urlutils,
43
43
    versionedfile,
44
44
    weave,
 
45
    xml4,
45
46
    xml5,
46
47
    )
47
48
from bzrlib.store.versioned import VersionedFileStore
50
51
    get_transport,
51
52
    local,
52
53
    )
53
 
from bzrlib.plugins.weave_fmt import xml4
54
54
""")
55
55
 
56
56
 
99
99
        return "Bazaar-NG branch, format 5\n"
100
100
 
101
101
    def get_branch_format(self):
102
 
        from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
 
102
        from bzrlib.branch_weave import BzrBranchFormat4
103
103
        return BzrBranchFormat4()
104
104
 
105
105
    def get_format_description(self):
119
119
 
120
120
        Except when they are being cloned.
121
121
        """
122
 
        from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
123
 
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat5
 
122
        from bzrlib.branch_weave import BzrBranchFormat4
 
123
        from bzrlib.repofmt.weaverepo import RepositoryFormat5
124
124
        result = (super(BzrDirFormat5, self).initialize_on_transport(transport))
125
125
        RepositoryFormat5().initialize(result, _internal=True)
126
126
        if not _cloning:
137
137
 
138
138
    def __return_repository_format(self):
139
139
        """Circular import protection."""
140
 
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat5
 
140
        from bzrlib.repofmt.weaverepo import RepositoryFormat5
141
141
        return RepositoryFormat5()
142
142
    repository_format = property(__return_repository_format)
143
143
 
163
163
        return "All-in-one format 6"
164
164
 
165
165
    def get_branch_format(self):
166
 
        from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
 
166
        from bzrlib.branch_weave import BzrBranchFormat4
167
167
        return BzrBranchFormat4()
168
168
 
169
169
    def get_converter(self, format=None):
179
179
 
180
180
        Except when they are being cloned.
181
181
        """
182
 
        from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
183
 
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat6
 
182
        from bzrlib.branch_weave import BzrBranchFormat4
 
183
        from bzrlib.repofmt.weaverepo import RepositoryFormat6
184
184
        result = super(BzrDirFormat6, self).initialize_on_transport(transport)
185
185
        RepositoryFormat6().initialize(result, _internal=True)
186
186
        if not _cloning:
197
197
 
198
198
    def __return_repository_format(self):
199
199
        """Circular import protection."""
200
 
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat6
 
200
        from bzrlib.repofmt.weaverepo import RepositoryFormat6
201
201
        return RepositoryFormat6()
202
202
    repository_format = property(__return_repository_format)
203
203
 
317
317
        revision_transport = self.bzrdir.transport.clone('revision-store')
318
318
        # TODO permissions
319
319
        from bzrlib.xml5 import serializer_v5
320
 
        from bzrlib.plugins.weave_fmt.repository import RevisionTextStore
 
320
        from bzrlib.repofmt.weaverepo import RevisionTextStore
321
321
        revision_store = RevisionTextStore(revision_transport,
322
322
            serializer_v5, False, versionedfile.PrefixMapper(),
323
323
            lambda:True, lambda:True)
523
523
 
524
524
    def convert(self, to_convert, pb):
525
525
        """See Converter.convert()."""
526
 
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat7
 
526
        from bzrlib.repofmt.weaverepo import RepositoryFormat7
527
527
        from bzrlib.branch import BzrBranchFormat5
528
528
        self.bzrdir = to_convert
529
529
        self.pb = ui.ui_factory.nested_progress_bar()
691
691
 
692
692
    def __return_repository_format(self):
693
693
        """Circular import protection."""
694
 
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat4
 
694
        from bzrlib.repofmt.weaverepo import RepositoryFormat4
695
695
        return RepositoryFormat4()
696
696
    repository_format = property(__return_repository_format)
697
697
 
791
791
        return result
792
792
 
793
793
    def _init_workingtree(self):
794
 
        from bzrlib.plugins.weave_fmt.workingtree import WorkingTreeFormat2
 
794
        from bzrlib.workingtree_2 import WorkingTreeFormat2
795
795
        try:
796
796
            return WorkingTreeFormat2().initialize(self)
797
797
        except errors.NotLocalUrl:
854
854
    def open_branch(self, name=None, unsupported=False,
855
855
                    ignore_fallbacks=False):
856
856
        """See BzrDir.open_branch."""
857
 
        from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
 
857
        from bzrlib.branch_weave import BzrBranchFormat4
858
858
        format = BzrBranchFormat4()
859
859
        self._check_supported(format, unsupported)
860
860
        return format.open(self, name, _found=True)
876
876
        if not create_tree_if_local:
877
877
            raise errors.MustHaveWorkingTree(
878
878
                self._format, self.root_transport.base)
879
 
        from bzrlib.plugins.weave_fmt.workingtree import WorkingTreeFormat2
 
879
        from bzrlib.workingtree_2 import WorkingTreeFormat2
880
880
        self._make_tail(url)
881
881
        result = self._format._initialize_for_clone(url)
882
882
        try:
914
914
 
915
915
    def open_repository(self):
916
916
        """See BzrDir.open_repository."""
917
 
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat4
 
917
        from bzrlib.repofmt.weaverepo import RepositoryFormat4
918
918
        return RepositoryFormat4().open(self, _found=True)
919
919
 
920
920
 
932
932
    
933
933
    def open_repository(self):
934
934
        """See BzrDir.open_repository."""
935
 
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat5
 
935
        from bzrlib.repofmt.weaverepo import RepositoryFormat5
936
936
        return RepositoryFormat5().open(self, _found=True)
937
937
 
938
938
    def open_workingtree(self, _unsupported=False,
939
939
            recommend_upgrade=True):
940
940
        """See BzrDir.create_workingtree."""
941
 
        from bzrlib.plugins.weave_fmt.workingtree import WorkingTreeFormat2
 
941
        from bzrlib.workingtree_2 import WorkingTreeFormat2
942
942
        wt_format = WorkingTreeFormat2()
943
943
        # we don't warn here about upgrades; that ought to be handled for the
944
944
        # bzrdir as a whole
957
957
 
958
958
    def open_repository(self):
959
959
        """See BzrDir.open_repository."""
960
 
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat6
 
960
        from bzrlib.repofmt.weaverepo import RepositoryFormat6
961
961
        return RepositoryFormat6().open(self, _found=True)
962
962
 
963
963
    def open_workingtree(self, _unsupported=False,
965
965
        """See BzrDir.create_workingtree."""
966
966
        # we don't warn here about upgrades; that ought to be handled for the
967
967
        # bzrdir as a whole
968
 
        from bzrlib.plugins.weave_fmt.workingtree import WorkingTreeFormat2
 
968
        from bzrlib.workingtree_2 import WorkingTreeFormat2
969
969
        return WorkingTreeFormat2().open(self, _found=True)