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

  • Committer: Aaron Bentley
  • Date: 2007-02-15 14:08:23 UTC
  • mto: This revision was merged to the branch mainline in revision 2290.
  • Revision ID: abentley@panoramicfeedback.com-20070215140823-xaqpzdqb5bmox2ak
Updates from review

Show diffs side-by-side

added added

removed removed

Lines of Context:
925
925
 
926
926
    def create_branch(self):
927
927
        """See BzrDir.create_branch."""
928
 
        return self._format.branch_format.initialize(self)
 
928
        return self._format.get_branch_format().initialize(self)
929
929
 
930
930
    def create_repository(self, shared=False):
931
931
        """See BzrDir.create_repository."""
1012
1012
            pass
1013
1013
        try:
1014
1014
            if not isinstance(self.open_branch()._format,
1015
 
                              format.branch_format.__class__):
 
1015
                              format.get_branch_format().__class__):
1016
1016
                # the repository needs an upgrade.
1017
1017
                return True
1018
1018
        except errors.NotBranchError:
1448
1448
    def __init__(self):
1449
1449
        self._branch_format = None
1450
1450
 
1451
 
    def _get_branch_format(self):
 
1451
    def get_branch_format(self):
1452
1452
        if self._branch_format is None:
1453
1453
            from bzrlib.branch import BranchFormat
1454
1454
            self._branch_format = BranchFormat.get_default_format()
1455
1455
        return self._branch_format
1456
1456
 
1457
 
    def _set_branch_format(self, format):
 
1457
    def set_branch_format(self, format):
1458
1458
        self._branch_format = format
1459
1459
 
1460
 
    branch_format = property(_get_branch_format, _set_branch_format)
1461
 
 
1462
1460
    def get_converter(self, format=None):
1463
1461
        """See BzrDirFormat.get_converter()."""
1464
1462
        if format is None:
1478
1476
 
1479
1477
    def _open(self, transport):
1480
1478
        """See BzrDirFormat._open."""
1481
 
        from bzrlib.repository import RepositoryFormat
1482
 
        from bzrlib.branch import BranchFormat
1483
1479
        return BzrDirMeta1(transport, self)
1484
1480
 
1485
1481
    def __return_repository_format(self):
2000
1996
            # Avoid circular imports
2001
1997
            from bzrlib import branch as _mod_branch
2002
1998
            if (branch._format.__class__ is _mod_branch.BzrBranchFormat5 and
2003
 
                self.target_format.branch_format.__class__ is
 
1999
                self.target_format.get_branch_format().__class__ is
2004
2000
                _mod_branch.BzrBranchFormat6):
2005
2001
                branch_converter = _mod_branch.Converter5to6()
2006
2002
                branch_converter.convert(branch)
2050
2046
            bd = BzrDirMetaFormat1()
2051
2047
            bd.repository_format = repo_format_class()
2052
2048
            if branch_format is not None:
2053
 
                bd.branch_format =  getattr(bzrlib.branch, branch_format)()
 
2049
                bd.set_branch_format(getattr(bzrlib.branch, branch_format)())
2054
2050
            return bd
2055
2051
        self.register(key, helper, help, native, deprecated)
2056
2052