Beispiel #1
0
    def initialize_on_transport(self, transport, _cloning=False):
        """Format 6 dirs always have working tree, branch and repository.

        Except when they are being cloned.
        """
        from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
        from bzrlib.plugins.weave_fmt.repository import RepositoryFormat6
        result = super(BzrDirFormat6, self).initialize_on_transport(transport)
        RepositoryFormat6().initialize(result, _internal=True)
        if not _cloning:
            branch = BzrBranchFormat4().initialize(result)
            result._init_workingtree()
        return result
Beispiel #2
0
 def open_branch(self,
                 name=None,
                 unsupported=False,
                 ignore_fallbacks=False,
                 possible_transports=None):
     """See ControlDir.open_branch."""
     from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
     format = BzrBranchFormat4()
     format.check_support_status(unsupported)
     return format.open(self,
                        name,
                        _found=True,
                        possible_transports=possible_transports)
Beispiel #3
0
 def test_supports_bzrdir_6(self):
     url = self.get_url()
     bdir = BzrDirFormat6().initialize(url)
     bdir.create_repository()
     BzrBranchFormat4().initialize(bdir)
Beispiel #4
0
 def test_no_metadir_support(self):
     url = self.get_url()
     bdir = bzrdir.BzrDirMetaFormat1().initialize(url)
     bdir.create_repository()
     self.assertRaises(errors.IncompatibleFormat,
         BzrBranchFormat4().initialize, bdir)
Beispiel #5
0
 def get_branch_format(self):
     from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
     return BzrBranchFormat4()