~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-08-28 21:23:28 UTC
  • mfrom: (3650.2.5 sprout)
  • Revision ID: pqm@pqm.ubuntu.com-20080828212328-q4mx5qgvrokx06c0
Clean up BzrDir.sprout (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
993
993
            try:
994
994
                branch = self.open_branch()
995
995
                source_repository = branch.repository
 
996
                result_format._branch_format = branch._format
996
997
            except errors.NotBranchError:
997
998
                source_branch = None
998
999
                source_repository = self.open_repository()
1210
1211
 
1211
1212
    def create_branch(self):
1212
1213
        """See BzrDir.create_branch."""
1213
 
        return self.open_branch()
 
1214
        return self._format.get_branch_format().initialize(self)
1214
1215
 
1215
1216
    def destroy_branch(self):
1216
1217
        """See BzrDir.destroy_branch."""
1858
1859
        """See BzrDirFormat.get_format_string()."""
1859
1860
        return "Bazaar-NG branch, format 5\n"
1860
1861
 
 
1862
    def get_branch_format(self):
 
1863
        from bzrlib import branch
 
1864
        return branch.BzrBranchFormat4()
 
1865
 
1861
1866
    def get_format_description(self):
1862
1867
        """See BzrDirFormat.get_format_description()."""
1863
1868
        return "All-in-one format 5"
1921
1926
        """See BzrDirFormat.get_format_description()."""
1922
1927
        return "All-in-one format 6"
1923
1928
 
 
1929
    def get_branch_format(self):
 
1930
        from bzrlib import branch
 
1931
        return branch.BzrBranchFormat4()
 
1932
 
1924
1933
    def get_converter(self, format=None):
1925
1934
        """See BzrDirFormat.get_converter()."""
1926
1935
        # there is one and only one upgrade path here.